[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZsXq6BAxdkVQmsID@Laptop-X1>
Date: Wed, 21 Aug 2024 21:26:00 +0800
From: Hangbin Liu <liuhangbin@...il.com>
To: Steffen Klassert <steffen.klassert@...unet.com>
Cc: Sabrina Dubroca <sd@...asysnail.net>, netdev@...r.kernel.org,
Jay Vosburgh <j.vosburgh@...il.com>,
"David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Eric Dumazet <edumazet@...gle.com>,
Nikolay Aleksandrov <razor@...ckwall.org>,
Tariq Toukan <tariqt@...dia.com>, Jianbo Liu <jianbol@...dia.com>,
Simon Horman <horms@...nel.org>
Subject: Re: [PATCHv3 net-next 2/3] bonding: Add ESN support to IPSec HW
offload
On Wed, Aug 21, 2024 at 02:30:41PM +0200, Steffen Klassert wrote:
> > > +/**
> > > + * bond_advance_esn_state - ESN support for IPSec HW offload
> > > + * @xs: pointer to transformer state struct
> > > + **/
> > > +static void bond_advance_esn_state(struct xfrm_state *xs)
> > > +{
> > > + struct net_device *real_dev;
> > > +
> > > + rcu_read_lock();
> > > + real_dev = bond_ipsec_dev(xs);
> > > + if (!real_dev)
> > > + goto out;
> > > +
> > > + if (!real_dev->xfrmdev_ops ||
> > > + !real_dev->xfrmdev_ops->xdo_dev_state_advance_esn) {
> > > + pr_warn("%s: %s doesn't support xdo_dev_state_advance_esn\n", __func__, real_dev->name);
> >
> > xdo_dev_state_advance_esn is called on the receive path for every
> > packet when ESN is enabled (xfrm_input -> xfrm_replay_advance ->
> > xfrm_replay_advance_esn -> xfrm_dev_state_advance_esn), this needs to
> > be ratelimited.
>
> How does xfrm_state offload work on bonding?
> Does every slave have its own negotiated SA?
Yes and no. Bonding only supports xfrm offload with active-backup mode. So only
current active slave keep the SA. When active slave changes, the sa on
previous slave is deleted and re-added on new active slave.
Thanks
Hangbin
Powered by blists - more mailing lists