提交 3dc1bc57 编写于 作者: S Shannon Nelson 提交者: Greg Kroah-Hartman

ixgbe: allow IPsec Tx offload in VEPA mode

[ Upstream commit 7fa57ca443cffe81ce8416b57966bfb0370678a1 ]

When it's possible that the PF might end up trying to send a
packet to one of its own VFs, we have to forbid IPsec offload
because the device drops the packets into a black hole.
See commit 47b6f50077e6 ("ixgbe: disallow IPsec Tx offload
when in SR-IOV mode") for more info.

This really is only necessary when the device is in the default
VEB mode.  If instead the device is running in VEPA mode,
the packets will go through the encryption engine and out the
MAC/PHY as normal, and get "hairpinned" as needed by the switch.

So let's not block IPsec offload when in VEPA mode.  To get
there with the ixgbe device, use the handy 'bridge' command:
	bridge link set dev eth1 hwmode vepa
Signed-off-by: NShannon Nelson <shannon.nelson@oracle.com>
Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: NSasha Levin <sashal@kernel.org>
上级 bd240b11
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include "ixgbe.h" #include "ixgbe.h"
#include <net/xfrm.h> #include <net/xfrm.h>
#include <crypto/aead.h> #include <crypto/aead.h>
#include <linux/if_bridge.h>
/** /**
* ixgbe_ipsec_set_tx_sa - set the Tx SA registers * ixgbe_ipsec_set_tx_sa - set the Tx SA registers
...@@ -676,7 +677,8 @@ static int ixgbe_ipsec_add_sa(struct xfrm_state *xs) ...@@ -676,7 +677,8 @@ static int ixgbe_ipsec_add_sa(struct xfrm_state *xs)
} else { } else {
struct tx_sa tsa; struct tx_sa tsa;
if (adapter->num_vfs) if (adapter->num_vfs &&
adapter->bridge_mode != BRIDGE_MODE_VEPA)
return -EOPNOTSUPP; return -EOPNOTSUPP;
/* find the first unused index */ /* find the first unused index */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册