Re: [PATCH rdma-core 2/5] kernel-boot: Perform device rename to make stable names

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

 




On 3/6/19 11:08 AM, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@xxxxxxxxxxxx>
>
> Generalize the naming scheme for RDMA devices, so users will always
> see names based on topology/GUID information. Such naming scheme has
> big advantage that the names are fully automatic, fully predictable
> and they stay fixed even if hardware is added or removed (i.e. no
> reenumeration takes place) and that broken hardware can be replaced
> seamlessly.
>
> The naming policy is possible to chose from NAME_KERNEL, NAME_PCI,
> NAME_GUID or NAME_FALLBACK, which is controlled by udev rule.
>
>  * NAME_KERNEL - don't change names and rely on kernel assignment. This
>    will keep RDMA names as before. Example: "mlx5_0".
>  * NAME_PCI - read PCI location and topology as a source for stable names,
>    which won't change in any software event (reset, PCI probe e.t.c.).
>    Example: "mlxp0s12f4".
>  * NAME_GUID - read system image GUID information in simillar manner to
>    net MAC naming policy. Example "mlxx525400c0fe123455".
>  * NAME_FALLBACK - automatic fallback: NAME_PCI->NAME_GUID->NAME_KERNEL
>
> No doubts that new names are harder to read than the "mlx5_0" everybody,
> is used to, but being consistent in scripts is much more important.
>
> As a matter of precaution, we set default naming policy to be
> NAME_KERNEL, but will change it later to NAME_FALLBACK.
>

You probably should extend udev.md to document this value (with pretty much a copy of your commit message).

Also, not sure coding this value directly into the udev script is the right thing to do.
At least RPM may mess with you file during an update if you change it.
We already have a /etc/rdma with a bunch of stuff. Could we stick in there too ?

It would also be nice if we could rename the associated IPoIB device as well.
We do have the persistent-ipoib udev rule but it'd probably if they had a name "matching" the IB device by default so in most use case people
 do not have to set these rules manually and never have to look which netdev matches which IB device.
If we go with my #2 point, we could add a setting to enable/disable this feature. And make sure that the persistent rule is triggered afterwards so legacy name are not overwritten.

Nicolas

Attachment: signature.asc
Description: OpenPGP digital 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