aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/cache.c
diff options
context:
space:
mode:
authorParav Pandit <parav@mellanox.com>2018-03-25 06:40:21 -0400
committerJason Gunthorpe <jgg@mellanox.com>2018-03-27 18:22:12 -0400
commit4ab7cb4bf362dc3b85fd8ddac3b16949404be96b (patch)
treed88b075c1f71e55840f1ecda826e5e1fc309fe0a /drivers/infiniband/core/cache.c
parent3401857ea347e86a51adb844c5e9207dcdc0139b (diff)
IB/core: Refer to RoCE port property instead of GID table property
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: 99b27e3b5da0 ("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>
Diffstat (limited to 'drivers/infiniband/core/cache.c')
-rw-r--r--drivers/infiniband/core/cache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/core/cache.c b/drivers/infiniband/core/cache.c
index 4f7704342410..b94f8d1b262f 100644
--- a/drivers/infiniband/core/cache.c
+++ b/drivers/infiniband/core/cache.c
@@ -893,7 +893,7 @@ int ib_find_gid_by_filter(struct ib_device *device,
893 void *context, u16 *index) 893 void *context, u16 *index)
894{ 894{
895 /* Only RoCE GID table supports filter function */ 895 /* Only RoCE GID table supports filter function */
896 if (!rdma_cap_roce_gid_table(device, port_num) && filter) 896 if (!rdma_protocol_roce(device, port_num) && filter)
897 return -EPROTONOSUPPORT; 897 return -EPROTONOSUPPORT;
898 898
899 return ib_cache_gid_find_by_filter(device, gid, 899 return ib_cache_gid_find_by_filter(device, gid,