RDMA/hns: Add trace for flush CQE
authorJunxian Huang <huangjunxian6@hisilicon.com>
Mon, 21 Apr 2025 13:27:45 +0000 (21:27 +0800)
committerLeon Romanovsky <leon@kernel.org>
Mon, 21 Apr 2025 18:20:27 +0000 (14:20 -0400)
commit02007e3ddc0790ed5a6a504892d7aa1a917076bc
treeab5bc25af599c3313b07f53c7b2c6e560eeb2b38
parent685f9537a72877693a1ab116d155acc89562c29b
RDMA/hns: Add trace for flush CQE

Add trace to print the producer index of QP when triggering flush CQE.

Output example:
$ cat /sys/kernel/debug/tracing/trace
  tracer: nop

  entries-in-buffer/entries-written: 2/2   #P:128

                                 _-----=> irqs-off/BH-disabled
                                / _----=> need-resched
                               | / _---=> hardirq/softirq
                               || / _--=> preempt-depth
                               ||| / _-=> migrate-disable
                               |||| /     delay
            TASK-PID     CPU#  |||||  TIMESTAMP  FUNCTION
               | |         |   |||||     |         |
      ib_send_bw-11474   [075] d..1.  2393.434738: hns_sq_flush_cqe: SQ 0x2 flush head 0xb5c7.
      ib_send_bw-11474   [075] d..1.  2393.434739: hns_rq_flush_cqe: RQ 0x2 flush head 0.

Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
Link: https://patch.msgid.link/20250421132750.1363348-2-huangjunxian6@hisilicon.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/hns/hns_roce_device.h
drivers/infiniband/hw/hns/hns_roce_hw_v2.c
drivers/infiniband/hw/hns/hns_roce_trace.h [new file with mode: 0644]