mbox series

[for-next,v3,0/2] RDMA/erdma: Introduce hardware statistics support

Message ID 20231227084800.99091-1-chengyou@linux.alibaba.com (mailing list archive)
Headers show
Series RDMA/erdma: Introduce hardware statistics support | expand

Message

Cheng Xu Dec. 27, 2023, 8:47 a.m. UTC
This small patchset introduces the support of hardware statistics.
Statistics counters can not be put in CQEs due to limited CQE size. To
address this, we provide an extra dma buffer to hardware when posting
statistics query request, and then hardware writes back the response to
this dma buffer. Based on this, we add the hardware statistics support
of erdma.

- #1 introduces dma pool used for hardware responses of CMDQ requests.
- #2 adds hardware statistics support.

Changes in v3:
- Fix compiler warning reported by kernel test robot.

Changes in v2:
- Remove extra layer of erdma_dma_pools_init and erdma_dma_pools_destroy
- Move ERDMA_HW_RESP_SIZE from patch #2 to #1 because it's used in #1
- Remove unrelated change in patch #2
- Remove "hw_" prefix and add "tx_" prefix to some items in erdma_descs
- Use dma_pool_zalloc instead of dma_pool_alloc with __GFP_ZERO flag
- Remove port index check logic in erdma_get_hw_stats

Cheng Xu (2):
  RDMA/erdma: Introduce dma pool for hardware responses of CMDQ requests
  RDMA/erdma: Add hardware statistics support

 drivers/infiniband/hw/erdma/erdma.h       |  2 +
 drivers/infiniband/hw/erdma/erdma_hw.h    | 39 ++++++++++
 drivers/infiniband/hw/erdma/erdma_main.c  | 26 ++++++-
 drivers/infiniband/hw/erdma/erdma_verbs.c | 90 +++++++++++++++++++++++
 drivers/infiniband/hw/erdma/erdma_verbs.h |  4 +
 5 files changed, 159 insertions(+), 2 deletions(-)

Comments

Leon Romanovsky Dec. 30, 2023, 3:23 p.m. UTC | #1
On Wed, 27 Dec 2023 16:47:58 +0800, Cheng Xu wrote:
> This small patchset introduces the support of hardware statistics.
> Statistics counters can not be put in CQEs due to limited CQE size. To
> address this, we provide an extra dma buffer to hardware when posting
> statistics query request, and then hardware writes back the response to
> this dma buffer. Based on this, we add the hardware statistics support
> of erdma.
> 
> [...]

Applied, thanks!

[1/2] RDMA/erdma: Introduce dma pool for hardware responses of CMDQ requests
      https://git.kernel.org/rdma/rdma/c/68cf9d82f75c07
[2/2] RDMA/erdma: Add hardware statistics support
      https://git.kernel.org/rdma/rdma/c/63a43a675cb90e

Best regards,