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
@@ -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