hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/Documentation/ABI/testing/sysfs-class-net
....@@ -4,10 +4,13 @@
44 Contact: netdev@vger.kernel.org
55 Description:
66 Indicates the name assignment type. Possible values are:
7
- 1: enumerated by the kernel, possibly in an unpredictable way
8
- 2: predictably named by the kernel
9
- 3: named by userspace
10
- 4: renamed
7
+
8
+ == ==========================================================
9
+ 1 enumerated by the kernel, possibly in an unpredictable way
10
+ 2 predictably named by the kernel
11
+ 3 named by userspace
12
+ 4 renamed
13
+ == ==========================================================
1114
1215 What: /sys/class/net/<iface>/addr_assign_type
1316 Date: July 2010
....@@ -15,10 +18,13 @@
1518 Contact: netdev@vger.kernel.org
1619 Description:
1720 Indicates the address assignment type. Possible values are:
18
- 0: permanent address
19
- 1: randomly generated
20
- 2: stolen from another device
21
- 3: set using dev_set_mac_address
21
+
22
+ == =============================
23
+ 0 permanent address
24
+ 1 randomly generated
25
+ 2 stolen from another device
26
+ 3 set using dev_set_mac_address
27
+ == =============================
2228
2329 What: /sys/class/net/<iface>/addr_len
2430 Date: April 2005
....@@ -51,9 +57,12 @@
5157 Default value 0 does not forward any link local frames.
5258
5359 Restricted bits:
54
- 0: 01-80-C2-00-00-00 Bridge Group Address used for STP
55
- 1: 01-80-C2-00-00-01 (MAC Control) 802.3 used for MAC PAUSE
56
- 2: 01-80-C2-00-00-02 (Link Aggregation) 802.3ad
60
+
61
+ == ========================================================
62
+ 0 01-80-C2-00-00-00 Bridge Group Address used for STP
63
+ 1 01-80-C2-00-00-01 (MAC Control) 802.3 used for MAC PAUSE
64
+ 2 01-80-C2-00-00-02 (Link Aggregation) 802.3ad
65
+ == ========================================================
5766
5867 Any values not setting these bits can be used. Take special
5968 care when forwarding control frames e.g. 802.1X-PAE or LLDP.
....@@ -74,8 +83,11 @@
7483 Description:
7584 Indicates the current physical link state of the interface.
7685 Posssible values are:
77
- 0: physical link is down
78
- 1: physical link is up
86
+
87
+ == =====================
88
+ 0 physical link is down
89
+ 1 physical link is up
90
+ == =====================
7991
8092 Note: some special devices, e.g: bonding and team drivers will
8193 allow this attribute to be written to force a link state for
....@@ -90,6 +102,24 @@
90102 value. This is used to disambiguate interfaces which might be
91103 stacked (e.g: VLAN interfaces) but still have the same MAC
92104 address as their parent device.
105
+
106
+What: /sys/class/net/<iface>/dev_port
107
+Date: February 2014
108
+KernelVersion: 3.15
109
+Contact: netdev@vger.kernel.org
110
+Description:
111
+ Indicates the port number of this network device, formatted
112
+ as a decimal value. Some NICs have multiple independent ports
113
+ on the same PCI bus, device and function. This attribute allows
114
+ userspace to distinguish the respective interfaces.
115
+
116
+ Note: some device drivers started to use 'dev_id' for this
117
+ purpose since long before 3.15 and have not adopted the new
118
+ attribute ever since. To query the port number, some tools look
119
+ exclusively at 'dev_port', while others only consult 'dev_id'.
120
+ If a network device has multiple client adapter ports as
121
+ described in the previous paragraph and does not set this
122
+ attribute to its port number, it's a kernel bug.
93123
94124 What: /sys/class/net/<iface>/dormant
95125 Date: March 2006
....@@ -106,18 +136,37 @@
106136 authentication is performed (e.g: 802.1x). 'link_mode' attribute
107137 will also reflect the dormant state.
108138
109
-What: /sys/clas/net/<iface>/duplex
139
+What: /sys/class/net/<iface>/testing
140
+Date: April 2002
141
+KernelVersion: 5.8
142
+Contact: netdev@vger.kernel.org
143
+Description:
144
+ Indicates whether the interface is under test. Possible
145
+ values are:
146
+
147
+ == =============================
148
+ 0 interface is not being tested
149
+ 1 interface is being tested
150
+ == =============================
151
+
152
+ When an interface is under test, it cannot be expected
153
+ to pass packets as normal.
154
+
155
+What: /sys/class/net/<iface>/duplex
110156 Date: October 2009
111157 KernelVersion: 2.6.33
112158 Contact: netdev@vger.kernel.org
113159 Description:
114160 Indicates the interface latest or current duplex value. Possible
115161 values are:
116
- half: half duplex
117
- full: full duplex
162
+
163
+ ==== ===========
164
+ half half duplex
165
+ full full duplex
166
+ ==== ===========
118167
119168 Note: This attribute is only valid for interfaces that implement
120
- the ethtool get_settings method (mostly Ethernet).
169
+ the ethtool get_link_ksettings method (mostly Ethernet).
121170
122171 What: /sys/class/net/<iface>/flags
123172 Date: April 2005
....@@ -165,8 +214,11 @@
165214 Indicates the interface link mode, as a decimal number. This
166215 attribute should be used in conjunction with 'dormant' attribute
167216 to determine the interface usability. Possible values:
168
- 0: default link mode
169
- 1: dormant link mode
217
+
218
+ == =================
219
+ 0 default link mode
220
+ 1 dormant link mode
221
+ == =================
170222
171223 What: /sys/class/net/<iface>/mtu
172224 Date: April 2005
....@@ -195,7 +247,9 @@
195247 Contact: netdev@vger.kernel.org
196248 Description:
197249 Indicates the interface RFC2863 operational state as a string.
250
+
198251 Possible values are:
252
+
199253 "unknown", "notpresent", "down", "lowerlayerdown", "testing",
200254 "dormant", "up".
201255
....@@ -224,7 +278,7 @@
224278 an integer representing the link speed in Mbits/sec.
225279
226280 Note: this attribute is only valid for interfaces that implement
227
- the ethtool get_settings method (mostly Ethernet ).
281
+ the ethtool get_link_ksettings method (mostly Ethernet).
228282
229283 What: /sys/class/net/<iface>/tx_queue_len
230284 Date: April 2005