[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y895KXqtQgXOytj1@unreal>
Date: Tue, 24 Jan 2023 08:22:33 +0200
From: Leon Romanovsky <leon@...nel.org>
To: Jay Vosburgh <jay.vosburgh@...onical.com>
Cc: "David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Steffen Klassert <steffen.klassert@...unet.com>,
Veaceslav Falico <vfalico@...il.com>,
Herbert Xu <herbert@...dor.apana.org.au>,
Jonathan Corbet <corbet@....net>, oss-drivers@...igine.com,
linux-doc@...r.kernel.org, Raju Rangoju <rajur@...lsio.com>,
Jesse Brandeburg <jesse.brandeburg@...el.com>,
Eric Dumazet <edumazet@...gle.com>, netdev@...r.kernel.org,
intel-wired-lan@...ts.osuosl.org,
Ayush Sawal <ayush.sawal@...lsio.com>,
Simon Horman <simon.horman@...igine.com>,
Tony Nguyen <anthony.l.nguyen@...el.com>,
Paolo Abeni <pabeni@...hat.com>,
Saeed Mahameed <saeedm@...dia.com>,
Andy Gospodarek <andy@...yhouse.net>
Subject: Re: [Intel-wired-lan] [PATCH net-next 09/10] bonding: fill IPsec
state validation failure reason
On Mon, Jan 23, 2023 at 03:01:32PM -0800, Jay Vosburgh wrote:
> Leon Romanovsky <leon@...nel.org> wrote:
>
> >From: Leon Romanovsky <leonro@...dia.com>
> >
> >Rely on extack to return failure reason.
> >
> >Signed-off-by: Leon Romanovsky <leonro@...dia.com>
> >Signed-off-by: Leon Romanovsky <leon@...nel.org>
> >---
> > drivers/net/bonding/bond_main.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> >diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
> >index 686b2a6fd674..00646aa315c3 100644
> >--- a/drivers/net/bonding/bond_main.c
> >+++ b/drivers/net/bonding/bond_main.c
> >@@ -444,7 +444,7 @@ static int bond_ipsec_add_sa(struct xfrm_state *xs,
> > if (!slave->dev->xfrmdev_ops ||
> > !slave->dev->xfrmdev_ops->xdo_dev_state_add ||
> > netif_is_bond_master(slave->dev)) {
> >- slave_warn(bond_dev, slave->dev, "Slave does not support ipsec offload\n");
> >+ NL_SET_ERR_MSG_MOD(extack, "Slave does not support ipsec offload");
> > rcu_read_unlock();
> > return -EINVAL;
> > }
>
> Why only this one, and not include the other similar
> slave_warn() calls in the bond_ipsec_* functions?
Which functions did you have in mind?
The extack was added to XFRM .xdo_dev_state_add() call, which is
translated to bond_ipsec_add_sa() with only one slave_warn() print.
If you are talking about bond_ipsec_add_sa_all(), that function isn't
directly connected to netlink and doesn't have extack pointer to fill.
If you are talking about bond_ipsec_del_sai*() and slave_warn() there, it
will be better to be deleted/changed to make sure what ipsec_list have
only valid devices.
Thanks
> That would seem to make some failures show up in dmesg,
> and others returned to the caller via extack.
>
> -J
>
> ---
> -Jay Vosburgh, jay.vosburgh@...onical.com
Powered by blists - more mailing lists