]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/ucma: Use rdma cm API to query GID
authorParav Pandit <parav@mellanox.com>
Thu, 18 Jan 2018 08:11:17 +0000 (10:11 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Fri, 19 Jan 2018 20:05:38 +0000 (13:05 -0700)
commit038972c803d92ffc91bd87dbdc7a9afce77ac576
treeba93a977cacc86be04ef7c7de0e676905f7c2c79
parent38f5f2391ab539291ea86f316312ec0eeeefaf82
RDMA/ucma: Use rdma cm API to query GID

Make use of rdma_read_gids() API to read SGID and DGID which returns
correct GIDs for RoCE and other transports.

rdma_addr_get_dgid() for RoCE for client side connections returns MAC
address, instead of DGID.
rdma_addr_get_sgid() for RoCE doesn't return correct SGID for IPv6 and
when more than one IP address is assigned to the netdevice.

Therefore use transport agnostic rdma_read_gids() API provided by rdma_cm
module.

Signed-off-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Daniel Jurgens <danielj@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/ucma.c