On 9/25/18 8:10 AM, Leon Romanovsky wrote:
From: Leon Romanovsky <leonro@xxxxxxxxxxxx> Changelog: v0 -> v1: * Based on Jason's latest dev_name changes * Dropped all patches related to alloc_name changes ----------------------------------------------------------------------- Hi, This series introduce long-waiting feature - "IB device rename". Such feature gives and option to rename user visible IB device name from vendor specific name (e.g. mlx5_0) to anything else. The user space component through rdmatool was already sent to the ML. [leonro@server /]$ lspci |grep -i Ether 00:08.0 Ethernet controller: Red Hat, Inc. Virtio network device 00:09.0 Ethernet controller: Mellanox Technologies MT27700 Family [ConnectX-4] [leonro@server /]$ sudo rdma dev 1: mlx5_0: node_type ca fw 3.8.9999 node_guid 5254:00c0:fe12:3455 sys_image_guid 5254:00c0:fe12:3455 [leonro@server /]$ sudo rdma dev set mlx5_0 name hfi1_0 [leonro@server /]$ sudo rdma dev 1: hfi1_0: node_type ca fw 3.8.9999 node_guid 5254:00c0:fe12:3455 sys_image_guid 5254:00c0:fe12:3455 This functionality is done through RDMA netlink and implemented by device_rename() function, despite the comment from 2010, which warns about downsides of this function, the netdev is still uses, so we will use too. This series was tested with mlx5 devices with/without traffic and with non-modified rdma-core. Leon Romanovsky (2): RDMA/core: Implement IB device rename function RDMA/nldev: Allow IB device rename through RDMA netlink drivers/infiniband/core/core_priv.h | 1 + drivers/infiniband/core/device.c | 21 +++++++++++++++++++++ drivers/infiniband/core/nldev.c | 33 +++++++++++++++++++++++++++++++++ include/uapi/rdma/rdma_netlink.h | 3 ++- 4 files changed, 57 insertions(+), 1 deletion(-) -- 2.14.4
While I have nothing of technical value to contribute here, I just wanted to say thank you! This is something I've long desired. We've been through one too many BIOS updates that mucked with PCI device enumeration and in environments with multiple RDMA adapters, particularly when some of the RDMA adapters face storage devices and different fabrics entirely, it can make for a real treat of a maintenance window. This is especially true if they all use the same driver. I admit I'm making this assumption that these changes would allow one to craft udev rules to create persistent device mappings. Is that indeed the case?
-Aaron -- Aaron Knister NASA Center for Climate Simulation (Code 606.2) Goddard Space Flight Center (301) 286-2776