Bug 204551 - ixgbe drops packets routed from an IPSec interface with a "bad sa_idx" error
Summary: ixgbe drops packets routed from an IPSec interface with a "bad sa_idx" error
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Network (show other bugs)
Hardware: Intel Linux
: P1 normal
Assignee: drivers_network@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-11 14:51 UTC by Michael Marley
Modified: 2019-11-14 18:13 UTC (History)
2 users (show)

See Also:
Kernel Version: 5.2.8
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Michael Marley 2019-08-11 14:51:44 UTC
I have a put together a router that routes traffic from several local subnets from a switch attached to an i82599ES card through an IPSec VPN interface set up with StrongSwan.  (The VPN is running on an unrelated second interface with a different driver.)  Traffic from the local interfaces to the VPN works as it should and eventually makes it through the VPN server and out to the Internet.  The return traffic makes it back to the router and tcpdump shows it leaving by the i82599, but the traffic never actually makes it onto the wire and I instead get one of

enp1s0: ixgbe_ipsec_tx: bad sa_idx=64512 handle=0

for each packet that should be transmitted.  (The sa_idx and handle values are always the same.)

I realized this was probably related to ixgbe's IPSec offloading feature, so I tried with the motherboard's integrated e1000e device and didn't have the problem.  I tried using ethtool to disable all the IPSec-related offloads (tx-esp-segmentation, esp-hw-offload, esp-tx-csum-hw-offload), but the problem persisted.  I then tried recompiling the kernel with CONFIG_IXGBE_IPSEC=n and that worked around the problem.

I was also able to find another instance of the same problem reported in Debian at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=930443.  That person seems to be having exactly the same issue as me, down to the sa_idx and handle values being the same.

If there are any more details I can provide to make this easier to track down, please let me know.
Comment 1 Michael Marley 2019-11-14 18:13:23 UTC
This was fixed for 5.3 and for the stable branches.

Note You need to log in before you can comment on or make changes to this bug.