From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 60900C54E94 for ; Tue, 24 Jan 2023 06:27:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233252AbjAXG1C (ORCPT ); Tue, 24 Jan 2023 01:27:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231544AbjAXG1B (ORCPT ); Tue, 24 Jan 2023 01:27:01 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2EE8530B17; Mon, 23 Jan 2023 22:27:00 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C9135611E8; Tue, 24 Jan 2023 06:26:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B04B8C433EF; Tue, 24 Jan 2023 06:26:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674541619; bh=0E4Oc7/Z2stBA8qPrvNH0kEWWPBwgaEO48l8pr7o85U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Y0C8LuIeZXm8qzNM/0x9oaruuBIALECSGYaMY6JmMXHEt/4OO6fq6+06qZLWrY6i8 /YYXqNse4w2KUvniABDf9pA3W11MlsCChz5gJvaziaPWU5exQ10jdXHnq18ftwwENJ WFWPLGpiW20wYNKbJJEXOqd9nDmLzA81okfyPzqIWTVrb6JlllE262R87ggNDsSftd ILWr1fy2sGPKt1lW5713650iPtEhl5Bemos7Ul6Kw5aghe/uDMFQCr1TmgUCJPph8Z Xu57x2nxiwSFl/idayA3VSw1jJzKxozO5QYBFU7NORPZvlvN0aI9/owULgjlII7j/5 tcOXg3V17Py7Q== Date: Tue, 24 Jan 2023 08:22:33 +0200 From: Leon Romanovsky To: Jay Vosburgh Cc: "David S . Miller" , Jakub Kicinski , Steffen Klassert , Veaceslav Falico , Herbert Xu , Jonathan Corbet , oss-drivers@corigine.com, linux-doc@vger.kernel.org, Raju Rangoju , Jesse Brandeburg , Eric Dumazet , netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org, Ayush Sawal , Simon Horman , Tony Nguyen , Paolo Abeni , Saeed Mahameed , Andy Gospodarek Subject: Re: [Intel-wired-lan] [PATCH net-next 09/10] bonding: fill IPsec state validation failure reason Message-ID: References: <5064.1674514892@famine> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5064.1674514892@famine> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Mon, Jan 23, 2023 at 03:01:32PM -0800, Jay Vosburgh wrote: > Leon Romanovsky wrote: > > >From: Leon Romanovsky > > > >Rely on extack to return failure reason. > > > >Signed-off-by: Leon Romanovsky > >Signed-off-by: Leon Romanovsky > >--- > > 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