Skip to content

RFC bonding: support hardware crypto offload

Jarod Wilson intel-wired-lan lkml netdev oe-kbuild-all 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 RFC Latest3 patches 0 repliesNew
  2. v1 RFC3 patches 0 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3xfrm: bail early on slave pass over skbinclude/net/xfrm.h net/xfrm/xfrm_device.c+18 -170 replies
2/3ixgbe_ipsec: become aware of when running as a bonding slavedrivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c+31 -80 replies
3/3bonding: support hardware encryption offload to slavesdrivers/net/bonding/bond_main.c include/net/bonding.h+111 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [RFC PATCH net-next v2 0/3] bonding: support hardware crypto offload

This is an initial "proof of concept" functional implementation for doing pass-through of hardware encryption from bonding device to capable slaves. This was tested using an ixgbe-driven Intel x520 NIC with libreswan and a transport mode connection, on top of an active-backup bond, using netperf and downing an interface during. Failover takes a moment, but does work, and overall performance is right on par with offload when running on a bare interface.

Caveats: this is ONLY enabled for active-backup, because I'm not sure how one would manage multiple offload handles for different devices all running at the same time in the same xfrm, and it relies on some minor changes to both the xfrm code and slave device driver code to get things to behave, and I don't have immediate access to any other hardware that could function similarly to update driver code accordingly.

I'm hoping folks with more of an idea about xfrm have some thoughts on ways to make this cleaner, and possibly support more bonding modes, but I'm reasonably happy I've made it this far. :)

v2: fix build with CONFIG_XFRM_OFFLOAD disabled and rebase on latest
net-next tree bonding changes

CC Jay Vosburgh <[email protected]>
CC Veaceslav Falico <[email protected]>
CC Andy Gospodarek <[email protected]>
CC "David S. Miller" <[email protected]>
CC Jeff Kirsher <[email protected]>
CC Jakub Kicinski <[email protected]>
CC Steffen Klassert <[email protected]>
CC Herbert Xu <[email protected]>
CC netdev at vger.kernel.org
CC intel-wired-lan at lists.osuosl.org

Jarod Wilson (3):
xfrm: bail early on slave pass over skb
ixgbe_ipsec: become aware of when running as a bonding slave
bonding: support hardware encryption offload to slaves

 drivers/net/bonding/bond_main.c               | 111 +++++++++++++++++-
 .../net/ethernet/intel/ixgbe/ixgbe_ipsec.c    |  39 ++++--
 include/net/bonding.h                         |   3 +
 include/net/xfrm.h                            |   1 +
 net/xfrm/xfrm_device.c                        |  34 +++---
 5 files changed, 160 insertions(+), 28 deletions(-)
Signature · 1 line
2.20.1