summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/erdma/erdma_main.c
diff options
context:
space:
mode:
authorCheng Xu <chengyou@linux.alibaba.com>2023-12-27 11:48:00 +0300
committerLeon Romanovsky <leon@kernel.org>2023-12-30 18:23:17 +0300
commit63a43a675cb90e8a56e9119fff68292561204b27 (patch)
treeedd6cdc29f4d72c9e14427e9c70b98b000ed09a1 /drivers/infiniband/hw/erdma/erdma_main.c
parent68cf9d82f75c07d4117bca8129a770efa9d89f62 (diff)
downloadlinux-63a43a675cb90e8a56e9119fff68292561204b27.tar.xz
RDMA/erdma: Add hardware statistics support
First, we add a new command to query hardware statistics, and then implement two functions: ib_device_ops.alloc_hw_port_stats and ib_device_ops.get_hw_stats to allow rdma tool can get the statistics of erdma device. Signed-off-by: Cheng Xu <chengyou@linux.alibaba.com> Link: https://lore.kernel.org/r/20231227084800.99091-3-chengyou@linux.alibaba.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'drivers/infiniband/hw/erdma/erdma_main.c')
-rw-r--r--drivers/infiniband/hw/erdma/erdma_main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/erdma/erdma_main.c b/drivers/infiniband/hw/erdma/erdma_main.c
index e4df5bf89cd0..472939172f0c 100644
--- a/drivers/infiniband/hw/erdma/erdma_main.c
+++ b/drivers/infiniband/hw/erdma/erdma_main.c
@@ -468,6 +468,7 @@ static const struct ib_device_ops erdma_device_ops = {
.driver_id = RDMA_DRIVER_ERDMA,
.uverbs_abi_ver = ERDMA_ABI_VERSION,
+ .alloc_hw_port_stats = erdma_alloc_hw_port_stats,
.alloc_mr = erdma_ib_alloc_mr,
.alloc_pd = erdma_alloc_pd,
.alloc_ucontext = erdma_alloc_ucontext,
@@ -479,6 +480,7 @@ static const struct ib_device_ops erdma_device_ops = {
.destroy_cq = erdma_destroy_cq,
.destroy_qp = erdma_destroy_qp,
.get_dma_mr = erdma_get_dma_mr,
+ .get_hw_stats = erdma_get_hw_stats,
.get_port_immutable = erdma_get_port_immutable,
.iw_accept = erdma_accept,
.iw_add_ref = erdma_qp_get_ref,