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:

committed by
David S. Miller

parent
d2c4b444fd
commit
6a94b8ccf6
@@ -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
|
||||
|
@@ -20,6 +20,7 @@ enum {
|
||||
ETHTOOL_MSG_LINKMODES_GET,
|
||||
ETHTOOL_MSG_LINKMODES_SET,
|
||||
ETHTOOL_MSG_LINKSTATE_GET,
|
||||
ETHTOOL_MSG_DEBUG_GET,
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_MSG_USER_CNT,
|
||||
@@ -35,6 +36,7 @@ enum {
|
||||
ETHTOOL_MSG_LINKMODES_GET_REPLY,
|
||||
ETHTOOL_MSG_LINKMODES_NTF,
|
||||
ETHTOOL_MSG_LINKSTATE_GET_REPLY,
|
||||
ETHTOOL_MSG_DEBUG_GET_REPLY,
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_MSG_KERNEL_CNT,
|
||||
@@ -195,6 +197,18 @@ enum {
|
||||
ETHTOOL_A_LINKSTATE_MAX = __ETHTOOL_A_LINKSTATE_CNT - 1
|
||||
};
|
||||
|
||||
/* DEBUG */
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_DEBUG_UNSPEC,
|
||||
ETHTOOL_A_DEBUG_HEADER, /* nest - _A_HEADER_* */
|
||||
ETHTOOL_A_DEBUG_MSGMASK, /* bitset */
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_DEBUG_CNT,
|
||||
ETHTOOL_A_DEBUG_MAX = __ETHTOOL_A_DEBUG_CNT - 1
|
||||
};
|
||||
|
||||
/* generic netlink info */
|
||||
#define ETHTOOL_GENL_NAME "ethtool"
|
||||
#define ETHTOOL_GENL_VERSION 1
|
||||
|
Reference in New Issue
Block a user