Skip to content

IB/ipoib: Use dev_port to disambiguate port numbers

Arseny Maslennikov linux-rdma netdev 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest3 patches 7 repliesIn review
  2. v33 patches 10 repliesSuperseded
  3. v22 patches 3 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v13 patches3 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3Documentation/ABI: document /sys/class/net/*/dev_portDocumentation/ABI/testing/sysfs-class-net+18 -00 replies
2/3IB/ipoib: Use dev_port to expose network interface port numbersdrivers/infiniband/ulp/ipoib/ipoib_main.c+2 -00 replies
3/3IB/ipoib: Log sysfs 'dev_id' accesses from userspacedrivers/infiniband/ulp/ipoib/ipoib_main.c+31 -06 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH v4 0/3] IB/ipoib: Use dev_port to disambiguate port numbers

Pre-3.15 userspace had trouble distinguishing different ports of a NIC on a single PCI bus/device/function. To solve this, a sysfs field `dev_port' was introduced quite a while ago (commit v3.14-rc3-739-g3f85944fe207), and some relevant device drivers were fixed to use it, but not in case of IPoIB.

The convention for some reason never got documented in the kernel, but was immediately adopted by userspace (notably udev[1][2], biosdevname[3])

1/3 documents the sysfs field — that's why I'm CC-ing netdev.

This series was tested on and applies to 4.19-rc2.

[1] https://lists.freedesktop.org/archives/systemd-devel/2014-June/020788.html
[2] https://lists.freedesktop.org/archives/systemd-devel/2014-July/020804.html
[3] https://github.com/CloudAutomationNTools/biosdevname/blob/c795d51dd93a5309652f0d635f12a3ecfabfaa72/src/eths.c#L38

v1->v2: replace a line instead of inserting and then removing. v2->v3: restore both attributes, output a notice of deprecation to kmsg. v3->v4: style adjustments, join the deprecation notice to single line.

Arseny Maslennikov (3):
Documentation/ABI: document /sys/class/net/*/dev_port IB/ipoib: Use dev_port to expose network interface port numbers IB/ipoib: Log sysfs 'dev_id' accesses from userspace

 Documentation/ABI/testing/sysfs-class-net | 18 +++++++++++++
 drivers/infiniband/ulp/ipoib/ipoib_main.c | 33 +++++++++++++++++++++++
 2 files changed, 51 insertions(+)
Signature · 1 line
2.19.0.rc2