RDMA/hns: Add or remove CQ's restrack attributes
authorWenpeng Liang <liangwenpeng@huawei.com>
Mon, 22 Aug 2022 10:44:50 +0000 (18:44 +0800)
committerLeon Romanovsky <leonro@nvidia.com>
Tue, 23 Aug 2022 08:34:51 +0000 (11:34 +0300)
commiteb00b9a08b9dbb0aad7c59d113f35206c7ac2eac
tree151a72cd9791267e5a543cd67313bc4ab84dea33
parent40b4b79c866ffc1414a3989cc480263e76f28589
RDMA/hns: Add or remove CQ's restrack attributes

Remove the resttrack attributes from the queue context held by ROCEE, and
add the resttrack attributes from the queue information maintained by the
driver.

For example:

$ rdma res show cq dev hns_0 cqn 14 -dd -jp
[ {
        "ifindex": 4,
        "ifname": "hns_0",
        "cqn": 14,
        "cqe": 127,
        "users": 1,
        "adaptive-moderation": false,
        "ctxn": 8,
        "pid": 1524,
        "comm": "ib_send_bw"
    },
    "drv_cq_depth": 128,
    "drv_cons_index": 0,
    "drv_cqe_size": 32,
    "drv_arm_sn": 1
}

Link: https://lore.kernel.org/r/20220822104455.2311053-3-liangwenpeng@huawei.com
Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/hns/hns_roce_restrack.c