ixgbe: Fix secpath usage for IPsec TX offload.

The ixgbe 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.

Fixes: 592594704761 ("ixgbe: process the Tx ipsec offload")
Reported-by: Michael Marley <michael@michaelmarley.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by Steffen Klassert and committed by David S. Miller f39b683d a21b7f0c

+2 -1
+2 -1
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
··· 36 36 #include <net/vxlan.h> 37 37 #include <net/mpls.h> 38 38 #include <net/xdp_sock.h> 39 + #include <net/xfrm.h> 39 40 40 41 #include "ixgbe.h" 41 42 #include "ixgbe_common.h" ··· 8698 8697 #endif /* IXGBE_FCOE */ 8699 8698 8700 8699 #ifdef CONFIG_IXGBE_IPSEC 8701 - if (secpath_exists(skb) && 8700 + if (xfrm_offload(skb) && 8702 8701 !ixgbe_ipsec_tx(tx_ring, first, &ipsec_tx)) 8703 8702 goto out_drop; 8704 8703 #endif