summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/hns/hns_roce_main.c
diff options
context:
space:
mode:
authorWenpeng Liang <liangwenpeng@huawei.com>2022-08-22 18:44:54 +0800
committerLeon Romanovsky <leonro@nvidia.com>2022-08-23 11:35:22 +0300
commitdc9981ef17c6ac371d098c574dcc2ad3de68f567 (patch)
tree46d79126df5a961b69e3f7eb30022a6d86a05eb1 /drivers/infiniband/hw/hns/hns_roce_main.c
parent3e89d78b21a88120f6a858391faba97f2878266e (diff)
RDMA/hns: Support MR's restrack ops for hns driver
The MR restrack attributes come from the queue information maintained by the driver. For example: $ rdma res show mr dev hns_0 mrn 6 -dd -jp [ { "ifindex": 4, "ifname": "hns_0", "mrn": 6, "rkey": "300", "lkey": "300", "mrlen": 131072, "pdn": 8, "pid": 1524, "comm": "ib_send_bw" }, "drv_pbl_hop_num": 2, "drv_ba_pg_shift": 14, "drv_buf_pg_shift": 12 } Link: https://lore.kernel.org/r/20220822104455.2311053-7-liangwenpeng@huawei.com Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com> Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'drivers/infiniband/hw/hns/hns_roce_main.c')
-rw-r--r--drivers/infiniband/hw/hns/hns_roce_main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/hns/hns_roce_main.c b/drivers/infiniband/hw/hns/hns_roce_main.c
index 17bc73c108f2..ff4386b5c064 100644
--- a/drivers/infiniband/hw/hns/hns_roce_main.c
+++ b/drivers/infiniband/hw/hns/hns_roce_main.c
@@ -570,6 +570,7 @@ static const struct ib_device_ops hns_roce_dev_restrack_ops = {
.fill_res_cq_entry_raw = hns_roce_fill_res_cq_entry_raw,
.fill_res_qp_entry = hns_roce_fill_res_qp_entry,
.fill_res_qp_entry_raw = hns_roce_fill_res_qp_entry_raw,
+ .fill_res_mr_entry = hns_roce_fill_res_mr_entry,
};
static int hns_roce_register_device(struct hns_roce_dev *hr_dev)