]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/cma: Fix rdma_cm path querying for RoCE
authorParav Pandit <parav@mellanox.com>
Mon, 8 Jan 2018 15:04:48 +0000 (17:04 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Thu, 11 Jan 2018 05:00:34 +0000 (22:00 -0700)
commit2e70e3897f7772b8a4dbb6900cb75392ae15aee6
tree1d4e8b2afc5c3f1b1f21c5d5916f8846573f3302
parentb126049efd6a58d160af7f9196ac4651f523b6a2
RDMA/cma: Fix rdma_cm path querying for RoCE

The 'if' logic in ucma_query_path was broken with OPA was introduced
and started to treat RoCE paths as as OPA paths. Invert the logic
of the 'if' so only OPA paths are treated as OPA paths.

Otherwise the path records returned to rdma_cma users are mangled
when in RoCE mode.

Fixes: a5e363397dbf ("IB/SA: Add OPA path record type")
Signed-off-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/ucma.c