Netdev List
 help / color / mirror / Atom feed
From: Michael Marley <michael@michaelmarley.com>
To: Steffen Klassert <steffen.klassert@secunet.com>
Cc: Shannon Nelson <snelson@pensando.io>,
	netdev@vger.kernel.org,
	Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: Re: ixgbe: driver drops packets routed from an IPSec interface with a "bad sa_idx" error
Date: Wed, 11 Sep 2019 10:50:16 -0400	[thread overview]
Message-ID: <12d6d2313eeb61a51731a2ba9b1fa9bf@michaelmarley.com> (raw)
In-Reply-To: <20190911061547.GR2879@gauss3.secunet.de>

On 2019-09-11 02:15, Steffen Klassert wrote:
> On Tue, Sep 10, 2019 at 06:53:30PM -0400, Michael Marley wrote:
>> 
>> StrongSwan has hardware offload disabled by default, and I didn't 
>> enable
>> it explicitly.  I also already tried turning off all those switches 
>> with
>> ethtool and it has no effect.  This doesn't surprise me though, 
>> because
>> as I said, I don't actually have the IPSec connection running over the
>> ixgbe device.  The IPSec connection runs over another network adapter
>> that doesn't support IPSec offload at all.  The problem comes when
>> traffic received over the IPSec interface is then routed back out
>> (unencrypted) through the ixgbe device into the local network.
> 
> 
> Seems like the ixgbe driver tries to use the sec_path
> from RX to setup an offload at the TX side.
> 
> Can you please try this (completely untested) patch?
> 
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> index 9bcae44e9883..ae31bd57127c 100644
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> @@ -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
With the patch, the problem is gone.  Thanks!

Michael

  parent reply	other threads:[~2019-09-11 14:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-06 18:13 ixgbe: driver drops packets routed from an IPSec interface with a "bad sa_idx" error Michael Marley
2019-09-09 18:21 ` Shannon Nelson
2019-09-09 18:45   ` Michael Marley
2019-09-10 21:43     ` Shannon Nelson
2019-09-10 22:53       ` Michael Marley
2019-09-11  6:15         ` Steffen Klassert
2019-09-11  7:17           ` Shannon Nelson
2019-09-11 14:50           ` Michael Marley [this message]
2019-09-11 18:45             ` Jeff Kirsher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=12d6d2313eeb61a51731a2ba9b1fa9bf@michaelmarley.com \
    --to=michael@michaelmarley.com \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=snelson@pensando.io \
    --cc=steffen.klassert@secunet.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox