]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Get correct network device when accepting incoming RDMA connections in ibcore.
authorhselasky <hselasky@FreeBSD.org>
Mon, 5 Mar 2018 14:24:30 +0000 (14:24 +0000)
committerhselasky <hselasky@FreeBSD.org>
Mon, 5 Mar 2018 14:24:30 +0000 (14:24 +0000)
commit1a0dfe658290aae2f787318c82f9bd86bed2125e
tree6c5a2452ee8cdb008382e61174d5248ae1f44d1c
parent22d19d149398e088589f298bf58639e773170d46
Get correct network device when accepting incoming RDMA connections in ibcore.

This patch ensures the GID index is always used as a basis of resolving
incoming RDMA connections, as compared to the GID value itself.

Background:
On a per infiniband port basis, the GID identifier is not a unique identifier!
This assumption falls apart when VLAN ID, IPv6 scope ID and RoCE type,
as supported by RoCE v2, is taken into account. This additional
information is stored in the so-called GID attributes and is needed to
correctly identify the destination network interface for an incoming
connection.

Different VLANs are allowed to define the same IPv4 addresses and especially
for the default IPv6 link-local addresses or when using so-called containers
or jails, this is true.

The VNET information for the destination network interface is needed in
order to perform the L2 address lookup in the right Virtual Network Stack
context.

Consequently old functions previously used by RoCE v1, like
rdma_addr_find_smac_by_sgid() are impossible to support, because
there can be multiple identical GIDs associated with the same
infiniband port, and the answer to such a request becomes undefined.
This function has been removed.

MFC after: 1 week
Sponsored by: Mellanox Technologies
sys/ofed/drivers/infiniband/core/ib_addr.c
sys/ofed/drivers/infiniband/core/ib_cma.c
sys/ofed/drivers/infiniband/core/ib_verbs.c
sys/ofed/include/rdma/ib_addr.h