ixgbe: Fix secpath usage for IPsec TX offload.
Subsystems (3)
PATCH 1/1 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.
--- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +2 -1
@@ -36,6 +36,7 @@#include <net/vxlan.h> #include <net/mpls.h> #include <net/xdp_sock.h> +#include <net/xfrm.h> #include "ixgbe.h" #include "ixgbe_common.h"
@@ -8696,7 +8697,7 @@ netdev_tx_t ixgbe_xmit_frame_ring(struct sk_buff *skb,#endif /* IXGBE_FCOE */ #ifdef CONFIG_IXGBE_IPSEC -if (secpath_exists (skb) && +if (xfrm_offload (skb) && !ixgbe_ipsec_tx (tx_ring, first, &ipsec_tx)) goto out_drop;#endif
Signature · 1 line
2.17.1
David Miller
maintainerFrom: Steffen Klassert <[email protected]>
Date: Thu, 12 Sep 2019 13:01:44 +0200
Quoted 10 lines
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 thexfrm_offload()function to test for TX offload.Fixes 592594704761 ("ixgbe: process the Tx ipsec offload")Reported-by Michael Marley <[email protected]>Signed-off-by Steffen Klassert <[email protected]>
I'll apply this directly and queue it up for -stable, thanks.
Quoted 10 lines · David Miller
From: Steffen Klassert <[email protected]>
Date: Thu, 12 Sep 2019 13:01:44 +0200Quoted 7 lines
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 thexfrm_offload()function to test for TX offload.
Quoted 5 lines
Quoted 3 lines
Fixes 592594704761 ("ixgbe: process the Tx ipsec offload")Reported-by Michael Marley <[email protected]>Signed-off-by Steffen Klassert <[email protected]>I'll apply this directly and queue it up for -stable, thanks.
Thanks Dave!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20190912/16161466/attachment.asc>
Quoted 7 lines · Steffen Klassert
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 thexfrm_offload()function to test for TX offload.
Does this patch also need to be ported to the ixgbevf driver? I can replicate the bad sa_idx error using a VM that's using a VF & the ixgebvf driver.
Quoted 8 lines · Jonathan Tooker
Quoted 7 lines · Steffen Klassert
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 thexfrm_offload()function to test for TX offload.
Quoted 4 lines
Does this patch also need to be ported to the ixgbevf driver? I can replicate the bad
sa_idxerror using a VM that's using a VF & the ixgebvf? driver.
Yes.
sln
Quoted 8 lines · Jonathan Tooker
Quoted 7 lines · Steffen Klassert
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 thexfrm_offload()function to test for TX offload.
Quoted 4 lines
Does this patch also need to be ported to the ixgbevf driver? I can replicate the bad
sa_idxerror using a VM that's using a VF & the ixgebvf driver.
I am putting together a patch for ixgbevf right now.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20190912/ebfd966e/attachment.asc>
Quoted 6 lines · Steffen Klassert
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 thexfrm_offload()function to test for TX offload.
Quoted 29 lines
Fixes 592594704761 ("ixgbe: process the Tx ipsec offload")Reported-by Michael Marley <[email protected]>Signed-off-by Steffen Klassert <[email protected]>--- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +2
-1@@ -36,6 +36,7 @@#include <net/vxlan.h> #include <net/mpls.h> #include <net/xdp_sock.h> +#include <net/xfrm.h> #include "ixgbe.h" #include "ixgbe_common.h" @@ -8696,7 +8697,7 @@ netdev_tx_t ixgbe_xmit_frame_ring(struct sk_buff *skb,#endif /* IXGBE_FCOE */ #ifdef CONFIG_IXGBE_IPSEC -if (secpath_exists (skb) && +if (xfrm_offload (skb) && !ixgbe_ipsec_tx (tx_ring, first, &ipsec_tx)) goto out_drop;#endif
Quoted 10 lines · Steffen Klassert
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 thexfrm_offload()function to test for TX offload.Fixes 592594704761 ("ixgbe: process the Tx ipsec offload")Reported-by Michael Marley <[email protected]>Signed-off-by Steffen Klassert <[email protected]>
Quoted 27 lines
--- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +2
-1@@ -36,6 +36,7 @@#include <net/vxlan.h> #include <net/mpls.h> #include <net/xdp_sock.h> +#include <net/xfrm.h> #include "ixgbe.h" #include "ixgbe_common.h" @@ -8696,7 +8697,7 @@ netdev_tx_t ixgbe_xmit_frame_ring(struct sk_buff *skb,#endif /* IXGBE_FCOE */ #ifdef CONFIG_IXGBE_IPSEC -if (secpath_exists (skb) && +if (xfrm_offload (skb) && !ixgbe_ipsec_tx (tx_ring, first, &ipsec_tx)) goto out_drop;#endif