diff options
author | Maor Gottlieb <maorg@mellanox.com> | 2020-06-23 13:30:36 +0200 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2020-06-23 16:46:27 +0200 |
commit | f4434529003522d72b314d26d65b18c06ea9307c (patch) | |
tree | 30cf9a8f7e328acf4ac6a01ad917bee24c3cd9fe /drivers/infiniband/hw/cxgb4/restrack.c | |
parent | RDMA/core: Don't call fill_res_entry for PD (diff) | |
download | linux-f4434529003522d72b314d26d65b18c06ea9307c.tar.xz linux-f4434529003522d72b314d26d65b18c06ea9307c.zip |
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>
Diffstat (limited to 'drivers/infiniband/hw/cxgb4/restrack.c')
-rw-r--r-- | drivers/infiniband/hw/cxgb4/restrack.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/cxgb4/restrack.c b/drivers/infiniband/hw/cxgb4/restrack.c index f82d46ed969d..9a5ca9192c1c 100644 --- a/drivers/infiniband/hw/cxgb4/restrack.c +++ b/drivers/infiniband/hw/cxgb4/restrack.c @@ -433,10 +433,8 @@ err: return -EMSGSIZE; } -static int fill_res_mr_entry(struct sk_buff *msg, - struct rdma_restrack_entry *res) +int c4iw_fill_res_mr_entry(struct sk_buff *msg, struct ib_mr *ibmr) { - struct ib_mr *ibmr = container_of(res, struct ib_mr, res); struct c4iw_mr *mhp = to_c4iw_mr(ibmr); struct c4iw_dev *dev = mhp->rhp; u32 stag = mhp->attr.stag; @@ -497,5 +495,4 @@ c4iw_restrack_func *c4iw_restrack_funcs[RDMA_RESTRACK_MAX] = { [RDMA_RESTRACK_QP] = fill_res_qp_entry, [RDMA_RESTRACK_CM_ID] = fill_res_ep_entry, [RDMA_RESTRACK_CQ] = fill_res_cq_entry, - [RDMA_RESTRACK_MR] = fill_res_mr_entry, }; |