[PATCH 2/3] IB/ipoib: Stop using dev_id to expose port numbers

2018-08-13 Thread Arseny Maslennikov
port number through sysfs'. I would be OK with this commit not being backported to stable, since it might break admin-supplied udev rules and the likes. Signed-off-by: Arseny Maslennikov --- drivers/infiniband/ulp/ipoib/ipoib_main.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers

[PATCH 3/3] Documentation/ABI: document /sys/class/net/*/dev_port

2018-08-13 Thread Arseny Maslennikov
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 --- Documentation/ABI/testing/sysfs-class-net

[PATCH 0/3] net, IB/ipoib: Use dev_port to disambiguate

2018-08-13 Thread Arseny Maslennikov
/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 Arseny Maslennikov (3): IB/ipoib: Use dev_port to expose

[PATCH 1/3] IB/ipoib: Use dev_port to expose network interface port numbers

2018-08-13 Thread Arseny Maslennikov
ago. See 76a066f2a2a0268b565459c417b59724b5a3197b, commit message: `net/mlx4_en: Expose port number through sysfs'. Signed-off-by: Arseny Maslennikov --- drivers/infiniband/ulp/ipoib/ipoib_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b

Re: [PATCH 2/3] IB/ipoib: Stop using dev_id to expose port numbers

2018-08-13 Thread Arseny Maslennikov
On Mon, Aug 13, 2018 at 03:40:20PM +0300, Yuval Shaia wrote: > On Mon, Aug 13, 2018 at 02:42:23PM +0300, Arseny Maslennikov wrote: > > Some InfiniBand network devices have multiple ports on the same PCI > > function. Prior to this the kernel erroneously used the `dev_id' sysfs >

[PATCH 3/3] Documentation/ABI: document /sys/class/net/*/dev_port

2018-08-28 Thread Arseny Maslennikov
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 --- Documentation/ABI/testing/sysfs-class-net

[PATCH 1/3] IB/ipoib: Use dev_port to expose network interface port numbers

2018-08-28 Thread Arseny Maslennikov
ago. See 76a066f2a2a0268b565459c417b59724b5a3197b, commit message: `net/mlx4_en: Expose port number through sysfs'. Signed-off-by: Arseny Maslennikov --- drivers/infiniband/ulp/ipoib/ipoib_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b

[PATCH 2/3] IB/ipoib: Stop using dev_id to expose port numbers

2018-08-28 Thread Arseny Maslennikov
port number through sysfs'. This commit is separated from the previous one since we may wish to preserve backwards compatibility with userspace being already dependent on `dev_id' being different. Signed-off-by: Arseny Maslennikov --- drivers/infiniband/ulp/ipoib/ipoib_main.c | 1 - 1 file

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

2018-08-28 Thread Arseny Maslennikov
/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 Arseny Maslennikov (3): IB/ipoib: Use dev_port to expose

[PATCH v2 1/2] IB/ipoib: Use dev_port to expose network interface port numbers

2018-08-30 Thread Arseny Maslennikov
/mlx4_en and many other drivers, which started exporting this information through `dev_id' before 3.15, were accepted into the kernel 4 years ago. See 76a066f2a2a0 (`net/mlx4_en: Expose port number through sysfs'). Signed-off-by: Arseny Maslennikov --- drivers/infiniband/ulp/ipoib/ipoib_main.c | 2

[PATCH v2 2/2] Documentation/ABI: document /sys/class/net/*/dev_port

2018-08-30 Thread Arseny Maslennikov
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 --- Documentation/ABI/testing/sysfs-class-net

[PATCH v2 0/2] IB/ipoib: Use dev_port to disambiguate port numbers

2018-08-30 Thread Arseny Maslennikov
ing and then removing. Arseny Maslennikov (2): IB/ipoib: Use dev_port to expose network interface port numbers Documentation/ABI: document /sys/class/net/*/dev_port Documentation/ABI/testing/sysfs-class-net | 10 ++ drivers/infiniband/ulp/ipoib/ipoib_main.c | 2 +- 2 files changed, 11 insertions(+)

Re: [PATCH v3 3/3] IB/ipoib: Log sysfs 'dev_id' accesses from userspace

2018-09-06 Thread Arseny Maslennikov
On Wed, Sep 05, 2018 at 04:50:35PM +0300, Leon Romanovsky wrote: > On Mon, Sep 03, 2018 at 07:13:16PM +0300, Arseny Maslennikov wrote: > > Signed-off-by: Arseny Maslennikov > > --- > > drivers/infiniband/ulp/ipoib/ipoib_main.c | 38 +++ > > 1

Re: [PATCH v4 3/3] IB/ipoib: Log sysfs 'dev_id' accesses from userspace

