From: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
To: Jiri Pirko <jiri@nvidia.com>,
netdev@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>
Cc: "David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
linux-kernel@vger.kernel.org,
Boris Brezillon <bbrezillon@kernel.org>,
Arnaud Ebalard <arno@natisbad.org>,
Srujana Challa <schalla@marvell.com>,
Kurt Kanzenbach <kurt@linutronix.de>,
Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>,
Vladimir Oltean <olteanv@gmail.com>,
Michael Chan <michael.chan@broadcom.com>,
Ioana Ciornei <ioana.ciornei@nxp.com>,
Dimitris Michailidis <dmichail@fungible.com>,
Yisen Zhuang <yisen.zhuang@huawei.com>,
Salil Mehta <salil.mehta@huawei.com>,
Jesse Brandeburg <jesse.brandeburg@intel.com>,
Tony Nguyen <anthony.l.nguyen@intel.com>,
Sunil Goutham <sgoutham@marvell.com>,
Linu Cherian <lcherian@marvell.com>,
Geetha sowjanya <gakula@marvell.com>,
Jerin Jacob <jerinj@marvell.com>, hariprasad <hkelam@marvell.com>,
Subbaraya Sundeep <sbhatta@marvell.com>,
Taras Chornyi <tchornyi@marvell.com>,
Saeed Mahameed <saeedm@nvidia.com>,
Leon Romanovsky <leon@kernel.org>,
Ido Schimmel <idosch@nvidia.com>, Petr Machata <petrm@nvidia.com>,
Simon Horman <simon.horman@corigine.com>,
Shannon Nelson <snelson@pensando.io>,
drivers@pensando.io, Ariel Elior <aelior@marvell.com>,
Manish Chopra <manishc@marvell.com>,
Jonathan Lemon <jonathan.lemon@gmail.com>,
Vadim Fedorenko <vadfed@fb.com>,
Richard Cochran <richardcochran@gmail.com>,
Vadim Pasternak <vadimp@mellanox.com>,
Shalom Toledo <shalomt@mellanox.com>,
linux-crypto@vger.kernel.org, intel-wired-lan@lists.osuosl.org,
linux-rdma@vger.kernel.org, oss-drivers@corigine.com,
Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Subject: [PATCH net-next v2 0/5] net: devlink: return the driver name in devlink_nl_info_fill
Date: Sun, 27 Nov 2022 17:15:59 +0900 [thread overview]
Message-ID: <20221127081604.5242-1-mailhol.vincent@wanadoo.fr> (raw)
In-Reply-To: <20221122154934.13937-1-mailhol.vincent@wanadoo.fr>
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.
The goal of this series is to have the devlink core to report this
information instead of the drivers.
The first two patches clean up the mlxsw driver for both the ethtool
and the devlink (both are supposed to return the same information so
the ethtool got included as well). This is split in two patches
because of the different Fixes tag.
The third patch fulfills the actual goal of this series: modify
devlink core to report the driver name and clean-up all drivers. Both
as to be done in an atomic change to avoid attribute duplication.
The fourth patch removes the devlink_info_driver_name_put() function
to prevent future drivers from reporting the driver name themselves.
Finally, the fifth and last patch allows the core to call
devlink_nl_info_fill() even if the devlink_ops::info_get() callback is
NULL. This allows to do further more clean up in the drivers.
---
* Changelog *
RFC v1 -> v2
* drop the RFC tag
* big rework following the discussion on RFC:
https://lore.kernel.org/netdev/20221122154934.13937-1-mailhol.vincent@wanadoo.fr/
Went from one patch to a series of five patches:
* drop the idea to report the USB serial number following Greg's
comment:
https://lore.kernel.org/linux-usb/Y3+VfNdt%2FK7UtRcw@kroah.com/
Vincent Mailhol (5):
mlxsw: minimal: fix mlxsw_m_module_get_drvinfo() to correctly report
driver name
mlxsw: core: fix mlxsw_devlink_info_get() to correctly report driver
name
net: devlink: let the core report the driver name instead of the
drivers
net: devlink: remove devlink_info_driver_name_put()
net: devlink: make the devlink_ops::info_get() callback optional
.../marvell/octeontx2/otx2_cpt_devlink.c | 4 ---
drivers/net/dsa/hirschmann/hellcreek.c | 5 ---
drivers/net/dsa/mv88e6xxx/devlink.c | 5 ---
drivers/net/dsa/sja1105/sja1105_devlink.c | 12 ++-----
.../net/ethernet/broadcom/bnxt/bnxt_devlink.c | 4 ---
.../freescale/dpaa2/dpaa2-eth-devlink.c | 11 +-----
.../ethernet/fungible/funeth/funeth_devlink.c | 7 ----
.../hisilicon/hns3/hns3pf/hclge_devlink.c | 5 ---
.../hisilicon/hns3/hns3vf/hclgevf_devlink.c | 5 ---
drivers/net/ethernet/intel/ice/ice_devlink.c | 6 ----
.../marvell/octeontx2/af/rvu_devlink.c | 7 ----
.../marvell/octeontx2/nic/otx2_devlink.c | 15 --------
.../marvell/prestera/prestera_devlink.c | 5 ---
.../net/ethernet/mellanox/mlx5/core/devlink.c | 4 ---
drivers/net/ethernet/mellanox/mlxsw/core.c | 3 +-
drivers/net/ethernet/mellanox/mlxsw/minimal.c | 2 +-
.../net/ethernet/netronome/nfp/nfp_devlink.c | 4 ---
.../ethernet/pensando/ionic/ionic_devlink.c | 4 ---
drivers/net/ethernet/qlogic/qed/qed_devlink.c | 4 ---
drivers/net/netdevsim/dev.c | 3 --
drivers/ptp/ptp_ocp.c | 4 ---
include/net/devlink.h | 2 --
net/core/devlink.c | 35 ++++++++++++-------
23 files changed, 29 insertions(+), 127 deletions(-)
--
2.37.4
next prev parent reply other threads:[~2022-11-27 8:16 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-22 15:49 [RFC PATCH] net: devlink: devlink_nl_info_fill: populate default information Vincent Mailhol
2022-11-23 4:12 ` Jakub Kicinski
2022-11-23 9:42 ` Vincent MAILHOL
2022-11-24 3:06 ` Jakub Kicinski
2022-11-24 5:33 ` Vincent MAILHOL
2022-11-24 8:53 ` Jiri Pirko
2022-11-28 18:43 ` Jakub Kicinski
2022-11-28 23:14 ` Vincent MAILHOL
2022-11-23 9:46 ` Jiri Pirko
2022-11-23 11:00 ` Vincent MAILHOL
2022-11-23 12:10 ` Jiri Pirko
2022-11-23 16:08 ` Vincent MAILHOL
2022-11-23 16:26 ` Jiri Pirko
2022-11-24 16:20 ` Vincent MAILHOL
2022-11-27 8:15 ` Vincent Mailhol [this message]
2022-11-27 8:16 ` [PATCH net-next v2 1/5] mlxsw: minimal: fix mlxsw_m_module_get_drvinfo() to correctly report driver name Vincent Mailhol
2022-11-27 8:16 ` [PATCH net-next v2 2/5] mlxsw: core: fix mlxsw_devlink_info_get() " Vincent Mailhol
2022-11-27 8:16 ` [PATCH net-next v2 3/5] net: devlink: let the core report the driver name instead of the drivers Vincent Mailhol
2022-11-27 8:16 ` [PATCH net-next v2 4/5] net: devlink: remove devlink_info_driver_name_put() Vincent Mailhol
2022-11-27 12:01 ` kernel test robot
2022-11-27 12:11 ` kernel test robot
2022-11-27 8:16 ` [PATCH net-next v2 5/5] net: devlink: make the devlink_ops::info_get() callback optional Vincent Mailhol
2022-11-27 13:09 ` [PATCH net-next v3 0/5] net: devlink: return the driver name in devlink_nl_info_fill Vincent Mailhol
2022-11-27 13:09 ` [PATCH net-next v3 1/5] mlxsw: minimal: fix mlxsw_m_module_get_drvinfo() to correctly report driver name Vincent Mailhol
2022-11-27 16:14 ` Ido Schimmel
2022-11-27 13:09 ` [PATCH net-next v3 2/5] mlxsw: core: fix mlxsw_devlink_info_get() " Vincent Mailhol
2022-11-27 16:17 ` Ido Schimmel
2022-11-28 1:42 ` Vincent MAILHOL
2022-11-27 13:09 ` [PATCH net-next v3 3/5] net: devlink: let the core report the driver name instead of the drivers Vincent Mailhol
2022-11-27 13:09 ` [PATCH net-next v3 4/5] net: devlink: remove devlink_info_driver_name_put() Vincent Mailhol
2022-11-27 13:09 ` [PATCH net-next v3 5/5] net: devlink: make the devlink_ops::info_get() callback optional Vincent Mailhol
2022-11-28 4:15 ` [PATCH net-next v4 0/3] net: devlink: return the driver name in devlink_nl_info_fill Vincent Mailhol
2022-11-28 4:15 ` [PATCH net-next v4 1/3] net: devlink: let the core report the driver name instead of the drivers Vincent Mailhol
2022-11-28 11:49 ` Ido Schimmel
2022-11-28 4:15 ` [PATCH net-next v4 2/3] net: devlink: remove devlink_info_driver_name_put() Vincent Mailhol
2022-11-28 4:15 ` [PATCH net-next v4 3/3] net: devlink: make the devlink_ops::info_get() callback optional Vincent Mailhol
2022-11-28 18:42 ` Jakub Kicinski
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=20221127081604.5242-1-mailhol.vincent@wanadoo.fr \
--to=mailhol.vincent@wanadoo.fr \
--cc=aelior@marvell.com \
--cc=andrew@lunn.ch \
--cc=anthony.l.nguyen@intel.com \
--cc=arno@natisbad.org \
--cc=bbrezillon@kernel.org \
--cc=davem@davemloft.net \
--cc=dmichail@fungible.com \
--cc=drivers@pensando.io \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=gakula@marvell.com \
--cc=hkelam@marvell.com \
--cc=idosch@nvidia.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=ioana.ciornei@nxp.com \
--cc=jerinj@marvell.com \
--cc=jesse.brandeburg@intel.com \
--cc=jiri@nvidia.com \
--cc=jonathan.lemon@gmail.com \
--cc=kuba@kernel.org \
--cc=kurt@linutronix.de \
--cc=lcherian@marvell.com \
--cc=leon@kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=manishc@marvell.com \
--cc=michael.chan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=oss-drivers@corigine.com \
--cc=pabeni@redhat.com \
--cc=petrm@nvidia.com \
--cc=richardcochran@gmail.com \
--cc=saeedm@nvidia.com \
--cc=salil.mehta@huawei.com \
--cc=sbhatta@marvell.com \
--cc=schalla@marvell.com \
--cc=sgoutham@marvell.com \
--cc=shalomt@mellanox.com \
--cc=simon.horman@corigine.com \
--cc=snelson@pensando.io \
--cc=tchornyi@marvell.com \
--cc=vadfed@fb.com \
--cc=vadimp@mellanox.com \
--cc=yisen.zhuang@huawei.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
all inboxes | Powered by JetHome®