From: Leon Romanovsky <leonro@mellanox.com>
To: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, Andrew Lunn <andrew@lunn.ch>,
Oleksij Rempel <linux@rempel-privat.de>,
Dan Williams <dan.j.williams@intel.com>,
Petr Machata <petrm@nvidia.com>,
Hao Chen <chenhao288@hisilicon.com>,
Amit Cohen <amcohen@nvidia.com>,
"Gustavo A. R. Silva" <gustavoars@kernel.org>,
Sean Anderson <sean.anderson@seco.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v2] ethtool: doc: clarify what drivers can implement in their get_drvinfo()
Date: Sun, 13 Nov 2022 09:58:32 +0200 [thread overview]
Message-ID: <Y3CjqItztf/XcIIz@unreal> (raw)
In-Reply-To: <20221111064054.371965-1-mailhol.vincent@wanadoo.fr>
On Fri, Nov 11, 2022 at 03:40:54PM +0900, Vincent Mailhol wrote:
> Many of the drivers which implement ethtool_ops::get_drvinfo() will
> prints the .driver, .version or .bus_info of struct ethtool_drvinfo.
> To have a glance of current state, do:
>
> $ git grep -W "get_drvinfo(struct"
>
> Printing in those three fields is useless because:
>
> - since [1], the driver version should be the kernel version (at
> least for upstream drivers). Arguably, out of tree drivers might
> still want to set a custom version, but out of tree is not our
> focus.
>
> - since [2], the core is able to provide default values for .driver
> and .bus_info.
>
> In summary, drivers may provide @fw_version and @erom_version, the
> rest is expected to be done by the core. Update the doc to reflect the
> facts.
>
> Also update the dummy driver and simply remove the callback in order
> not to confuse the newcomers: most of the drivers will not need this
> callback function any more.
>
> [1] commit 6a7e25c7fb48 ("net/core: Replace driver version to be
> kernel version")
> Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6a7e25c7fb482dba3e80fec953f1907bcb24d52c
>
> [2] commit edaf5df22cb8 ("ethtool: ethtool_get_drvinfo: populate
> drvinfo fields even if callback exits")
> Link: https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=edaf5df22cb8e7e849773ce69fcc9bc20ca92160
>
> CC: Leon Romanovsky <leonro@mellanox.com>
> Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
> ---
> Arguably, dummy.c is code and not documentation, but for me, it makes
> sense to treat it as documentation, thus I am putting everything in
> one single patch.
If to judge by newcomers submissions, many of them don't read documentation.
Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
next prev parent reply other threads:[~2022-11-13 7:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-11 3:08 [PATCH] ethtool: doc: clarify what drivers can implement in their get_drvinfo() Vincent Mailhol
2022-11-11 6:40 ` [PATCH net-next v2] " Vincent Mailhol
2022-11-13 7:58 ` Leon Romanovsky [this message]
2022-11-13 8:34 ` [PATCH net-next v3] " Vincent Mailhol
2022-11-15 5:27 ` Jakub Kicinski
2022-11-15 7:52 ` Vincent MAILHOL
2022-11-15 16:28 ` Jakub Kicinski
2022-11-16 0:30 ` Vincent MAILHOL
2022-11-16 4:34 ` Vincent MAILHOL
2022-11-16 17:18 ` [PATCH v5] " Vincent Mailhol
2022-11-18 4:50 ` patchwork-bot+netdevbpf
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=Y3CjqItztf/XcIIz@unreal \
--to=leonro@mellanox.com \
--cc=amcohen@nvidia.com \
--cc=andrew@lunn.ch \
--cc=chenhao288@hisilicon.com \
--cc=dan.j.williams@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gustavoars@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rempel-privat.de \
--cc=mailhol.vincent@wanadoo.fr \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=petrm@nvidia.com \
--cc=sean.anderson@seco.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).