summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTao Cui <cuitao@kylinos.cn>2026-06-15 08:36:46 +0800
committerLeon Romanovsky <leon@kernel.org>2026-07-01 13:51:13 -0400
commit5911f6d6e7cce5f35bcaabc1895616e10a6d0aa2 (patch)
treef2a2635a21210948edeefe8ea85c54a3119b5bc8 /include
parentdc59e4fea9d83f03bad6bddf3fa2e52491777482 (diff)
RDMA/nldev: Add resource summary max values for usage display
Add RDMA_NLDEV_ATTR_RES_SUMMARY_ENTRY_MAX netlink attribute to expose device resource limits (max_qp, max_cq, max_mr, max_pd, max_srq) in the resource summary alongside the existing current count. This allows userspace tools like iproute2's rdma to display resource usage in curr/max format. Expected output from "rdma resource show": Before: 0: mlx5_0: qp 123 cq 45 mr 200 pd 10 After: 0: mlx5_0: qp 123/131072 cq 45/65536 mr 200/1000000 pd 10/32768 In JSON output, both "curr" and "max" fields will be provided so that scripts can compute percentages if needed. The new attribute is optional and backward compatible - old userspace tools will simply ignore it. Signed-off-by: Tao Cui <cuitao@kylinos.cn> Link: https://patch.msgid.link/20260615003646.168704-1-cui.tao@linux.dev Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/uapi/rdma/rdma_netlink.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/uapi/rdma/rdma_netlink.h b/include/uapi/rdma/rdma_netlink.h
index aac9782ddc09..3af946ecbac3 100644
--- a/include/uapi/rdma/rdma_netlink.h
+++ b/include/uapi/rdma/rdma_netlink.h
@@ -605,6 +605,11 @@ enum rdma_nldev_attr {
RDMA_NLDEV_ATTR_FRMR_POOL_KEY_KERNEL_VENDOR_KEY, /* u64 */
/*
+ * Resource summary entry maximum value.
+ */
+ RDMA_NLDEV_ATTR_RES_SUMMARY_ENTRY_MAX, /* u64 */
+
+ /*
* Always the end
*/
RDMA_NLDEV_ATTR_MAX