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
15enum {15enum {
16 ETHTOOL_MSG_USER_NONE,16 ETHTOOL_MSG_USER_NONE,
17 ETHTOOL_MSG_STRSET_GET,17 ETHTOOL_MSG_STRSET_GET,
18 ETHTOOL_MSG_LINKINFO_GET,
18 19
19 /* add new constants above here */20 /* add new constants above here */
20 __ETHTOOL_MSG_USER_CNT,21 __ETHTOOL_MSG_USER_CNT,
@@ -25,6 +26,7 @@ enum { · 4 unmodified lines
25enum {26enum {
26 ETHTOOL_MSG_KERNEL_NONE,27 ETHTOOL_MSG_KERNEL_NONE,
27 ETHTOOL_MSG_STRSET_GET_REPLY,28 ETHTOOL_MSG_STRSET_GET_REPLY,
29 ETHTOOL_MSG_LINKINFO_GET_REPLY,
28 30
29 /* add new constants above here */31 /* add new constants above here */
30 __ETHTOOL_MSG_KERNEL_CNT,32 __ETHTOOL_MSG_KERNEL_CNT,
@@ -141,6 +143,22 @@ enum { · 110 unmodified lines
141 ETHTOOL_A_STRSET_MAX = __ETHTOOL_A_STRSET_CNT - 1143 ETHTOOL_A_STRSET_MAX = __ETHTOOL_A_STRSET_CNT - 1
142};144};
143 145
146/* LINKINFO */
147
148enum {
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
144/* generic netlink info */162/* generic netlink info */
145#define ETHTOOL_GENL_NAME "ethtool"163#define ETHTOOL_GENL_NAME "ethtool"
146#define ETHTOOL_GENL_VERSION 1164#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