diff options
author | Matan Barak <matanb@mellanox.com> | 2015-10-15 18:38:46 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2015-10-21 23:48:17 -0400 |
commit | d300ec528b799ca87935b3667f5563f397f00f85 (patch) | |
tree | 731294d458a5a6f2717277497892271b3903d2de /include/rdma/ib_cache.h | |
parent | 55ee3ab2e49a9ead850722ef47698243dd226d16 (diff) | |
download | op-kernel-dev-d300ec528b799ca87935b3667f5563f397f00f85.zip op-kernel-dev-d300ec528b799ca87935b3667f5563f397f00f85.tar.gz |
IB/core: Expose and rename ib_find_cached_gid_by_port cache API
Sometime consumers might want to search for a GID in a specific port.
For example, when a WC arrives and we want to search the GID
that matches that port - it's better to search only the relevant
port.
Exposing and renaming ib_cache_gid_find_by_port in order to match
the naming convention of the module.
Signed-off-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'include/rdma/ib_cache.h')
-rw-r--r-- | include/rdma/ib_cache.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/rdma/ib_cache.h b/include/rdma/ib_cache.h index dcc9bed..679d7ca 100644 --- a/include/rdma/ib_cache.h +++ b/include/rdma/ib_cache.h @@ -75,6 +75,25 @@ int ib_find_cached_gid(struct ib_device *device, u16 *index); /** + * ib_find_cached_gid_by_port - Returns the GID table index where a specified + * GID value occurs + * @device: The device to query. + * @gid: The GID value to search for. + * @port_num: The port number of the device where the GID value sould be + * searched. + * @ndev: In RoCE, the net device of the device. Null means ignore. + * @index: The index into the cached GID table where the GID was found. This + * parameter may be NULL. + * + * ib_find_cached_gid() searches for the specified GID value in + * the local software cache. + */ +int ib_find_cached_gid_by_port(struct ib_device *device, + const union ib_gid *gid, + u8 port_num, + struct net_device *ndev, + u16 *index); +/** * ib_get_cached_pkey - Returns a cached PKey table entry * @device: The device to query. * @port_num: The port number of the device to query. |