[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y4SgPF7ON6aD6yaZ@shredder>
Date: Mon, 28 Nov 2022 13:49:16 +0200
From: Ido Schimmel <idosch@...dia.com>
To: Vincent Mailhol <mailhol.vincent@...adoo.fr>
Cc: Jiri Pirko <jiri@...dia.com>, netdev@...r.kernel.org,
Jakub Kicinski <kuba@...nel.org>,
"David S . Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Paolo Abeni <pabeni@...hat.com>, linux-kernel@...r.kernel.org,
Boris Brezillon <bbrezillon@...nel.org>,
Arnaud Ebalard <arno@...isbad.org>,
Srujana Challa <schalla@...vell.com>,
Kurt Kanzenbach <kurt@...utronix.de>,
Andrew Lunn <andrew@...n.ch>,
Florian Fainelli <f.fainelli@...il.com>,
Vladimir Oltean <olteanv@...il.com>,
Michael Chan <michael.chan@...adcom.com>,
Ioana Ciornei <ioana.ciornei@....com>,
Dimitris Michailidis <dmichail@...gible.com>,
Yisen Zhuang <yisen.zhuang@...wei.com>,
Salil Mehta <salil.mehta@...wei.com>,
Jesse Brandeburg <jesse.brandeburg@...el.com>,
Tony Nguyen <anthony.l.nguyen@...el.com>,
Sunil Goutham <sgoutham@...vell.com>,
Linu Cherian <lcherian@...vell.com>,
Geetha sowjanya <gakula@...vell.com>,
Jerin Jacob <jerinj@...vell.com>,
hariprasad <hkelam@...vell.com>,
Subbaraya Sundeep <sbhatta@...vell.com>,
Taras Chornyi <tchornyi@...vell.com>,
Saeed Mahameed <saeedm@...dia.com>,
Leon Romanovsky <leon@...nel.org>,
Petr Machata <petrm@...dia.com>,
Simon Horman <simon.horman@...igine.com>,
Shannon Nelson <snelson@...sando.io>, drivers@...sando.io,
Ariel Elior <aelior@...vell.com>,
Manish Chopra <manishc@...vell.com>,
Jonathan Lemon <jonathan.lemon@...il.com>,
Vadim Fedorenko <vadfed@...com>,
Richard Cochran <richardcochran@...il.com>,
Vadim Pasternak <vadimp@...lanox.com>,
Shalom Toledo <shalomt@...lanox.com>,
linux-crypto@...r.kernel.org, intel-wired-lan@...ts.osuosl.org,
linux-rdma@...r.kernel.org, oss-drivers@...igine.com,
Jiri Pirko <jiri@...lanox.com>,
Herbert Xu <herbert@...dor.apana.org.au>,
Hao Chen <chenhao288@...ilicon.com>,
Guangbin Huang <huangguangbin2@...wei.com>,
Minghao Chi <chi.minghao@....com.cn>,
Shijith Thotton <sthotton@...vell.com>
Subject: Re: [PATCH net-next v4 1/3] net: devlink: let the core report the
driver name instead of the drivers
On Mon, Nov 28, 2022 at 01:15:43PM +0900, Vincent Mailhol wrote:
> The driver name is available in device_driver::name. Right now,
> drivers still have to report this piece of information themselves in
> their devlink_ops::info_get callback function.
>
> In order to factorize code, make devlink_nl_info_fill() add the driver
> name attribute.
>
> nla_put() does not check if an attribute already exists and
> unconditionally reserves new space, c.f. [1]. To avoid attribute
> duplication, clean-up all the drivers which are currently reporting
> the driver name in their callback.
>
> [1] __nla_put() from lib/nlattr.c
> Link: https://elixir.bootlin.com/linux/v6.0/source/lib/nlattr.c#L993
>
> Signed-off-by: Vincent Mailhol <mailhol.vincent@...adoo.fr>
For mlxsw:
Tested-by: Ido Schimmel <idosch@...dia.com>
I don't see a difference in "devlink dev info" output before and after
the patchset. Tested with mlxsw_spectrum and mlxsw_minimal.
Powered by blists - more mailing lists