History

ethtool: provide link settings with LINKINFO_GET request

Implement LINKINFO_GET netlink request to get basic link settings provided by ETHTOOL_GLINKSETTINGS and ETHTOOL_GSET ioctl commands. This request provides settings not directly related to autonegotiation and link mode selection: physical port, phy MDIO address, MDI(-X) status, MDI(-X) control and transceiver. LINKINFO_GET request can be used with NLM_F_DUMP (without device identification) to request the information for all devices in current network namespace providing the data.

Michal Kubecek committed 6 years ago

Commit 459e0b81 parent 71921699 files · +209 −51Browse files

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

Unified · Split

include/uapi/linux/ethtool_netlink.h+18−0
@@ -15,6 +15,7 @@ · 14 unmodified lines
1515 enum {
1616 ETHTOOL_MSG_USER_NONE,
1717 ETHTOOL_MSG_STRSET_GET,
18+ ETHTOOL_MSG_LINKINFO_GET,
1819
1920 /* add new constants above here */
2021 __ETHTOOL_MSG_USER_CNT,
@@ -25,6 +26,7 @@ enum { · 4 unmodified lines
2526 enum {
2627 ETHTOOL_MSG_KERNEL_NONE,
2728 ETHTOOL_MSG_STRSET_GET_REPLY,
29+ ETHTOOL_MSG_LINKINFO_GET_REPLY,
2830
2931 /* add new constants above here */
3032 __ETHTOOL_MSG_KERNEL_CNT,
@@ -141,6 +143,22 @@ enum { · 110 unmodified lines
141143 ETHTOOL_A_STRSET_MAX = __ETHTOOL_A_STRSET_CNT - 1
142144 };
143145
146+/* LINKINFO */
147+
148+enum {
149+ ETHTOOL_A_LINKINFO_UNSPEC,
150+ ETHTOOL_A_LINKINFO_HEADER, /* nest - _A_HEADER_* */
151+ ETHTOOL_A_LINKINFO_PORT, /* u8 */
152+ ETHTOOL_A_LINKINFO_PHYADDR, /* u8 */
153+ ETHTOOL_A_LINKINFO_TP_MDIX, /* u8 */
154+ ETHTOOL_A_LINKINFO_TP_MDIX_CTRL, /* u8 */
155+ ETHTOOL_A_LINKINFO_TRANSCEIVER, /* u8 */
156+
157+ /* add new constants above here */
158+ __ETHTOOL_A_LINKINFO_CNT,
159+ ETHTOOL_A_LINKINFO_MAX = __ETHTOOL_A_LINKINFO_CNT - 1
160+};
161+
144162 /* generic netlink info */
145163 #define ETHTOOL_GENL_NAME "ethtool"
146164 #define ETHTOOL_GENL_VERSION 1

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t