linux/drivers/infiniband/hw
Daniel Jurgens 32f69e4be2 {net, IB}/mlx5: Manage port association for multiport RoCE
When mlx5_ib_add is called determine if the mlx5 core device being
added is capable of dual port RoCE operation. If it is, determine
whether it is a master device or a slave device using the
num_vhca_ports and affiliate_nic_vport_criteria capabilities.

If the device is a slave, attempt to find a master device to affiliate it
with. Devices that can be affiliated will share a system image guid. If
none are found place it on a list of unaffiliated ports. If a master is
found bind the port to it by configuring the port affiliation in the NIC
vport context.

Similarly when mlx5_ib_remove is called determine the port type. If it's
a slave port, unaffiliate it from the master device, otherwise just
remove it from the unaffiliated port list.

The IB device is registered as a multiport device, even if a 2nd port is
not available for affiliation. When the 2nd port is affiliated later the
GID cache must be refreshed in order to get the default GIDs for the 2nd
port in the cache. Export roce_rescan_device to provide a mechanism to
refresh the cache after a new port is bound.

In a multiport configuration all IB object (QP, MR, PD, etc) related
commands should flow through the master mlx5_core_dev, other commands
must be sent to the slave port mlx5_core_mdev, an interface is provide
to get the correct mdev for non IB object commands.

Signed-off-by: Daniel Jurgens <danielj@mellanox.com>
Reviewed-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2018-01-08 11:42:22 -07:00
..
bnxt_re bnxt_re: report RoCE device support at info level 2018-01-05 14:35:31 -05:00
cxgb3 Updates for 4.15 kernel merge window 2017-11-15 14:54:53 -08:00
cxgb4 iw_cxgb4: Change error/warn prints to pr_debug 2017-12-29 11:09:23 -07:00
hfi1 IB/{hfi1, qib}: Fix a concurrency issue with device name in logging 2018-01-05 13:34:55 -05:00
hns RDMA/hns: Assign dest_qp when deregistering mr 2018-01-03 13:58:59 -07:00
i40iw i40iw: Replace mdelay with msleep in i40iw_wait_pe_ready 2018-01-05 13:47:29 -05:00
mlx4 IB/mlx4: Add support to RSS hash for inner headers 2017-12-28 11:33:14 -07:00
mlx5 {net, IB}/mlx5: Manage port association for multiport RoCE 2018-01-08 11:42:22 -07:00
mthca IB/mthca: Use zeroing memory allocator than allocator/memset 2018-01-02 11:20:13 -07:00
nes nes: Change accelerated flag to bool 2017-12-22 13:33:30 -07:00
ocrdma IB/ocrdma: Use zeroing memory allocator than allocator/memset 2018-01-02 11:20:13 -07:00
qedr RDMA/qedr: Use zeroing memory allocator than allocator/memset 2018-01-02 11:20:13 -07:00
qib IB/{hfi1, qib}: Fix a concurrency issue with device name in logging 2018-01-05 13:34:55 -05:00
usnic drivers: infiniband: remove duplicate includes 2017-12-22 09:39:35 -07:00
vmw_pvrdma RDMA/vmw_pvrdma: Use zeroing memory allocator than allocator/memset 2018-01-02 11:20:13 -07:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00