From: David Miller <davem@davemloft.net>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [PATCH net-next] bonding: allow xfrm offload setup post-module-load
Date: Wed, 01 Jul 2020 15:53:48 -0700 (PDT) [thread overview]
Message-ID: <20200701.155348.853858023908987046.davem@davemloft.net> (raw)
In-Reply-To: <20200630184941.65165-1-jarod@redhat.com>
From: Jarod Wilson <jarod@redhat.com>
Date: Tue, 30 Jun 2020 14:49:41 -0400
> At the moment, bonding xfrm crypto offload can only be set up if the bonding
> module is loaded with active-backup mode already set. We need to be able to
> make this work with bonds set to AB after the bonding driver has already
> been loaded.
>
> So what's done here is:
>
> 1) move #define BOND_XFRM_FEATURES to net/bonding.h so it can be used
> by both bond_main.c and bond_options.c
> 2) set BOND_XFRM_FEATURES in bond_dev->hw_features universally, rather than
> only when loading in AB mode
> 3) wire up xfrmdev_ops universally too
> 4) disable BOND_XFRM_FEATURES in bond_dev->features if not AB
> 5) exit early (non-AB case) from bond_ipsec_offload_ok, to prevent a
> performance hit from traversing into the underlying drivers
> 5) toggle BOND_XFRM_FEATURES in bond_dev->wanted_features and call
> netdev_change_features() from bond_option_mode_set()
>
> In my local testing, I can change bonding modes back and forth on the fly,
> have hardware offload work when I'm in AB, and see no performance penalty
> to non-AB software encryption, despite having xfrm bits all wired up for
> all modes now.
>
> Fixes: 18cb261afd7b ("bonding: support hardware encryption offload to slaves")
> Reported-by: Huy Nguyen <huyn@mellanox.com>
> Signed-off-by: Jarod Wilson <jarod@redhat.com>
Applied, thanks.
prev parent reply other threads:[~2020-07-01 22:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-30 18:49 [Intel-wired-lan] [PATCH net-next] bonding: allow xfrm offload setup post-module-load Jarod Wilson
2020-07-01 22:53 ` David Miller [this message]
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=20200701.155348.853858023908987046.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=intel-wired-lan@osuosl.org \
/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