Skip to content

Commit 3dc1bc5

Browse files
Shannon Nelsongregkh
authored andcommitted
ixgbe: allow IPsec Tx offload in VEPA mode
[ Upstream commit 7fa57ca ] 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 47b6f50 ("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: Shannon Nelson <shannon.nelson@oracle.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent bd240b1 commit 3dc1bc5

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include "ixgbe.h"
55
#include <net/xfrm.h>
66
#include <crypto/aead.h>
7+
#include <linux/if_bridge.h>
78

89
/**
910
* ixgbe_ipsec_set_tx_sa - set the Tx SA registers
@@ -676,7 +677,8 @@ static int ixgbe_ipsec_add_sa(struct xfrm_state *xs)
676677
} else {
677678
struct tx_sa tsa;
678679

679-
if (adapter->num_vfs)
680+
if (adapter->num_vfs &&
681+
adapter->bridge_mode != BRIDGE_MODE_VEPA)
680682
return -EOPNOTSUPP;
681683

682684
/* find the first unused index */

0 commit comments

Comments
 (0)