From: Arseny Maslennikov <ar@cs.msu.ru>
To: linux-rdma@vger.kernel.org
Cc: Arseny Maslennikov <ar@cs.msu.ru>,
Doug Ledford <dledford@redhat.com>,
Jason Gunthorpe <jgg@ziepe.ca>,
netdev@vger.kernel.org
Subject: [PATCH v3 1/3] Documentation/ABI: document /sys/class/net/*/dev_port
Date: Mon, 3 Sep 2018 19:13:14 +0300 [thread overview]
Message-ID: <20180903161316.25121-2-ar@cs.msu.ru> (raw)
In-Reply-To: <20180903161316.25121-1-ar@cs.msu.ru>
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>
---
Documentation/ABI/testing/sysfs-class-net | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/Documentation/ABI/testing/sysfs-class-net b/Documentation/ABI/testing/sysfs-class-net
index 2f1788111cd9..ec2232f6a949 100644
--- a/Documentation/ABI/testing/sysfs-class-net
+++ b/Documentation/ABI/testing/sysfs-class-net
@@ -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
--
2.19.0.rc1
next prev parent reply other threads:[~2018-09-03 16:13 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-03 16:13 [PATCH v3 0/3] IB/ipoib: Use dev_port to disambiguate port numbers Arseny Maslennikov
2018-09-03 16:13 ` Arseny Maslennikov [this message]
2018-09-03 16:13 ` [PATCH v3 2/3] IB/ipoib: Use dev_port to expose network interface " Arseny Maslennikov
2018-09-05 13:41 ` Leon Romanovsky
2018-09-03 16:13 ` [PATCH v3 3/3] IB/ipoib: Log sysfs 'dev_id' accesses from userspace Arseny Maslennikov
2018-09-05 13:50 ` Leon Romanovsky
2018-09-06 7:04 ` Arseny Maslennikov
2018-09-06 13:03 ` Leon Romanovsky
2018-09-07 17:14 ` Doug Ledford
2018-09-07 17:28 ` Leon Romanovsky
2018-09-07 20:02 ` Doug Ledford
2018-09-05 15:47 ` Stephen Hemminger
2018-09-06 7:26 ` Arseny Maslennikov
2018-09-06 12:56 ` Leon Romanovsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180903161316.25121-2-ar@cs.msu.ru \
--to=ar@cs.msu.ru \
--cc=dledford@redhat.com \
--cc=jgg@ziepe.ca \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox