Skip to content

Commit 8f6617b

Browse files
Jeff Kirsherdavem330
authored andcommitted
ixgbevf: Fix secpath usage for IPsec Tx offload
Port the same fix for ixgbe to ixgbevf. The ixgbevf driver currently does IPsec Tx offloading based on an existing secpath. However, the secpath can also come from the Rx side, in this case it is misinterpreted for Tx offload and the packets are dropped with a "bad sa_idx" error. Fix this by using the xfrm_offload() function to test for Tx offload. CC: Shannon Nelson <[email protected]> Fixes: 7f68d43 ("ixgbevf: enable VF IPsec offload operations") Reported-by: Jonathan Tooker <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]> Acked-by: Shannon Nelson <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent b456d72 commit 8f6617b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#include <linux/bpf.h>
3131
#include <linux/bpf_trace.h>
3232
#include <linux/atomic.h>
33+
#include <net/xfrm.h>
3334

3435
#include "ixgbevf.h"
3536

@@ -4161,7 +4162,7 @@ static int ixgbevf_xmit_frame_ring(struct sk_buff *skb,
41614162
first->protocol = vlan_get_protocol(skb);
41624163

41634164
#ifdef CONFIG_IXGBEVF_IPSEC
4164-
if (secpath_exists(skb) && !ixgbevf_ipsec_tx(tx_ring, first, &ipsec_tx))
4165+
if (xfrm_offload(skb) && !ixgbevf_ipsec_tx(tx_ring, first, &ipsec_tx))
41654166
goto out_drop;
41664167
#endif
41674168
tso = ixgbevf_tso(tx_ring, first, &hdr_len, &ipsec_tx);

0 commit comments

Comments
 (0)