aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/rdma/rdma_netlink.h
diff options
context:
space:
mode:
authorLeon Romanovsky <leonro@mellanox.com>2018-01-28 11:17:24 +0200
committerJason Gunthorpe <jgg@mellanox.com>2018-01-29 20:21:40 -0700
commitbf3c5a93c52368410a521af34ed3bff91a99df44 (patch)
treee8a43619c4c4682f45a93616806d8af01847ae9e /include/uapi/rdma/rdma_netlink.h
parentRDMA/core: Add resource tracking for create and destroy PDs (diff)
downloadlinux-dev-bf3c5a93c52368410a521af34ed3bff91a99df44.tar.xz
linux-dev-bf3c5a93c52368410a521af34ed3bff91a99df44.zip
RDMA/nldev: Provide global resource utilization
Expose through the netlink interface the global per-device utilization of the supported object types. Provide both dumpit and doit callbacks. As an example of possible output from rdmatool for system with 5 mlx5 cards: $ rdma res 1: mlx5_0: qp 4 cq 5 pd 3 2: mlx5_1: qp 4 cq 5 pd 3 3: mlx5_2: qp 4 cq 5 pd 3 4: mlx5_3: qp 2 cq 3 pd 2 5: mlx5_4: qp 4 cq 5 pd 3 Reviewed-by: Mark Bloch <markb@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Reviewed-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'include/uapi/rdma/rdma_netlink.h')
-rw-r--r--include/uapi/rdma/rdma_netlink.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/uapi/rdma/rdma_netlink.h b/include/uapi/rdma/rdma_netlink.h
index cc002e316d09..22c39532c411 100644
--- a/include/uapi/rdma/rdma_netlink.h
+++ b/include/uapi/rdma/rdma_netlink.h
@@ -236,6 +236,8 @@ enum rdma_nldev_command {
RDMA_NLDEV_CMD_PORT_NEW,
RDMA_NLDEV_CMD_PORT_DEL,
+ RDMA_NLDEV_CMD_RES_GET, /* can dump */
+
RDMA_NLDEV_NUM_OPS
};
@@ -303,6 +305,11 @@ enum rdma_nldev_attr {
RDMA_NLDEV_ATTR_DEV_NODE_TYPE, /* u8 */
+ RDMA_NLDEV_ATTR_RES_SUMMARY, /* nested table */
+ RDMA_NLDEV_ATTR_RES_SUMMARY_ENTRY, /* nested table */
+ RDMA_NLDEV_ATTR_RES_SUMMARY_ENTRY_NAME, /* string */
+ RDMA_NLDEV_ATTR_RES_SUMMARY_ENTRY_CURR, /* u64 */
+
RDMA_NLDEV_ATTR_MAX
};
#endif /* _UAPI_RDMA_NETLINK_H */