netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Jay Vosburgh <jay.vosburgh@canonical.com>
Cc: "David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Steffen Klassert <steffen.klassert@secunet.com>,
	Veaceslav Falico <vfalico@gmail.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	Jonathan Corbet <corbet@lwn.net>,
	oss-drivers@corigine.com, linux-doc@vger.kernel.org,
	Raju Rangoju <rajur@chelsio.com>,
	Jesse Brandeburg <jesse.brandeburg@intel.com>,
	Eric Dumazet <edumazet@google.com>,
	netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org,
	Ayush Sawal <ayush.sawal@chelsio.com>,
	Simon Horman <simon.horman@corigine.com>,
	Tony Nguyen <anthony.l.nguyen@intel.com>,
	Paolo Abeni <pabeni@redhat.com>,
	Saeed Mahameed <saeedm@nvidia.com>,
	Andy Gospodarek <andy@greyhouse.net>
Subject: Re: [Intel-wired-lan] [PATCH net-next 09/10] bonding: fill IPsec state validation failure reason
Date: Tue, 24 Jan 2023 08:22:33 +0200	[thread overview]
Message-ID: <Y895KXqtQgXOytj1@unreal> (raw)
In-Reply-To: <5064.1674514892@famine>

On Mon, Jan 23, 2023 at 03:01:32PM -0800, Jay Vosburgh wrote:
> Leon Romanovsky <leon@kernel.org> wrote:
> 
> >From: Leon Romanovsky <leonro@nvidia.com>
> >
> >Rely on extack to return failure reason.
> >
> >Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
> >Signed-off-by: Leon Romanovsky <leon@kernel.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@canonical.com

  reply	other threads:[~2023-01-24  6:27 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-23 14:00 [PATCH net-next 00/10] Convert drivers to return XFRM configuration errors through extack Leon Romanovsky
2023-01-23 14:00 ` [PATCH net-next 01/10] xfrm: extend add policy callback to set failure reason Leon Romanovsky
2023-01-23 14:00 ` [PATCH net-next 02/10] net/mlx5e: Fill IPsec policy validation " Leon Romanovsky
2023-01-23 14:00 ` [PATCH net-next 03/10] xfrm: extend add state callback to set " Leon Romanovsky
2023-01-23 14:00 ` [PATCH net-next 04/10] net/mlx5e: Fill IPsec state validation " Leon Romanovsky
2023-01-23 17:12   ` Leon Romanovsky
2023-01-24  7:59   ` [Intel-wired-lan] " kernel test robot
2023-01-23 14:00 ` [PATCH net-next 05/10] netdevsim: " Leon Romanovsky
2023-01-23 14:00 ` [PATCH net-next 06/10] nfp: fill " Leon Romanovsky
2023-01-23 15:09   ` Simon Horman
2023-01-23 16:34     ` Leon Romanovsky
2023-01-23 14:00 ` [PATCH net-next 07/10] ixgbevf: " Leon Romanovsky
2023-01-23 14:00 ` [PATCH net-next 08/10] ixgbe: " Leon Romanovsky
2023-01-23 14:00 ` [PATCH net-next 09/10] bonding: " Leon Romanovsky
2023-01-23 23:01   ` [Intel-wired-lan] " Jay Vosburgh
2023-01-24  6:22     ` Leon Romanovsky [this message]
2023-01-23 14:00 ` [PATCH net-next 10/10] cxgb4: " Leon Romanovsky
2023-01-24  9:42   ` kernel test robot

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=Y895KXqtQgXOytj1@unreal \
    --to=leon@kernel.org \
    --cc=andy@greyhouse.net \
    --cc=anthony.l.nguyen@intel.com \
    --cc=ayush.sawal@chelsio.com \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jay.vosburgh@canonical.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=kuba@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=oss-drivers@corigine.com \
    --cc=pabeni@redhat.com \
    --cc=rajur@chelsio.com \
    --cc=saeedm@nvidia.com \
    --cc=simon.horman@corigine.com \
    --cc=steffen.klassert@secunet.com \
    --cc=vfalico@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).