Skip to content

RDMA Netlink Device Client

Leon Romanovsky linux-rdma netdev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest18 of 27 patches 4 repliesIn review
  2. v116 of 19 patches 0 repliesSuperseded

Changes in v2 from the cover letter

* Groupped all various export* commits into this one patch set.
* Fixed reversed port vailidy check.
* Limited export of fields only for supported protocols.
* Followed sysfs naming for various exported properties.

18 of 27 patches are in this archive. The cover letter announces 27.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
2/27RDMA/netlink: Simplify the put_msg and put_attrdrivers/infiniband/core/netlink.c+9 -220 replies
3/27RDMA/netlink: Rename and remove redundant parameter from ibnl_unicastdrivers/infiniband/core/iwpm_msg.c drivers/infiniband/core/iwpm_util.c drivers/infiniband/core/netlink.c +1 more+8 -110 replies
4/27RDMA/netlink: Rename and remove redundant parameter from ibnl_multicastdrivers/infiniband/core/addr.c drivers/infiniband/core/iwpm_msg.c drivers/infiniband/core/netlink.c +2 more+6 -90 replies
6/27RDMA/netlink: Rename netlink callback structdrivers/infiniband/core/cma.c drivers/infiniband/core/device.c drivers/infiniband/core/iwcm.c +2 more+7 -70 replies
7/27RDMA/core: Add iterator over ib_devicesdrivers/infiniband/core/core_priv.h drivers/infiniband/core/device.c+33 -00 replies
8/27RDMA/core: Add and expose static device indexdrivers/infiniband/core/core_priv.h drivers/infiniband/core/device.c include/rdma/ib_verbs.h+42 -10 replies
9/27RDMA/netlink: Add and implement doit netlink callbackdrivers/infiniband/core/netlink.c include/rdma/rdma_netlink.h+16 -50 replies
10/27RDMA/netlink: Reduce indirection access to cb_tabledrivers/infiniband/core/netlink.c+8 -50 replies
11/27RDMA/netlink: Convert LS to doit callbackdrivers/infiniband/core/addr.c drivers/infiniband/core/core_priv.h drivers/infiniband/core/device.c +2 more+25 -310 replies
16/27RDMA/netlink: Add nldev device doit implementationdrivers/infiniband/core/nldev.c+40 -00 replies
17/27RDMA/netlink: Add nldev port dumpit implementationdrivers/infiniband/core/nldev.c+61 -00 replies
18/27RDMA/netlink: Implement nldev port doit callbackdrivers/infiniband/core/nldev.c+44 -00 replies
20/27RDMA: Simplify get firmware interfacedrivers/infiniband/core/device.c drivers/infiniband/core/sysfs.c drivers/infiniband/hw/cxgb3/iwch_provider.c +13 more+36 -471 reply
21/27RDMA/netlink: Export FW versiondrivers/infiniband/core/nldev.c include/uapi/rdma/rdma_netlink.h+13 -00 replies
22/27RDMA/netlink: Export node_guid and sys_image_guiddrivers/infiniband/core/nldev.c include/uapi/rdma/rdma_netlink.h+21 -00 replies
24/27RDMA/netink: Export lids and sm_lidsdrivers/infiniband/core/nldev.c include/uapi/rdma/rdma_netlink.h+16 -11 reply
25/27RDMA/netlink: Export LID mask counter (LMC)drivers/infiniband/core/nldev.c include/uapi/rdma/rdma_netlink.h+8 -02 replies
26/27RDMA/netlink: Provide port state and physical link statedrivers/infiniband/core/nldev.c include/uapi/rdma/rdma_netlink.h+9 -00 replies

Reviews trailers per patch

13 of 18 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchSteve WiseDennis Dalessandro
SeriesR-b R-b R-b R-b R-b R-b R-b
2/27R-b
3/27R-b
4/27R-b
6/27R-b
7/27R-b
8/27
9/27R-b
10/27R-b
11/27R-b
16/27R-b
17/27R-b
18/27R-b
20/27R-b
21/27
22/27
24/27R-b
25/27
26/27

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH rdma-next V2 00/27] RDMA Netlink Device Client

Hi,

This is third version of the RDMA netlink patch set.

The following patch set is an implementation of NLDEV - RDMA netlink device client. It is based on the already sent patch [1] and patch set [2].

This client is needed to properly integrate coming RDMAtool [3] into iproute2 package which is based on netlink.

The following patch set can be logically divided into four parts:
* Cleanup of RDMA netlink interface to handle dumpit/doit callbacks.
* Implementation of static ib_device index to allow future renaming support for IB devices.
* NLDEV initial implementation.
* Exposing various device ports properties.

Doug,
This series passed extensive review and I would be happy to see this series series merged in this merge window, so I will be able to focus on more complex types for the "get interface" and on on "set ability", which is long waited feature for the whole RDMA stack [4].

Thanks

