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>
This commit is contained in:

committed by
Jason Gunthorpe

parent
f4df9a7c34
commit
bf399c2cad
@@ -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 */
|
||||
|
Reference in New Issue
Block a user