RDMA: Add dedicated MR resource tracker function

In order to avoid double multiplexing of the resource when it is a MR, add
a dedicated callback function.

Link: https://lore.kernel.org/r/20200623113043.1228482-5-leon@kernel.org
Signed-off-by: Maor Gottlieb <maorg@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
This commit is contained in:
Maor Gottlieb
2020-06-23 14:30:36 +03:00
committed by Jason Gunthorpe
parent 24fd6d6f85
commit f443452900
9 changed files with 19 additions and 51 deletions

View File

@@ -2583,6 +2583,7 @@ struct ib_device_ops {
*/
int (*fill_res_entry)(struct sk_buff *msg,
struct rdma_restrack_entry *entry);
int (*fill_res_mr_entry)(struct sk_buff *msg, struct ib_mr *ibmr);
/* Device lifecycle callbacks */
/*
@@ -2637,8 +2638,7 @@ struct ib_device_ops {
* Allows rdma drivers to add their own restrack attributes
* dumped via 'rdma stat' iproute2 command.
*/
int (*fill_stat_entry)(struct sk_buff *msg,
struct rdma_restrack_entry *entry);
int (*fill_stat_mr_entry)(struct sk_buff *msg, struct ib_mr *ibmr);
DECLARE_RDMA_OBJ_SIZE(ib_ah);
DECLARE_RDMA_OBJ_SIZE(ib_cq);