Merge branch 'for-next' into for-linus
[linux-2.6-microblaze.git] / Documentation / ABI / testing / sysfs-class-net
1 What:           /sys/class/net/<iface>/name_assign_type
2 Date:           July 2014
3 KernelVersion:  3.17
4 Contact:        netdev@vger.kernel.org
5 Description:
6                 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
11
12 What:           /sys/class/net/<iface>/addr_assign_type
13 Date:           July 2010
14 KernelVersion:  3.2
15 Contact:        netdev@vger.kernel.org
16 Description:
17                 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
22
23 What:           /sys/class/net/<iface>/addr_len
24 Date:           April 2005
25 KernelVersion:  2.6.12
26 Contact:        netdev@vger.kernel.org
27 Description:
28                 Indicates the hardware address size in bytes.
29                 Values vary based on the lower-level protocol used by the
30                 interface (Ethernet, FDDI, ATM, IEEE 802.15.4...). See
31                 include/uapi/linux/if_*.h for actual values.
32
33 What:           /sys/class/net/<iface>/address
34 Date:           April 2005
35 KernelVersion:  2.6.12
36 Contact:        netdev@vger.kernel.org
37 Description:
38                 Hardware address currently assigned to this interface.
39                 Format is a string, e.g: 00:11:22:33:44:55 for an Ethernet MAC
40                 address.
41
42 What:           /sys/class/net/<bridge iface>/bridge/group_fwd_mask
43 Date:           January 2012
44 KernelVersion:  3.2
45 Contact:        netdev@vger.kernel.org
46 Description:
47                 Bitmask to allow forwarding of link local frames with address
48                 01-80-C2-00-00-0X on a bridge device. Only values that set bits
49                 not matching BR_GROUPFWD_RESTRICTED in net/bridge/br_private.h
50                 allowed.
51                 Default value 0 does not forward any link local frames.
52
53                 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
57
58                 Any values not setting these bits can be used. Take special
59                 care when forwarding control frames e.g. 802.1X-PAE or LLDP.
60
61 What:           /sys/class/net/<iface>/broadcast
62 Date:           April 2005
63 KernelVersion:  2.6.12
64 Contact:        netdev@vger.kernel.org
65 Description:
66                 Hardware broadcast address for this interface. Format is a
67                 string, e.g: ff:ff:ff:ff:ff:ff for an Ethernet broadcast MAC
68                 address.
69
70 What:           /sys/class/net/<iface>/carrier
71 Date:           April 2005
72 KernelVersion:  2.6.12
73 Contact:        netdev@vger.kernel.org
74 Description:
75                 Indicates the current physical link state of the interface.
76                 Posssible values are:
77                 0: physical link is down
78                 1: physical link is up
79
80                 Note: some special devices, e.g: bonding and team drivers will
81                 allow this attribute to be written to force a link state for
82                 operating correctly and designating another fallback interface.
83
84 What:           /sys/class/net/<iface>/dev_id
85 Date:           April 2008
86 KernelVersion:  2.6.26
87 Contact:        netdev@vger.kernel.org
88 Description:
89                 Indicates the device unique identifier. Format is an hexadecimal
90                 value. This is used to disambiguate interfaces which might be
91                 stacked (e.g: VLAN interfaces) but still have the same MAC
92                 address as their parent device.
93
94 What:           /sys/class/net/<iface>/dev_port
95 Date:           February 2014
96 KernelVersion:  3.15
97 Contact:        netdev@vger.kernel.org
98 Description:
99                 Indicates the port number of this network device, formatted
100                 as a decimal value. Some NICs have multiple independent ports
101                 on the same PCI bus, device and function. This attribute allows
102                 userspace to distinguish the respective interfaces.
103
104                 Note: some device drivers started to use 'dev_id' for this
105                 purpose since long before 3.15 and have not adopted the new
106                 attribute ever since. To query the port number, some tools look
107                 exclusively at 'dev_port', while others only consult 'dev_id'.
108                 If a network device has multiple client adapter ports as
109                 described in the previous paragraph and does not set this
110                 attribute to its port number, it's a kernel bug.
111
112 What:           /sys/class/net/<iface>/dormant
113 Date:           March 2006
114 KernelVersion:  2.6.17
115 Contact:        netdev@vger.kernel.org
116 Description:
117                 Indicates whether the interface is in dormant state. Possible
118                 values are:
119                 0: interface is not dormant
120                 1: interface is dormant
121
122                 This attribute can be used by supplicant software to signal that
123                 the device is not usable unless some supplicant-based
124                 authentication is performed (e.g: 802.1x). 'link_mode' attribute
125                 will also reflect the dormant state.
126
127 What:           /sys/class/net/<iface>/testing
128 Date:           April 2002
129 KernelVersion:  5.8
130 Contact:        netdev@vger.kernel.org
131 Description:
132                 Indicates whether the interface is under test. Possible
133                 values are:
134                 0: interface is not being tested
135                 1: interface is being tested
136
137                 When an interface is under test, it cannot be expected
138                 to pass packets as normal.
139
140 What:           /sys/clas/net/<iface>/duplex
141 Date:           October 2009
142 KernelVersion:  2.6.33
143 Contact:        netdev@vger.kernel.org
144 Description:
145                 Indicates the interface latest or current duplex value. Possible
146                 values are:
147                 half: half duplex
148                 full: full duplex
149
150                 Note: This attribute is only valid for interfaces that implement
151                 the ethtool get_link_ksettings method (mostly Ethernet).
152
153 What:           /sys/class/net/<iface>/flags
154 Date:           April 2005
155 KernelVersion:  2.6.12
156 Contact:        netdev@vger.kernel.org
157 Description:
158                 Indicates the interface flags as a bitmask in hexadecimal. See
159                 include/uapi/linux/if.h for a list of all possible values and
160                 the flags semantics.
161
162 What:           /sys/class/net/<iface>/ifalias
163 Date:           September 2008
164 KernelVersion:  2.6.28
165 Contact:        netdev@vger.kernel.org
166 Description:
167                 Indicates/stores an interface alias name as a string. This can
168                 be used for system management purposes.
169
170 What:           /sys/class/net/<iface>/ifindex
171 Date:           April 2005
172 KernelVersion:  2.6.12
173 Contact:        netdev@vger.kernel.org
174 Description:
175                 Indicates the system-wide interface unique index identifier as a
176                 decimal number. This attribute is used for mapping an interface
177                 identifier to an interface name. It is used throughout the
178                 networking stack for specifying the interface specific
179                 requests/events.
180
181 What:           /sys/class/net/<iface>/iflink
182 Date:           April 2005
183 KernelVersion:  2.6.12
184 Contact:        netdev@vger.kernel.org
185 Description:
186                 Indicates the system-wide interface unique index identifier a
187                 the interface is linked to. Format is decimal. This attribute is
188                 used to resolve interfaces chaining, linking and stacking.
189                 Physical interfaces have the same 'ifindex' and 'iflink' values.
190
191 What:           /sys/class/net/<iface>/link_mode
192 Date:           March 2006
193 KernelVersion:  2.6.17
194 Contact:        netdev@vger.kernel.org
195 Description:
196                 Indicates the interface link mode, as a decimal number. This
197                 attribute should be used in conjunction with 'dormant' attribute
198                 to determine the interface usability. Possible values:
199                 0: default link mode
200                 1: dormant link mode
201
202 What:           /sys/class/net/<iface>/mtu
203 Date:           April 2005
204 KernelVersion:  2.6.12
205 Contact:        netdev@vger.kernel.org
206 Description:
207                 Indicates the interface currently configured MTU value, in
208                 bytes, and in decimal format. Specific values depends on the
209                 lower-level interface protocol used. Ethernet devices will show
210                 a 'mtu' attribute value of 1500 unless changed.
211
212 What:           /sys/class/net/<iface>/netdev_group
213 Date:           January 2011
214 KernelVersion:  2.6.39
215 Contact:        netdev@vger.kernel.org
216 Description:
217                 Indicates the interface network device group, as a decimal
218                 integer. Default value is 0 which corresponds to the initial
219                 network devices group. The group can be changed to affect
220                 routing decisions (see: net/ipv4/fib_rules and
221                 net/ipv6/fib6_rules.c).
222
223 What:           /sys/class/net/<iface>/operstate
224 Date:           March 2006
225 KernelVersion:  2.6.17
226 Contact:        netdev@vger.kernel.org
227 Description:
228                 Indicates the interface RFC2863 operational state as a string.
229                 Possible values are:
230                 "unknown", "notpresent", "down", "lowerlayerdown", "testing",
231                 "dormant", "up".
232
233 What:           /sys/class/net/<iface>/phys_port_id
234 Date:           July 2013
235 KernelVersion:  3.12
236 Contact:        netdev@vger.kernel.org
237 Description:
238                 Indicates the interface unique physical port identifier within
239                 the NIC, as a string.
240
241 What:           /sys/class/net/<iface>/phys_port_name
242 Date:           March 2015
243 KernelVersion:  4.0
244 Contact:        netdev@vger.kernel.org
245 Description:
246                 Indicates the interface physical port name within the NIC,
247                 as a string.
248
249 What:           /sys/class/net/<iface>/speed
250 Date:           October 2009
251 KernelVersion:  2.6.33
252 Contact:        netdev@vger.kernel.org
253 Description:
254                 Indicates the interface latest or current speed value. Value is
255                 an integer representing the link speed in Mbits/sec.
256
257                 Note: this attribute is only valid for interfaces that implement
258                 the ethtool get_link_ksettings method (mostly Ethernet).
259
260 What:           /sys/class/net/<iface>/tx_queue_len
261 Date:           April 2005
262 KernelVersion:  2.6.12
263 Contact:        netdev@vger.kernel.org
264 Description:
265                 Indicates the interface transmit queue len in number of packets,
266                 as an integer value. Value depend on the type of interface,
267                 Ethernet network adapters have a default value of 1000 unless
268                 configured otherwise
269
270 What:           /sys/class/net/<iface>/type
271 Date:           April 2005
272 KernelVersion:  2.6.12
273 Contact:        netdev@vger.kernel.org
274 Description:
275                 Indicates the interface protocol type as a decimal value. See
276                 include/uapi/linux/if_arp.h for all possible values.
277
278 What:           /sys/class/net/<iface>/phys_switch_id
279 Date:           November 2014
280 KernelVersion:  3.19
281 Contact:        netdev@vger.kernel.org
282 Description:
283                 Indicates the unique physical switch identifier of a switch this
284                 port belongs to, as a string.
285
286 What:           /sys/class/net/<iface>/phydev
287 Date:           May 2017
288 KernelVersion:  4.13
289 Contact:        netdev@vger.kernel.org
290 Description:
291                 Symbolic link to the PHY device this network device is attached
292                 to.
293
294 What:           /sys/class/net/<iface>/carrier_changes
295 Date:           Mar 2014
296 KernelVersion:  3.15
297 Contact:        netdev@vger.kernel.org
298 Description:
299                 32-bit unsigned integer counting the number of times the link has
300                 seen a change from UP to DOWN and vice versa
301
302 What:           /sys/class/net/<iface>/carrier_up_count
303 Date:           Jan 2018
304 KernelVersion:  4.16
305 Contact:        netdev@vger.kernel.org
306 Description:
307                 32-bit unsigned integer counting the number of times the link has
308                 been up
309
310 What:           /sys/class/net/<iface>/carrier_down_count
311 Date:           Jan 2018
312 KernelVersion:  4.16
313 Contact:        netdev@vger.kernel.org
314 Description:
315                 32-bit unsigned integer counting the number of times the link has
316                 been down