Skip to content

Commit 1cf78d4

Browse files
wanghuanhuan12davem330
authored andcommitted
nfp: fix esp-tx-csum-offload doesn't take effect
When esp-tx-csum-offload is set to on, the protocol stack shouldn't calculate the IPsec offload packet's csum, but it does. Because the callback `.ndo_features_check` incorrectly masked NETIF_F_CSUM_MASK bit. Fixes: 57f273a ("nfp: add framework to support ipsec offloading") Signed-off-by: Huanhuan Wang <[email protected]> Signed-off-by: Simon Horman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 8b46168 commit 1cf78d4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/net/ethernet/netronome/nfp/nfp_net_common.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
#include <net/tls.h>
3939
#include <net/vxlan.h>
4040
#include <net/xdp_sock_drv.h>
41+
#include <net/xfrm.h>
4142

4243
#include "nfpcore/nfp_dev.h"
4344
#include "nfpcore/nfp_nsp.h"
@@ -1897,6 +1898,9 @@ nfp_net_features_check(struct sk_buff *skb, struct net_device *dev,
18971898
features &= ~NETIF_F_GSO_MASK;
18981899
}
18991900

1901+
if (xfrm_offload(skb))
1902+
return features;
1903+
19001904
/* VXLAN/GRE check */
19011905
switch (vlan_get_protocol(skb)) {
19021906
case htons(ETH_P_IP):

0 commit comments

Comments
 (0)