Message ID | 20200624104012.1450880-2-leon@kernel.org |
---|---|
State | New |
Headers | show |
Series | [iproute2-next,v1,1/4] rdma: update uapi headers | expand |
On 6/24/20 4:40 AM, Leon Romanovsky wrote: > diff --git a/rdma/include/uapi/rdma/rdma_netlink.h b/rdma/include/uapi/rdma/rdma_netlink.h > index ae5a77a1..fe127b88 100644 > --- a/rdma/include/uapi/rdma/rdma_netlink.h > +++ b/rdma/include/uapi/rdma/rdma_netlink.h > @@ -287,6 +287,12 @@ enum rdma_nldev_command { > > RDMA_NLDEV_CMD_STAT_DEL, > > + RDMA_NLDEV_CMD_RES_QP_GET_RAW, /* can dump */ > + > + RDMA_NLDEV_CMD_RES_CQ_GET_RAW, /* can dump */ > + > + RDMA_NLDEV_CMD_RES_MR_GET_RAW, /* can dump */ > + > RDMA_NLDEV_NUM_OPS > }; you are inserting new commands in the middle which breaks existing users of this API.
On Sun, Jul 05, 2020 at 09:02:42AM -0600, David Ahern wrote: > On 6/24/20 4:40 AM, Leon Romanovsky wrote: > > diff --git a/rdma/include/uapi/rdma/rdma_netlink.h b/rdma/include/uapi/rdma/rdma_netlink.h > > index ae5a77a1..fe127b88 100644 > > --- a/rdma/include/uapi/rdma/rdma_netlink.h > > +++ b/rdma/include/uapi/rdma/rdma_netlink.h > > @@ -287,6 +287,12 @@ enum rdma_nldev_command { > > > > RDMA_NLDEV_CMD_STAT_DEL, > > > > + RDMA_NLDEV_CMD_RES_QP_GET_RAW, /* can dump */ > > + > > + RDMA_NLDEV_CMD_RES_CQ_GET_RAW, /* can dump */ > > + > > + RDMA_NLDEV_CMD_RES_MR_GET_RAW, /* can dump */ > > + > > RDMA_NLDEV_NUM_OPS > > }; > > you are inserting new commands in the middle which breaks existing users > of this API. RDMA_NLDEV_NUM_OPS is not a command, but enum item to help calculate array size, exactly like devlink_command in include/uapi/linux/devlink.h. Thanks >
On 7/5/20 12:04 PM, Leon Romanovsky wrote: > RDMA_NLDEV_NUM_OPS is not a command, but enum item to help calculate array > size, exactly like devlink_command in include/uapi/linux/devlink.h. ok. usually the last field is __FOO_MAX not FOO_NUM.
On Sun, Jul 05, 2020 at 12:07:31PM -0600, David Ahern wrote: > On 7/5/20 12:04 PM, Leon Romanovsky wrote: > > RDMA_NLDEV_NUM_OPS is not a command, but enum item to help calculate array > > size, exactly like devlink_command in include/uapi/linux/devlink.h. > > ok. usually the last field is __FOO_MAX not FOO_NUM. I used same naming style as we had for other enums in rdma_netlink.h. Thanks
diff --git a/rdma/include/uapi/rdma/rdma_netlink.h b/rdma/include/uapi/rdma/rdma_netlink.h index ae5a77a1..fe127b88 100644 --- a/rdma/include/uapi/rdma/rdma_netlink.h +++ b/rdma/include/uapi/rdma/rdma_netlink.h @@ -287,6 +287,12 @@ enum rdma_nldev_command { RDMA_NLDEV_CMD_STAT_DEL, + RDMA_NLDEV_CMD_RES_QP_GET_RAW, /* can dump */ + + RDMA_NLDEV_CMD_RES_CQ_GET_RAW, /* can dump */ + + RDMA_NLDEV_CMD_RES_MR_GET_RAW, /* can dump */ + RDMA_NLDEV_NUM_OPS }; @@ -525,6 +531,8 @@ enum rdma_nldev_attr { */ RDMA_NLDEV_ATTR_DEV_DIM, /* u8 */ + RDMA_NLDEV_ATTR_RES_RAW, /* binary */ + /* * Always the end */