Files
lkl_linux/include/linux
Vincent Mailhol f20a0a0519 ethtool: doc: clarify what drivers can implement in their get_drvinfo()
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.

In struct ethtool_ops doc from linux/ethtool: rephrase field
get_drvinfo() doc to discourage developers from implementing this
callback.

In struct ethtool_drvinfo doc from uapi/linux/ethtool.h: remove the
paragraph mentioning what drivers should do. Rationale: no need to
repeat what is already written in struct ethtool_ops doc. But add a
note that .fw_version and .erom_version are driver defined.

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 6a7e25c7fb ("net/core: Replace driver version to be
    kernel version")
Link: https://git.kernel.org/torvalds/linux/c/6a7e25c7fb48

[2] commit edaf5df22c ("ethtool: ethtool_get_drvinfo: populate
    drvinfo fields even if callback exits")
Link: https://git.kernel.org/netdev/net-next/c/edaf5df22cb8

Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Link: https://lore.kernel.org/r/20221116171828.4093-1-mailhol.vincent@wanadoo.fr
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2022-11-17 19:26:02 -08:00
..
2022-10-27 13:23:43 +02:00
2022-11-07 14:00:27 +01:00
2022-09-21 11:18:28 +09:00
2022-09-26 12:19:12 -07:00
2022-11-03 23:09:40 -07:00
2022-09-26 19:46:29 -07:00
2022-09-26 10:13:13 -07:00
2022-09-26 10:13:13 -07:00
2022-09-15 09:32:06 -07:00
2022-09-26 10:13:14 -07:00
2022-10-17 13:49:45 +02:00
2022-08-31 14:57:28 +01:00
2022-10-03 14:02:45 -07:00
2022-08-16 12:46:26 +02:00
2022-11-11 18:18:05 -08:00
2022-09-01 18:04:43 +02:00
2022-09-08 12:59:00 -06:00
2022-09-26 13:31:20 +02:00
2022-09-01 18:08:44 +02:00
2022-10-03 14:03:19 -07:00
2022-11-09 19:28:49 -08:00
2022-09-26 19:46:18 -07:00
2022-10-03 14:03:19 -07:00
2022-08-02 12:34:04 -04:00
2022-09-01 17:39:49 -04:00
2022-08-22 14:26:30 +01:00
2022-08-09 14:11:34 -04:00
2022-10-03 17:34:32 -07:00
2022-09-26 19:46:27 -07:00
2022-09-26 19:46:09 -07:00
2022-10-17 16:32:05 +02:00
2022-10-04 20:52:38 +02:00
2022-10-11 17:42:58 -06:00
2022-09-19 06:17:05 -07:00
2022-10-11 17:42:58 -06:00
2022-11-11 18:18:05 -08:00
2022-09-07 12:42:25 +01:00
2022-09-29 15:20:29 +02:00
2022-09-22 16:12:34 +02:00
2022-09-22 16:12:34 +02:00
2022-08-31 13:37:32 +02:00
2022-09-16 10:56:08 +01:00
2022-08-28 16:52:28 +01:00
2022-10-07 09:32:40 -04:00
2022-11-10 12:03:36 -07:00
2022-09-26 19:46:18 -07:00
2022-09-26 19:46:18 -07:00
2022-09-28 10:00:16 +02:00