Re: RDMA miniconf: Persistent device naming

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

 



On Mon, Jul 31, 2017 at 03:00:47PM +0000, Bart Van Assche wrote:
> On Mon, 2017-07-31 at 14:36 +0300, Leon Romanovsky wrote:
> > I would like to propose the discussion about ability to add
> > persistent device naming to RDMA subsystem.
> >
> > Right now, the devices receive their names by simple addition of new free
> > index to the name (mlx5_0, mlx5_1 ...). Such naming scheme depends on the
> > PCI probing and in case of device reset can rename device.
> >
> > Such situation doesn't help to provide constant udev rules, reliable
> > ibverbs hotplug and advanced "set command" of RDMAtool which at some
> > point of time will require reinit of ib_device.
> >
> > In this discussion, I want to present netdev implementation of such
> > feature, talk about implications on libibverbs and suggest possible
> > device name convention.
>
> Hello Leon,
>
> Does this mean that there is user space software that depends on these names?

Yes, during initialization phase libibverbs reads sysfs entry [1] and
the ibverbs hotplug relies on this information for every
ibv_get_device_list call.

In the RDMA netlink patches, I added notion of device index and the
RDMAtool operates on it, instead of the device name.

> Shouldn't all user space software be independent of the device names assigned
> by the kernel? For e.g. SCSI disks this was solved a long time ago by making
> /dev/disk/by-id/${name derived from persistent ID} soft links available. An
> example:

Yes, it should, and I don't have enough knowledge to say why RDMA is "special"
in this specific case.

>
> $ ls -l /dev/disk/by-id/scsi-35001b44c698c2947
> lrwxrwxrwx 1 root root 9 Jul 31 07:53 /dev/disk/by-id/scsi-35001b44c698c2947 -> ../../sda
>

[1] https://github.com/linux-rdma/rdma-core/blob/master/libibverbs/init.c#L138

> Bart.

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