All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yuval Shaia <yuval.shaia@oracle.com>
To: Arseny Maslennikov <ar@cs.msu.ru>
Cc: linux-rdma@vger.kernel.org, Doug Ledford <dledford@redhat.com>,
	Jason Gunthorpe <jgg@ziepe.ca>,
	netdev@vger.kernel.org
Subject: Re: [PATCH 2/3] IB/ipoib: Stop using dev_id to expose port numbers
Date: Mon, 13 Aug 2018 15:40:20 +0300	[thread overview]
Message-ID: <20180813124018.GA6122@lap1> (raw)
In-Reply-To: <20180813114224.7065-3-ar@cs.msu.ru>

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
> field of those network interfaces to convey the port number to userspace.
> 
> `dev_id' is currently reserved for distinguishing stacked ifaces
> (e.g: VLANs) with the same hardware address as their parent device.
> 
> Similar fixes to net/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 76a066f2a2a0268b565459c417b59724b5a3197b, commit message:
> `net/mlx4_en: Expose 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 <ar@cs.msu.ru>
> ---
>  drivers/infiniband/ulp/ipoib/ipoib_main.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
> index 6eb0594fffec..f64535038147 100644
> --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
> +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
> @@ -2252,7 +2252,6 @@ static struct net_device *ipoib_add_port(const char *format,
>  	}
>  
>  	SET_NETDEV_DEV(priv->dev, hca->dev.parent);
> -	priv->dev->dev_id = port - 1;

Correct me if i'm wrong here but besides some changes in commit message
looks like patch 1/3 is the same as 2/3, isn't it?

Yuval

>  	priv->dev->dev_port = port - 1;
>  
>  	result = ib_query_port(hca, port, &attr);
> -- 
> 2.18.0
> 

  reply	other threads:[~2018-08-13 12:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-13 11:42 [PATCH 0/3] net, IB/ipoib: Use dev_port to disambiguate Arseny Maslennikov
2018-08-13 11:42 ` [PATCH 1/3] IB/ipoib: Use dev_port to expose network interface port numbers Arseny Maslennikov
2018-08-13 11:42 ` [PATCH 2/3] IB/ipoib: Stop using dev_id to expose " Arseny Maslennikov
2018-08-13 12:40   ` Yuval Shaia [this message]
2018-08-13 13:57     ` Arseny Maslennikov
2018-08-13 11:42 ` [PATCH 3/3] Documentation/ABI: document /sys/class/net/*/dev_port Arseny Maslennikov
2018-08-13 17:17 ` [PATCH 0/3] net, IB/ipoib: Use dev_port to disambiguate Jason Gunthorpe
  -- strict thread matches above, loose matches on Subject: below --
2018-08-28 21:01 [PATCH 0/3] IB/ipoib: Use dev_port to disambiguate port numbers Arseny Maslennikov
2018-08-28 21:01 ` [PATCH 2/3] IB/ipoib: Stop using dev_id to expose " Arseny Maslennikov
2018-08-29  9:44   ` Sergei Shtylyov

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=20180813124018.GA6122@lap1 \
    --to=yuval.shaia@oracle.com \
    --cc=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.