History

ethtool: provide EEE settings with EEE_GET request

Implement EEE_GET request to get EEE settings of a network device. These are traditionally available via ETHTOOL_GEEE ioctl request. The netlink interface allows reporting EEE status for all link modes supported by kernel but only first 32 link modes are provided at the moment as only those are reported by the ethtool_ops callback and drivers. v2: fix alignment (whitespace only)

Michal Kubecek committed 6 years ago

Commit b7eeefe1 parent bf37faa6 files · +192 −2Browse files

Showing the changes to include/uapi (1 of 6 files). Show all

Unified · Split

include/uapi/linux/ethtool_netlink.h+19−0
@@ -36,6 +36,7 @@ enum { · 35 unmodified lines
36 ETHTOOL_MSG_COALESCE_SET,36 ETHTOOL_MSG_COALESCE_SET,
37 ETHTOOL_MSG_PAUSE_GET,37 ETHTOOL_MSG_PAUSE_GET,
38 ETHTOOL_MSG_PAUSE_SET,38 ETHTOOL_MSG_PAUSE_SET,
39 ETHTOOL_MSG_EEE_GET,
39 40
40 /* add new constants above here */41 /* add new constants above here */
41 __ETHTOOL_MSG_USER_CNT,42 __ETHTOOL_MSG_USER_CNT,
@@ -68,6 +69,7 @@ enum { · 26 unmodified lines
68 ETHTOOL_MSG_COALESCE_NTF,69 ETHTOOL_MSG_COALESCE_NTF,
69 ETHTOOL_MSG_PAUSE_GET_REPLY,70 ETHTOOL_MSG_PAUSE_GET_REPLY,
70 ETHTOOL_MSG_PAUSE_NTF,71 ETHTOOL_MSG_PAUSE_NTF,
72 ETHTOOL_MSG_EEE_GET_REPLY,
71 73
72 /* add new constants above here */74 /* add new constants above here */
73 __ETHTOOL_MSG_KERNEL_CNT,75 __ETHTOOL_MSG_KERNEL_CNT,
@@ -365,6 +367,23 @@ enum { · 291 unmodified lines
365 ETHTOOL_A_PAUSE_MAX = (__ETHTOOL_A_PAUSE_CNT - 1)367 ETHTOOL_A_PAUSE_MAX = (__ETHTOOL_A_PAUSE_CNT - 1)
366};368};
367 369
370/* EEE */
371
372enum {
373 ETHTOOL_A_EEE_UNSPEC,
374 ETHTOOL_A_EEE_HEADER, /* nest - _A_HEADER_* */
375 ETHTOOL_A_EEE_MODES_OURS, /* bitset */
376 ETHTOOL_A_EEE_MODES_PEER, /* bitset */
377 ETHTOOL_A_EEE_ACTIVE, /* u8 */
378 ETHTOOL_A_EEE_ENABLED, /* u8 */
379 ETHTOOL_A_EEE_TX_LPI_ENABLED, /* u8 */
380 ETHTOOL_A_EEE_TX_LPI_TIMER, /* u32 */
381
382 /* add new constants above here */
383 __ETHTOOL_A_EEE_CNT,
384 ETHTOOL_A_EEE_MAX = (__ETHTOOL_A_EEE_CNT - 1)
385};
386
368/* generic netlink info */387/* generic netlink info */
369#define ETHTOOL_GENL_NAME "ethtool"388#define ETHTOOL_GENL_NAME "ethtool"
370#define ETHTOOL_GENL_VERSION 1389#define ETHTOOL_GENL_VERSION 1