Chagelog:
v1->v2:
* Groupped all various export* commits into this one patch set.
* Fixed reversed port vailidy check.
* Limited export of fields only for supported protocols.
* Followed sysfs naming for various exported properties.
v0->v1:
* Added Steve's Reviewed-by tags for all patches except patch #8, because it was completely rewritten.
* Implemented static indexes for ib_device in patch #8 and dropped preview version which translated device name to corresponding ib_device.
* Fixed language in commit messages as was pointed by Steve.
* Rename TODO to be FIXME in patch #11.

Thanks

[1] "Revert "IB/core: Add flow control to the portmapper netlink calls""

     https://patchwork.kernel.org/patch/9752865/

[2] [PATCH rdma-next V3 0/5] Refactor RDMA netlink infrastructure

    https://www.spinics.net/lists/linux-rdma/msg51455.html

[3] [RFC iproute2 0/8] RDMA tool

    https://www.spinics.net/lists/linux-rdma/msg49575.html

[4] https://www.spinics.net/lists/linux-rdma/msg51476.html

Available in the "topic/rdma-netlink-v2" topic branch of this git repo:
git://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git

Or for browsing:
https://git.kernel.org/cgit/linux/kernel/git/leon/linux-rdma.git/log/?h=topic/rdma-netlink-v2

CC Stephen Hemminger <[email protected]>
CC Ariel Almog <[email protected]>
CC Linux RDMA <[email protected]>
CC Linux Netdev <[email protected]>

Leon Romanovsky (27):
RDMA/netlink: Add flag to consolidate common handing RDMA/netlink: Simplify the put_msg and put_attr RDMA/netlink: Rename and remove redundant parameter from ibnl_unicast RDMA/netlink: Rename and remove redundant parameter from
ibnl_multicast
RDMA/netlink: Simplify and rename ibnl_chk_listeners RDMA/netlink: Rename netlink callback struct
RDMA/core: Add iterator over ib_devices
RDMA/core: Add and expose static device index RDMA/netlink: Add and implement doit netlink callback RDMA/netlink: Reduce indirection access to cb_table RDMA/netlink: Convert LS to doit callback
RDMA/netlink: Update copyright
RDMA/netlink: Add netlink device definitions to UAPI RDMA/netlink: Add nldev initialization flows
RDMA/netlink: Implement nldev device dumpit calback RDMA/netlink: Add nldev device doit implementation RDMA/netlink: Add nldev port dumpit implementation RDMA/netlink: Implement nldev port doit callback RDMA/netlink: Expose device and port capability masks
RDMA: Simplify get firmware interface
RDMA/netlink: Export FW version
RDMA/netlink: Export node_guid and sys_image_guid RDMA/netlink: Advertise IB subnet prefix
RDMA/netink: Export lids and sm_lids
RDMA/netlink: Export LID mask counter (LMC)
RDMA/netlink: Provide port state and physical link state RDMA/netlink: Export node_type

 drivers/infiniband/core/Makefile               |   4 +-
 drivers/infiniband/core/addr.c                 |  12 +-
 drivers/infiniband/core/cma.c                  |   2 +-
 drivers/infiniband/core/core_priv.h            |  21 +-
 drivers/infiniband/core/device.c               |  82 ++++++-
 drivers/infiniband/core/iwcm.c                 |   2 +-
 drivers/infiniband/core/iwpm_msg.c             |   8 +-
 drivers/infiniband/core/iwpm_util.c            |   4 +-
 drivers/infiniband/core/netlink.c              |  97 ++++----
 drivers/infiniband/core/nldev.c                | 312 +++++++++++++++++++++++++
 drivers/infiniband/core/sa_query.c             |  18 +-
 drivers/infiniband/core/sysfs.c                |   4 +-
 drivers/infiniband/hw/cxgb3/iwch_provider.c    |   5 +-
 drivers/infiniband/hw/cxgb4/provider.c         |   5 +-
 drivers/infiniband/hw/hfi1/verbs.c             |   5 +-
 drivers/infiniband/hw/i40iw/i40iw_verbs.c      |   7 +-
 drivers/infiniband/hw/mlx4/main.c              |   5 +-
 drivers/infiniband/hw/mlx5/main.c              |   8 +-
 drivers/infiniband/hw/mthca/mthca_provider.c   |   5 +-
 drivers/infiniband/hw/nes/nes_verbs.c          |   5 +-
 drivers/infiniband/hw/ocrdma/ocrdma_main.c     |   5 +-
 drivers/infiniband/hw/qedr/main.c              |   5 +-
 drivers/infiniband/hw/usnic/usnic_ib_main.c    |   6 +-
 drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c |   5 +-
 drivers/infiniband/ulp/ipoib/ipoib_ethtool.c   |   3 +-
 include/rdma/ib_verbs.h                        |   8 +-
 include/rdma/rdma_netlink.h                    |  26 ++-
 include/uapi/rdma/rdma_netlink.h               |  84 ++++++-
 28 files changed, 611 insertions(+), 142 deletions(-)
 create mode 100644 drivers/infiniband/core/nldev.c