diff options
author | Parav Pandit <parav@mellanox.com> | 2018-06-05 08:40:17 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2018-06-18 20:09:05 +0300 |
commit | bf399c2cadfa66d399d01d5a92a7bb0a112f1568 (patch) | |
tree | 4bec872b23a13d79c1b65083bd236fbe1f7fce3e /include/rdma/ib_cache.h | |
parent | f4df9a7c34d8f9e84af73ce187bcdf6fea65c4cb (diff) | |
download | linux-bf399c2cadfa66d399d01d5a92a7bb0a112f1568.tar.xz |
IB/core: Introduce GID attribute get, put and hold APIs
This patch introduces three APIs, rdma_get_gid_attr(),
rdma_put_gid_attr(), and rdma_hold_gid_attr() which expose the reference
counting for GID table entries to the entire stack. The kref counting is
based on the struct ib_gid_attr pointer
Later patches will convert more cache query function to return struct
ib_gid_attrs.
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 'include/rdma/ib_cache.h')
-rw-r--r-- | include/rdma/ib_cache.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/rdma/ib_cache.h b/include/rdma/ib_cache.h index a5f249828115..00ccd00d0596 100644 --- a/include/rdma/ib_cache.h +++ b/include/rdma/ib_cache.h @@ -150,4 +150,8 @@ int ib_get_cached_port_state(struct ib_device *device, enum ib_port_state *port_active); bool rdma_is_zero_gid(const union ib_gid *gid); +const struct ib_gid_attr *rdma_get_gid_attr(struct ib_device *device, + u8 port_num, int index); +void rdma_put_gid_attr(const struct ib_gid_attr *attr); +void rdma_hold_gid_attr(const struct ib_gid_attr *attr); #endif /* _IB_CACHE_H */ |