Skip to content

Commit 4c0b653

Browse files
bonktreedledford
authored andcommitted
Documentation/ABI: document /sys/class/net/*/dev_port
The sysfs field was introduced 4 years ago along with fixes to various drivers that erroneously used `dev_id' for that purpose, but it was not properly documented anywhere. See commit v3.14-rc3-739-g3f85944fe207. Signed-off-by: Arseny Maslennikov <ar@cs.msu.ru> Signed-off-by: Doug Ledford <dledford@redhat.com>
1 parent 0e9d2c1 commit 4c0b653

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

Documentation/ABI/testing/sysfs-class-net

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,24 @@ Description:
9191
stacked (e.g: VLAN interfaces) but still have the same MAC
9292
address as their parent device.
9393

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+
94112
What: /sys/class/net/<iface>/dormant
95113
Date: March 2006
96114
KernelVersion: 2.6.17

0 commit comments

Comments
 (0)