Skip to content

Commit

Permalink
Documentation/ABI: document /sys/class/net/*/dev_port
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Arseny Maslennikov authored and Doug Ledford committed Sep 13, 2018
1 parent 0e9d2c1 commit 4c0b653
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Documentation/ABI/testing/sysfs-class-net
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,24 @@ Description:
stacked (e.g: VLAN interfaces) but still have the same MAC
address as their parent device.

What: /sys/class/net/<iface>/dev_port
Date: February 2014
KernelVersion: 3.15
Contact: netdev@vger.kernel.org
Description:
Indicates the port number of this network device, formatted
as a decimal value. Some NICs have multiple independent ports
on the same PCI bus, device and function. This attribute allows
userspace to distinguish the respective interfaces.

Note: some device drivers started to use 'dev_id' for this
purpose since long before 3.15 and have not adopted the new
attribute ever since. To query the port number, some tools look
exclusively at 'dev_port', while others only consult 'dev_id'.
If a network device has multiple client adapter ports as
described in the previous paragraph and does not set this
attribute to its port number, it's a kernel bug.

What: /sys/class/net/<iface>/dormant
Date: March 2006
KernelVersion: 2.6.17
Expand Down

0 comments on commit 4c0b653

Please sign in to comment.