RDMA/nldev: Allow counter auto mode configration through RDMA netlink

Provide an option to enable/disable per-port counter auto mode through
RDMA netlink. Limit it to users with ADMIN capability only.

Signed-off-by: Mark Zhang <markz@mellanox.com>
Reviewed-by: Majd Dibbiny <majd@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:
Mark Zhang
2019-07-02 13:02:39 +03:00
committed by Jason Gunthorpe
parent 45842fc627
commit b47ae6f803
2 changed files with 86 additions and 0 deletions

View File

@@ -281,6 +281,8 @@ enum rdma_nldev_command {
RDMA_NLDEV_CMD_GET_CHARDEV,
RDMA_NLDEV_CMD_STAT_SET,
RDMA_NLDEV_NUM_OPS
};
@@ -488,6 +490,12 @@ enum rdma_nldev_attr {
* File descriptor handle of the net namespace object
*/
RDMA_NLDEV_NET_NS_FD, /* u32 */
/*
* Counter-specific attributes.
*/
RDMA_NLDEV_ATTR_STAT_MODE, /* u32 */
RDMA_NLDEV_ATTR_STAT_RES, /* u32 */
RDMA_NLDEV_ATTR_STAT_AUTO_MODE_MASK, /* u32 */
/*
* Information about a chardev.