diff options
| author | Kalesh AP <kalesh-anakkur.purayil@broadcom.com> | 2026-02-02 16:34:11 +0300 |
|---|---|---|
| committer | Leon Romanovsky <leon@kernel.org> | 2026-02-02 16:37:59 +0300 |
| commit | 949e7c062d3769d9522e8a4abe080fb92ddd61bf (patch) | |
| tree | 4f09842830e48bbf0f9ec95e50658b79866d6736 | |
| parent | 13edc7d4e0aa4abb5d50a062b61b9bffb01b0327 (diff) | |
| download | linux-949e7c062d3769d9522e8a4abe080fb92ddd61bf.tar.xz | |
RDMA/bnxt_re: Report QP rate limit in debugfs
Update QP info debugfs hook to report the rate limit applied
on the QP. 0 means unlimited.
Signed-off-by: Damodharam Ammepalli <damodharam.ammepalli@broadcom.com>
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Link: https://patch.msgid.link/20260202133413.3182578-4-kalesh-anakkur.purayil@broadcom.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
| -rw-r--r-- | drivers/infiniband/hw/bnxt_re/debugfs.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/bnxt_re/debugfs.c b/drivers/infiniband/hw/bnxt_re/debugfs.c index 88817c86ae24..e025217861c2 100644 --- a/drivers/infiniband/hw/bnxt_re/debugfs.c +++ b/drivers/infiniband/hw/bnxt_re/debugfs.c @@ -87,25 +87,35 @@ static ssize_t qp_info_read(struct file *filep, size_t count, loff_t *ppos) { struct bnxt_re_qp *qp = filep->private_data; + struct bnxt_qplib_qp *qplib_qp; + u32 rate_limit = 0; char *buf; int len; if (*ppos) return 0; + qplib_qp = &qp->qplib_qp; + if (qplib_qp->shaper_allocation_status) + rate_limit = qplib_qp->rate_limit; + buf = kasprintf(GFP_KERNEL, "QPN\t\t: %d\n" "transport\t: %s\n" "state\t\t: %s\n" "mtu\t\t: %d\n" "timeout\t\t: %d\n" - "remote QPN\t: %d\n", + "remote QPN\t: %d\n" + "shaper allocated : %d\n" + "rate limit\t: %d kbps\n", qp->qplib_qp.id, bnxt_re_qp_type_str(qp->qplib_qp.type), bnxt_re_qp_state_str(qp->qplib_qp.state), qp->qplib_qp.mtu, qp->qplib_qp.timeout, - qp->qplib_qp.dest_qpn); + qp->qplib_qp.dest_qpn, + qplib_qp->shaper_allocation_status, + rate_limit); if (!buf) return -ENOMEM; if (count < strlen(buf)) { |
