From: Parav Pandit Date: Sun, 25 Mar 2018 10:40:21 +0000 (+0300) Subject: IB/core: Refer to RoCE port property instead of GID table property X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=4ab7cb4bf362dc3b85fd8ddac3b16949404be96b;p=linux.git 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 Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe --- diff --git a/drivers/infiniband/core/cache.c b/drivers/infiniband/core/cache.c index 4f77043424104..b94f8d1b262f4 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, 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,