Commit 8f6617ba authored by Jeff Kirsher's avatar Jeff Kirsher Committed by David S. Miller
Browse files

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 <>
Fixes: 7f68d430

 ("ixgbevf: enable VF IPsec offload operations")
Reported-by: default avatarJonathan Tooker <>
Signed-off-by: default avatarJeff Kirsher <>
Acked-by: default avatarShannon Nelson <>
Signed-off-by: default avatarDavid S. Miller <>
parent b456d724
......@@ -30,6 +30,7 @@
#include <linux/bpf.h>
#include <linux/bpf_trace.h>
#include <linux/atomic.h>
#include <net/xfrm.h>
#include "ixgbevf.h"
......@@ -4161,7 +4162,7 @@ static int ixgbevf_xmit_frame_ring(struct sk_buff *skb,
first->protocol = vlan_get_protocol(skb);
if (secpath_exists(skb) && !ixgbevf_ipsec_tx(tx_ring, first, &ipsec_tx))
if (xfrm_offload(skb) && !ixgbevf_ipsec_tx(tx_ring, first, &ipsec_tx))
goto out_drop;
tso = ixgbevf_tso(tx_ring, first, &hdr_len, &ipsec_tx);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment