All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Yuval Shaia <yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
	hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	corbet-T1hC0tSOHrs@public.gmane.org,
	valex-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
	erezsh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
	dasaratharaman.chandramouli-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
	yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org,
	pabeni-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	kernel-6AxghH7DbtA@public.gmane.org,
	ferasda-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
	shamir.rabinovitch-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org,
	mingo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	mukesh.kacker-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org,
	chien.yen-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org
Subject: Re: [PATCH] IB/ipoib: Enable pkey and device name decoupling
Date: Wed, 27 Sep 2017 18:01:40 +0300	[thread overview]
Message-ID: <20170927150140.GF2297@mtr-leonro.local> (raw)
In-Reply-To: <20170927093248.3819-1-yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 2506 bytes --]

On Wed, Sep 27, 2017 at 12:32:48PM +0300, Yuval Shaia wrote:
> The sysfs "create_child" interface creates pkey based child interface but
> derives the name from parent device name and pkey value.
> This makes administration difficult where pkey values can change but
> policies encoded with device names do not.
>
> We add ability to create a child interface with a user specified name and a
> specified pkey with a new sysfs "create_named_child" interface (and also
> add a corresponding "delete_named_child" interface).
>
> We also add a new module api interface to query pkey from a netdevice so
> any kernel users of pkey based child interfaces can query it - since with
> device name decoupled from pkey, it can no longer be deduced from parsing
> the device name by other kernel users.
>
> Signed-off-by: Mukesh Kacker <mukesh.kacker-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> Reviewed-by: Yuval Shaia <yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> Reviewed-by: Chien-Hua Yen <chien.yen-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> Signed-off-by: Yuval Shaia <yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> ---
>  Documentation/infiniband/ipoib.txt        |  12 ++
>  drivers/infiniband/ulp/ipoib/ipoib.h      |   3 +
>  drivers/infiniband/ulp/ipoib/ipoib_main.c | 187 ++++++++++++++++++++++++++++++
>  drivers/infiniband/ulp/ipoib/ipoib_vlan.c |  76 +++++++++++-
>  4 files changed, 272 insertions(+), 6 deletions(-)
>
> diff --git a/Documentation/infiniband/ipoib.txt b/Documentation/infiniband/ipoib.txt
> index 47c1dd9818f2..1db53c9b2906 100644
> --- a/Documentation/infiniband/ipoib.txt
> +++ b/Documentation/infiniband/ipoib.txt
> @@ -21,6 +21,18 @@ Partitions and P_Keys
>
>      echo 0x8001 > /sys/class/net/ib0/delete_child
>
> +  Interfaces with a user chosen name can be created in a similar
> +  manner with a different name and P_Key, by writing them into the
> +  main interface's /sys/class/net/<intf name>/create_named_child
> +  For example:
> +     echo "epart2 0x8002" > /sys/class/net/ib1/create_named_child
> +
> +   This will create an interfaces named epart2 with P_Key 0x8002 and
> +   parent ib1. To remove a named subinterface, use the
> +   "delete_named_child" file:
> +
> +     echo epart2 > /sys/class/net/ib1/delete_named_child

I doubt that delete_named_child is actually needed. You can use delete_child
on the pkey, which you used to create named child.

Maybe better to add support to rename child instead of introducing named
child concept?

Thanks

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2017-09-27 15:01 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-27  9:32 [PATCH] IB/ipoib: Enable pkey and device name decoupling Yuval Shaia
     [not found] ` <20170927093248.3819-1-yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2017-09-27 14:14   ` Doug Ledford
2017-09-27 15:01   ` Leon Romanovsky [this message]
     [not found]     ` <20170927150140.GF2297-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-09-27 19:03       ` Mukesh Kacker
     [not found]         ` <c98fc5c0-cb34-c960-4bbf-34422bbacd0e-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2017-09-28 13:45           ` Leon Romanovsky
2017-09-28 16:38           ` Jason Gunthorpe
2017-09-27 17:20   ` Mukesh Kacker
     [not found]     ` <78f7983f-dc6b-a42a-0b29-adb69777fa75-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2017-09-27 17:26       ` Yuval Shaia
2017-09-28 16:34   ` Jason Gunthorpe
     [not found]     ` <20170928163406.GB17880-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-09-28 16:47       ` Leon Romanovsky
     [not found]         ` <20170928164735.GC2297-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-09-28 16:53           ` Jason Gunthorpe
     [not found]             ` <20170928165305.GE17880-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-09-28 17:08               ` Leon Romanovsky
2017-10-15  5:47               ` Yuval Shaia
2017-10-15  6:27                 ` Leon Romanovsky
2017-10-17  8:18                 ` Jason Gunthorpe
     [not found]                   ` <20171017081837.GA19107-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-10-17 10:21                     ` Leon Romanovsky
     [not found]                       ` <20171017102121.GM2106-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-10-19  6:11                         ` Jason Gunthorpe
     [not found]                           ` <20171019061100.GB6555-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-10-19  6:14                             ` Leon Romanovsky
     [not found]                               ` <20171019061405.GW2106-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-10-19  6:28                                 ` Alex Vesker
     [not found]                                   ` <c2f3b529-cc53-aef0-fdcf-e86e99360db0-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2017-10-21 19:42                                     ` Jason Gunthorpe
     [not found]                                       ` <20171021194215.GA4094-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-10-23  6:04                                         ` Leon Romanovsky
     [not found]                                           ` <20171023060436.GD2106-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-10-23 15:23                                             ` Jason Gunthorpe
     [not found]                                               ` <20171023152340.GA11952-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-10-23 17:03                                                 ` 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=20170927150140.GF2297@mtr-leonro.local \
    --to=leon-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=chien.yen-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
    --cc=corbet-T1hC0tSOHrs@public.gmane.org \
    --cc=dasaratharaman.chandramouli-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=erezsh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=ferasda-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=kernel-6AxghH7DbtA@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mingo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=mukesh.kacker-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
    --cc=pabeni-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=shamir.rabinovitch-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
    --cc=valex-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
    --cc=yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.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.