2018-09-09 Thread Arseny Maslennikov
On Fri, Sep 07, 2018 at 09:43:59AM -0600, Jason Gunthorpe wrote: > On Thu, Sep 06, 2018 at 05:51:12PM +0300, Arseny Maslennikov wrote: > > Some tools may currently be using only the deprecated attribute; > > let's print an elaborate and clear deprecation notice to kmsg. > >

Re: [PATCH v4 3/3] IB/ipoib: Log sysfs 'dev_id' accesses from userspace

2018-09-09 Thread Arseny Maslennikov
On Sun, Sep 09, 2018 at 09:11:46PM +0300, Arseny Maslennikov wrote: > On Fri, Sep 07, 2018 at 09:43:59AM -0600, Jason Gunthorpe wrote: > > On Thu, Sep 06, 2018 at 05:51:12PM +0300, Arseny Maslennikov wrote: > > > Some tools may currently be using only the deprecated attribute;

[PATCH v4 3/3] IB/ipoib: Log sysfs 'dev_id' accesses from userspace

2018-09-06 Thread Arseny Maslennikov
Some tools may currently be using only the deprecated attribute; let's print an elaborate and clear deprecation notice to kmsg. To do that, we have to replace the whole sysfs file, since we inherit the original one from netdev. Signed-off-by: Arseny Maslennikov --- drivers/infiniband/ulp/ipoib

[PATCH v4 1/3] Documentation/ABI: document /sys/class/net/*/dev_port

2018-09-06 Thread Arseny Maslennikov
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 --- Documentation/ABI/testing/sysfs-class-net

[PATCH v4 2/3] IB/ipoib: Use dev_port to expose network interface port numbers

2018-09-06 Thread Arseny Maslennikov
/mlx4_en and many other drivers, which started exporting this information through `dev_id' before 3.15, were accepted into the kernel 4 years ago. See 76a066f2a2a0 (`net/mlx4_en: Expose port number through sysfs'). Signed-off-by: Arseny Maslennikov --- drivers/infiniband/ulp/ipoib/ipoib_main.c | 2

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

2018-09-06 Thread Arseny Maslennikov
ing 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 num

Re: [PATCH v3 3/3] IB/ipoib: Log sysfs 'dev_id' accesses from userspace

2018-09-06 Thread Arseny Maslennikov
On Wed, Sep 05, 2018 at 04:47:27PM +0100, Stephen Hemminger wrote: > On Mon, 3 Sep 2018 19:13:16 +0300 > Arseny Maslennikov wrote: > > > + if (ndev->dev_id == ndev->dev_port) { > > + netdev_info_once(ndev, > > +

Re: [PATCH v2 1/2] IB/ipoib: Use dev_port to expose network interface port numbers

2018-08-31 Thread Arseny Maslennikov
On Thu, Aug 30, 2018 at 04:17:58PM -0400, Doug Ledford wrote: > On Thu, 2018-08-30 at 21:22 +0300, Arseny Maslennikov wrote: > > Some InfiniBand network devices have multiple ports on the same PCI > > function. This initializes the `dev_port' sysfs field of those > &g

Re: [PATCH 0/3] IB/ipoib: Use dev_port to disambiguate port numbers

2018-08-30 Thread Arseny Maslennikov
On Thu, Aug 30, 2018 at 08:43:30AM +0300, Leon Romanovsky wrote: > On Wed, Aug 29, 2018 at 12:01:14AM +0300, Arseny Maslennikov wrote: > > Pre-3.15 userspace had trouble distinguishing different ports > > of a NIC on a single PCI bus/device/function. To solve this, > > a

[PATCH v3 3/3] IB/ipoib: Log sysfs 'dev_id' accesses from userspace

2018-09-03 Thread Arseny Maslennikov
Signed-off-by: Arseny Maslennikov --- drivers/infiniband/ulp/ipoib/ipoib_main.c | 38 +++ 1 file changed, 38 insertions(+) diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index 30f840f874b3..7386e5bde3d3 100644

[PATCH v3 1/3] Documentation/ABI: document /sys/class/net/*/dev_port

2018-09-03 Thread Arseny Maslennikov
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 --- Documentation/ABI/testing/sysfs-class-net

[PATCH v3 2/3] IB/ipoib: Use dev_port to expose network interface port numbers

2018-09-03 Thread Arseny Maslennikov
/mlx4_en and many other drivers, which started exporting this information through `dev_id' before 3.15, were accepted into the kernel 4 years ago. See 76a066f2a2a0 (`net/mlx4_en: Expose port number through sysfs'). Signed-off-by: Arseny Maslennikov --- drivers/infiniband/ulp/ipoib/ipoib_main.c | 2

[PATCH v3 0/3] IB/ipoib: Use dev_port to disambiguate port numbers

2018-09-03 Thread Arseny Maslennikov
ing and then removing. v2->v3: restore both attributes, output a notice of deprecation to kmsg. 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 Documentati