Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Kalesh AP and committed by
Leon Romanovsky
949e7c06 13edc7d4

+12 -2
+12 -2
drivers/infiniband/hw/bnxt_re/debugfs.c
··· 87 87 size_t count, loff_t *ppos) 88 88 { 89 89 struct bnxt_re_qp *qp = filep->private_data; 90 + struct bnxt_qplib_qp *qplib_qp; 91 + u32 rate_limit = 0; 90 92 char *buf; 91 93 int len; 92 94 93 95 if (*ppos) 94 96 return 0; 97 + 98 + qplib_qp = &qp->qplib_qp; 99 + if (qplib_qp->shaper_allocation_status) 100 + rate_limit = qplib_qp->rate_limit; 95 101 96 102 buf = kasprintf(GFP_KERNEL, 97 103 "QPN\t\t: %d\n" ··· 105 99 "state\t\t: %s\n" 106 100 "mtu\t\t: %d\n" 107 101 "timeout\t\t: %d\n" 108 - "remote QPN\t: %d\n", 102 + "remote QPN\t: %d\n" 103 + "shaper allocated : %d\n" 104 + "rate limit\t: %d kbps\n", 109 105 qp->qplib_qp.id, 110 106 bnxt_re_qp_type_str(qp->qplib_qp.type), 111 107 bnxt_re_qp_state_str(qp->qplib_qp.state), 112 108 qp->qplib_qp.mtu, 113 109 qp->qplib_qp.timeout, 114 - qp->qplib_qp.dest_qpn); 110 + qp->qplib_qp.dest_qpn, 111 + qplib_qp->shaper_allocation_status, 112 + rate_limit); 115 113 if (!buf) 116 114 return -ENOMEM; 117 115 if (count < strlen(buf)) {