Skip to content

Dual Port mlx5 IB Device for RoCE

Leon Romanovsky linux-rdma 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest15 patches 31 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/15net/mlx5: Fix race for multiple RoCE enabledrivers/net/ethernet/mellanox/mlx5/core/vport.c include/linux/mlx5/driver.h+28 -73 replies
2/15net/mlx5: Set software owner ID during init HCAdrivers/net/ethernet/mellanox/mlx5/core/fw.c drivers/net/ethernet/mellanox/mlx5/core/main.c drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h +2 more+24 -49 replies
3/15IB/core: Change roce_rescan_device to return voiddrivers/infiniband/core/cache.c drivers/infiniband/core/core_priv.h drivers/infiniband/core/roce_gid_mgmt.c+3 -100 replies
4/15IB/mlx5: Reduce the use of num_port capabilitydrivers/infiniband/hw/mlx5/mad.c drivers/infiniband/hw/mlx5/main.c drivers/infiniband/hw/mlx5/qp.c+11 -120 replies
5/15IB/mlx5: Make netdev notifications multiport capabledrivers/infiniband/hw/mlx5/main.c drivers/infiniband/hw/mlx5/mlx5_ib.h drivers/infiniband/hw/mlx5/qp.c +1 more+60 -370 replies
6/15{net,IB}/mlx5: Manage port association for multiport RoCEdrivers/infiniband/core/cache.c drivers/infiniband/core/core_priv.h drivers/infiniband/core/roce_gid_mgmt.c +9 more+551 -420 replies
7/15IB/mlx5: Move IB event processing onto a workqueuedrivers/infiniband/hw/mlx5/main.c+56 -130 replies
8/15IB/mlx5: Implement dual port functionality in query routinesdrivers/infiniband/hw/mlx5/main.c+85 -170 replies
9/15IB/mlx5: Change debugfs to have per port contentsdrivers/infiniband/hw/mlx5/cong.c drivers/infiniband/hw/mlx5/main.c drivers/infiniband/hw/mlx5/mlx5_ib.h+73 -290 replies
10/15IB/mlx5: Update counter implementation for dual port RoCEdrivers/infiniband/hw/mlx5/main.c drivers/infiniband/hw/mlx5/mlx5_ib.h+45 -310 replies
11/15{net,IB}/mlx5: Change set_roce_gid to take a port numberdrivers/infiniband/hw/mlx5/main.c drivers/net/ethernet/mellanox/mlx5/core/fpga/conn.c drivers/net/ethernet/mellanox/mlx5/core/lib/gid.c +1 more+10 -60 replies
12/15IB/mlx5: Route MADs for dual port RoCEdrivers/infiniband/hw/mlx5/mad.c+14 -70 replies
13/15IB/mlx5: Use correct mdev for vport queries in ib_virtdrivers/infiniband/hw/mlx5/ib_virt.c+69 -152 replies
14/15IB/mlx5: Don't advertise RAW QP support in dual port modedrivers/infiniband/hw/mlx5/main.c+14 -78 replies
15/15net/mlx5: Set num_vhca_ports capabilitydrivers/net/ethernet/mellanox/mlx5/core/main.c+6 -00 replies

Reviews trailers per patch

12 of 15 patches have a Reviewed-by or Acked-by.

PatchParav Pandit
1/15R-b
2/15R-b
3/15R-b
4/15R-b
5/15R-b
6/15R-b
7/15R-b
8/15R-b
9/15
10/15
11/15R-b
12/15R-b
13/15R-b
14/15
15/15R-b

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

Read the v1 thread

Cover letter [PATCH rdma-next 00/15] Dual Port mlx5 IB Device for RoCE
Quoted 1 line

From Daniel:

This feature allows RDMA resources (pd, mr, cq, qp, etc) to be used with both physical ports of capable mlx5 devices. When enabled a single IB device with two ports will be registered instead of two single port devices.

There are still two PCI devices underlying the two port device, the capabilities indicate which device is the "master" device and which is the slave.

When the add callback function is called for a slave device a list of IB devices is searched for matching master device, indicated by the capabilities and the system_image_guid. If a match is found the slave is bound to the master device, otherwise it's placed on a list, in case it's master becomes available in the future. When a master device is added it searches the list of available slaves for a matching slave device. If a match is found it binds the slave as its 2nd port. If no match as found the device still appears as a dual port device, with the 2nd port down. RDMA resources can still created that use the yet unavailable 2nd port.

Commands related to IB resources are all routed through the master mlx5_core device. Port specific commands, like those for hardware counters are routed to their respective port mlx5_core device. Since devices can appear and disappear asynchronously a reference count on the underlying mlx5_core device is maintained. Getting and putting this reference is only necessary for commands destined to a specific port, the master core device can be used freely, as it will exist while the IB device exists.

SR-IOV devices follow the same pattern as the physical ones. VFs of a master port can bind VFs of slave ports, if available, and operate as dual port devices.

The patches are available in the git repository at:
git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git tags/rdma-next-2017-12-24-2

Thanks
---------------------------------------

Daniel Jurgens (14):
net/mlx5: Fix race for multiple RoCE enable net/mlx5: Set software owner ID during init HCA IB/core: Change roce_rescan_device to return void IB/mlx5: Reduce the use of num_port capability IB/mlx5: Make netdev notifications multiport capable {net,IB}/mlx5: Manage port association for multiport RoCE IB/mlx5: Move IB event processing onto a workqueue IB/mlx5: Implement dual port functionality in query routines IB/mlx5: Update counter implementation for dual port RoCE {net,IB}/mlx5: Change set_roce_gid to take a port number IB/mlx5: Route MADs for dual port RoCE
IB/mlx5: Use correct mdev for vport queries in ib_virt IB/mlx5: Don't advertise RAW QP support in dual port mode net/mlx5: Set num_vhca_ports capability

Parav Pandit (1):
IB/mlx5: Change debugfs to have per port contents

 drivers/infiniband/core/cache.c                    |   7 +-
 drivers/infiniband/core/core_priv.h                |   1 -
 drivers/infiniband/core/roce_gid_mgmt.c            |  13 +-
 drivers/infiniband/hw/mlx5/cong.c                  |  83 ++-
 drivers/infiniband/hw/mlx5/ib_virt.c               |  84 ++-
 drivers/infiniband/hw/mlx5/mad.c                   |  23 +-
 drivers/infiniband/hw/mlx5/main.c                  | 791 +++++++++++++++++----
 drivers/infiniband/hw/mlx5/mlx5_ib.h               |  41 +-
 drivers/infiniband/hw/mlx5/qp.c                    |   8 +-
 .../net/ethernet/mellanox/mlx5/core/fpga/conn.c    |  11 +-
 drivers/net/ethernet/mellanox/mlx5/core/fw.c       |  10 +-
 .../net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c  |   2 +-
 drivers/net/ethernet/mellanox/mlx5/core/lib/gid.c  |   5 +-
 drivers/net/ethernet/mellanox/mlx5/core/main.c     |  12 +-
 .../net/ethernet/mellanox/mlx5/core/mlx5_core.h    |   2 +-
 drivers/net/ethernet/mellanox/mlx5/core/vport.c    |  91 ++-
 include/linux/mlx5/device.h                        |   5 +
 include/linux/mlx5/driver.h                        |  29 +-
 include/linux/mlx5/mlx5_ifc.h                      |  32 +-
 include/linux/mlx5/vport.h                         |   4 +
 include/rdma/ib_verbs.h                            |   8 +
 21 files changed, 1037 insertions(+), 225 deletions(-)

--
2.15.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html