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
3636 ETHTOOL_MSG_COALESCE_SET,
3737 ETHTOOL_MSG_PAUSE_GET,
3838 ETHTOOL_MSG_PAUSE_SET,
39+ ETHTOOL_MSG_EEE_GET,
3940
4041 /* add new constants above here */
4142 __ETHTOOL_MSG_USER_CNT,
@@ -68,6 +69,7 @@ enum { · 26 unmodified lines
6869 ETHTOOL_MSG_COALESCE_NTF,
6970 ETHTOOL_MSG_PAUSE_GET_REPLY,
7071 ETHTOOL_MSG_PAUSE_NTF,
72+ ETHTOOL_MSG_EEE_GET_REPLY,
7173
7274 /* add new constants above here */
7375 __ETHTOOL_MSG_KERNEL_CNT,
@@ -365,6 +367,23 @@ enum { · 291 unmodified lines
365367 ETHTOOL_A_PAUSE_MAX = (__ETHTOOL_A_PAUSE_CNT - 1)
366368 };
367369
370+/* EEE */
371+
372+enum {
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+
368387 /* generic netlink info */
369388 #define ETHTOOL_GENL_NAME "ethtool"
370389 #define ETHTOOL_GENL_VERSION 1