summaryrefslogtreecommitdiffstats
path: root/include/rdma/ib_cache.h
diff options
context:
space:
mode:
authorMatan Barak <matanb@mellanox.com>2015-10-15 17:38:50 +0200
committerDoug Ledford <dledford@redhat.com>2015-10-22 05:48:17 +0200
commit99b27e3b5da0871cb43980960fb14ff625adffad (patch)
treed34bd4b4fc3e5eddbf819beb67924e6338131b33 /include/rdma/ib_cache.h
parentIB/cma: cma_validate_port should verify the port and netdevice (diff)
downloadlinux-99b27e3b5da0871cb43980960fb14ff625adffad.tar.xz
linux-99b27e3b5da0871cb43980960fb14ff625adffad.zip
IB/cache: Add ib_find_gid_by_filter cache API
GID cache API users might want to search for GIDs with specific attributes rather than just specifying GID, net device and port. This is used in a later patch, where we find the sgid index by L2 Ethernet attributes. Signed-off-by: Matan Barak <matanb@mellanox.com> Reviewed-By: Devesh Sharma <devesh.sharma@avagotech.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'include/rdma/ib_cache.h')
-rw-r--r--include/rdma/ib_cache.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/rdma/ib_cache.h b/include/rdma/ib_cache.h
index 679d7ca6a3ee..269a27cf0a46 100644
--- a/include/rdma/ib_cache.h
+++ b/include/rdma/ib_cache.h
@@ -93,6 +93,14 @@ int ib_find_cached_gid_by_port(struct ib_device *device,
u8 port_num,
struct net_device *ndev,
u16 *index);
+
+int ib_find_gid_by_filter(struct ib_device *device,
+ const union ib_gid *gid,
+ u8 port_num,
+ bool (*filter)(const union ib_gid *gid,
+ const struct ib_gid_attr *,
+ void *),
+ void *context, u16 *index);
/**
* ib_get_cached_pkey - Returns a cached PKey table entry
* @device: The device to query.