[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180920112202.9181-1-leon@kernel.org>
Date: Thu, 20 Sep 2018 14:21:57 +0300
From: Leon Romanovsky <leon@...nel.org>
To: Doug Ledford <dledford@...hat.com>,
Jason Gunthorpe <jgg@...lanox.com>
Cc: Leon Romanovsky <leonro@...lanox.com>,
RDMA mailing list <linux-rdma@...r.kernel.org>,
linux-s390@...r.kernel.org, Ursula Braun <ubraun@...ux.ibm.com>,
"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
Selvin Xavier <selvin.xavier@...adcom.com>,
Steve Wise <swise@...lsio.com>, Lijun Ou <oulijun@...wei.com>,
Shiraz Saleem <shiraz.saleem@...el.com>,
Ariel Elior <Ariel.Elior@...ium.com>,
Christian Benvenuti <benve@...co.com>,
Adit Ranadive <aditr@...are.com>,
Dennis Dalessandro <dennis.dalessandro@...el.com>
Subject: [PATCH rdma-next 0/5] IB device rename support
From: Leon Romanovsky <leonro@...lanox.com>
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 will follow this series.
[leonro@...ver /]$ 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@...ver /]$ 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@...ver /]$ sudo rdma dev set mlx5_0 name hfi1_0
[leonro@...ver /]$ 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
First patch introduces getter/setter to access names, i didn't convert
all drivers to stop using name directly, because they don't base their
decision on "name", and use this print only and can print truncated name
if renaming is done at the same time as logging.
Second patch updates SMC to use IB device index instead of name.
Third patch globally converts all drivers to new allocation name
routine.
Forth and fifth patches are actually implement and exports through RDMA
netlink the rename routines.
It uses exported 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.
There is one patch/series which was dropped from this submission -
conversion of SElinux from being IB device name to be IB device index
based. It simply needs more special care and more testing.
This series was tested with mlx5 devices with/without traffic and with
non-modified rdma-core.
Dennis,
I didn't touch hfi1, but I'm not sure if it is needed.
Thanks
Leon Romanovsky (5):
RDMA/core: Provide getter and setter to access IB device name
net/smc: Use IB device index instead of name
RDMA: Convert IB drivers to name allocation routine
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 | 52 +++++++++++++++++++++++---
drivers/infiniband/core/nldev.c | 33 ++++++++++++++++
drivers/infiniband/hw/bnxt_re/main.c | 6 ++-
drivers/infiniband/hw/cxgb3/iwch_provider.c | 5 ++-
drivers/infiniband/hw/cxgb4/provider.c | 5 ++-
drivers/infiniband/hw/hns/hns_roce_main.c | 4 +-
drivers/infiniband/hw/i40iw/i40iw_verbs.c | 7 +++-
drivers/infiniband/hw/mlx4/main.c | 7 +++-
drivers/infiniband/hw/mlx5/main.c | 4 +-
drivers/infiniband/hw/mthca/mthca_provider.c | 5 ++-
drivers/infiniband/hw/nes/nes_verbs.c | 6 ++-
drivers/infiniband/hw/ocrdma/ocrdma_main.c | 7 +++-
drivers/infiniband/hw/qedr/main.c | 4 +-
drivers/infiniband/hw/usnic/usnic_ib_main.c | 5 ++-
drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c | 9 +++--
drivers/infiniband/sw/rxe/rxe_verbs.c | 5 ++-
include/rdma/ib_verbs.h | 8 +++-
include/uapi/rdma/rdma_netlink.h | 3 +-
net/smc/smc_diag.c | 6 +--
net/smc/smc_pnet.c | 27 +++++++------
21 files changed, 171 insertions(+), 38 deletions(-)
--
2.14.4
Powered by blists - more mailing lists