Subject: Re: [PATCH rdma-next v5 11/17] RDMA/netlink: Implement counter dumpit calback

From: Jason Gunthorpe <[email-masked]>
Date: Thu, 4 Jul 2019 15:07:16 -0300

On Tue, Jul 02, 2019 at 01:02:40PM +0300, Leon Romanovsky wrote:
> diff --git a/include/uapi/rdma/rdma_netlink.h b/include/uapi/rdma/rdma_netlink.h
> index 0cb47d23fd86..22c5bc7a82dd 100644
> +++ b/include/uapi/rdma/rdma_netlink.h
> @@ -283,6 +283,8 @@ enum rdma_nldev_command {
>  
>  	RDMA_NLDEV_CMD_STAT_SET,
>  
> +	RDMA_NLDEV_CMD_STAT_GET, /* can dump */
> +
>  	RDMA_NLDEV_NUM_OPS
>  };
>  
> @@ -496,7 +498,13 @@ enum rdma_nldev_attr {
>  	RDMA_NLDEV_ATTR_STAT_MODE,		/* u32 */
>  	RDMA_NLDEV_ATTR_STAT_RES,		/* u32 */
>  	RDMA_NLDEV_ATTR_STAT_AUTO_MODE_MASK,	/* u32 */
> -
> +	RDMA_NLDEV_ATTR_STAT_COUNTER,		/* nested table */
> +	RDMA_NLDEV_ATTR_STAT_COUNTER_ENTRY,	/* nested table */
> +	RDMA_NLDEV_ATTR_STAT_COUNTER_ID,	/* u32 */
> +	RDMA_NLDEV_ATTR_STAT_HWCOUNTERS,	/* nested table */
> +	RDMA_NLDEV_ATTR_STAT_HWCOUNTER_ENTRY,	/* nested table */
> +	RDMA_NLDEV_ATTR_STAT_HWCOUNTER_ENTRY_NAME,	/* string */
> +	RDMA_NLDEV_ATTR_STAT_HWCOUNTER_ENTRY_VALUE,	/* u64 */
>  	/*
>  	 * Information about a chardev.
>  	 * CHARDEV_TYPE is the name of the chardev ABI (ie uverbs, umad, etc)

This is in the wrong place, needs to be at the end.

Jason