mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-07-12 00:43:36 -04:00
ethtool: provide link mode names as a string set
Unlike e.g. netdev features, the ethtool ioctl interface requires link mode table to be in sync between kernel and userspace for userspace to be able to display and set all link modes supported by kernel. The way arbitrary length bitsets are implemented in netlink interface, this will be no longer needed. To allow userspace to access all link modes running kernel supports, add table of ethernet link mode names and make it available as a string set to userspace GET_STRSET requests. Add build time check to make sure names are defined for all modes declared in enum ethtool_link_mode_bit_indices. Once the string set is available, make it also accessible via ioctl. Signed-off-by: Michal Kubecek <mkubecek@suse.cz> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Jiri Pirko <jiri@mellanox.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
d44e13108b
commit
428c122f5f
4 changed files with 99 additions and 0 deletions
|
@ -593,6 +593,7 @@ struct ethtool_pauseparam {
|
|||
* @ETH_SS_RSS_HASH_FUNCS: RSS hush function names
|
||||
* @ETH_SS_PHY_STATS: Statistic names, for use with %ETHTOOL_GPHYSTATS
|
||||
* @ETH_SS_PHY_TUNABLES: PHY tunable names
|
||||
* @ETH_SS_LINK_MODES: link mode names
|
||||
*/
|
||||
enum ethtool_stringset {
|
||||
ETH_SS_TEST = 0,
|
||||
|
@ -604,6 +605,7 @@ enum ethtool_stringset {
|
|||
ETH_SS_TUNABLES,
|
||||
ETH_SS_PHY_STATS,
|
||||
ETH_SS_PHY_TUNABLES,
|
||||
ETH_SS_LINK_MODES,
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue