RDMA/hns: Append SCC context to the raw dump of QPC
authorwenglianfa <wenglianfa@huawei.com>
Tue, 5 Mar 2024 05:52:57 +0000 (13:52 +0800)
committerLeon Romanovsky <leon@kernel.org>
Thu, 7 Mar 2024 09:26:10 +0000 (11:26 +0200)
commit124a9fbe43aa227cabddba1ecde67f40cae74abb
treefeaa8cf6e82b40d7de1a1c69bd519a5eaed3f528
parent155f04366e3cad7cc7471f8736aa05ec0300cddd
RDMA/hns: Append SCC context to the raw dump of QPC

SCCC (SCC Context) is a context with QP granularity that contains
information about congestion control. Dump SCCC and QPC together
to improve troubleshooting.

When dumping raw QPC with rdmatool, there will be a total of 576 bytes
data output, where the first 512 bytes is QPC and the last 64 bytes is
SCCC. When congestion control is disabled, the 64 byte SCCC will be all 0.

Example:
$rdma res show qp -jpr
[ {
        "ifindex": 0,
        "ifname": "hns_0",
"data": [ 67,0,0,0... 512bytes
  4,0,2... 64bytes]
  },...
} ]

Signed-off-by: wenglianfa <wenglianfa@huawei.com>
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
Link: https://lore.kernel.org/r/20240305055257.823513-1-huangjunxian6@hisilicon.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/hns/hns_roce_cmd.h
drivers/infiniband/hw/hns/hns_roce_device.h
drivers/infiniband/hw/hns/hns_roce_hw_v2.c
drivers/infiniband/hw/hns/hns_roce_hw_v2.h
drivers/infiniband/hw/hns/hns_roce_restrack.c