Re: [PATCH] IB/ipoib: Enable pkey and device name decoupling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 28, 2017 at 10:34:06AM -0600, Jason Gunthorpe wrote:
> 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.
>
> This should all use netlink these days, not more sysfs files.
>
> Leon? What do you think about using rdmatool to provide a command line
> for creating ipoib children?

As far as I understand ipoib_netlink.c, ipoib_new_child_link() already
implements it and it is supported in "ip".

And I think that it is more netdev than rdma, so IMHO, the "ip" is more
appropriate, but if someone decides to add "ipoib" object in rdmatool,
I won't stand against it.

>
> > +  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
>
> 'multi-value' sysfs files like this are categorically banned by Greg.
>
> Any kind of configuration in sysfs is really frowned on these days.
>
> Jason

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux