Skip to content

Commit

Permalink
IB/core: Refer to RoCE port property instead of GID table property
Browse files Browse the repository at this point in the history
ib_find_gid_by_filter() searches GID with filter only for RoCE link
layer regardless of HCA's support for GID table.
Therefore, right way to lookup is compare RoCE port property and not
the GID table property.

Fixes: 99b27e3 ("IB/cache: Add ib_find_gid_by_filter cache API")
Signed-off-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
  • Loading branch information
Parav Pandit authored and Jason Gunthorpe committed Mar 27, 2018
1 parent 3401857 commit 4ab7cb4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/infiniband/core/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,7 @@ int ib_find_gid_by_filter(struct ib_device *device,
void *context, u16 *index)
{
/* Only RoCE GID table supports filter function */
if (!rdma_cap_roce_gid_table(device, port_num) && filter)
if (!rdma_protocol_roce(device, port_num) && filter)
return -EPROTONOSUPPORT;

return ib_cache_gid_find_by_filter(device, gid,
Expand Down

0 comments on commit 4ab7cb4

Please sign in to comment.