ethtool: provide message mask with DEBUG_GET request

Implement DEBUG_GET request to get debugging settings for a device. At the
moment, only message mask corresponding to message level as reported by
ETHTOOL_GMSGLVL ioctl request is provided. (It is called message level in
ioctl interface but almost all drivers interpret it as a bit mask.)

As part of the implementation, provide symbolic names for message mask bits
as ETH_SS_MSG_CLASSES string set.

Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Michal Kubecek
2020-01-26 23:11:04 +01:00
committed by David S. Miller
parent d2c4b444fd
commit 6a94b8ccf6
11 changed files with 205 additions and 17 deletions

View File

@@ -594,6 +594,7 @@ struct ethtool_pauseparam {
* @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
* @ETH_SS_MSG_CLASSES: debug message class names
*/
enum ethtool_stringset {
ETH_SS_TEST = 0,
@@ -606,6 +607,7 @@ enum ethtool_stringset {
ETH_SS_PHY_STATS,
ETH_SS_PHY_TUNABLES,
ETH_SS_LINK_MODES,
ETH_SS_MSG_CLASSES,
/* add new constants above here */
ETH_SS_COUNT