RDMA/cma: Introduce and use cma_ib_acquire_dev()
authorParav Pandit <parav@mellanox.com>
Sat, 15 Sep 2018 09:07:57 +0000 (12:07 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 1 Oct 2018 01:21:13 +0000 (19:21 -0600)
commit41ab1cb7d1cd5d53d68bcf5fb3fddad77af15545
tree3338bf1a8ac9ca8e2169bc7a1475f3b70a1710e2
parentff11c6cd521f4fd859c825976e4146dfb166029c
RDMA/cma: Introduce and use cma_ib_acquire_dev()

When RDMA CM connect request arrives for IB transport, it already contains
device, port, netdevice (optional).

Instead of traversing all the cma devices, use the cma device already
found by the cma_find_listener() for which a listener id is provided.

iWarp devices doesn't need to derive RoCE GIDs, therefore drop RoCE
specific checks from cma_acquire_dev() and rename it to
cma_iw_acquire_dev().

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