On Tue, Jun 18, 2024 at 01:13:45PM -0300, Jason Gunthorpe wrote: > On Tue, Jun 18, 2024 at 07:05:59PM +0300, Leon Romanovsky wrote: > > On Tue, Jun 18, 2024 at 10:08:54AM -0300, Jason Gunthorpe wrote: > > > On Tue, Jun 18, 2024 at 08:05:57AM +0300, Leon Romanovsky wrote: > > > > On Mon, Jun 17, 2024 at 05:10:03PM -0300, Jason Gunthorpe wrote: > > > > > On Mon, Jun 17, 2024 at 06:49:47PM +0300, Leon Romanovsky wrote: > > > > > > On Mon, Jun 17, 2024 at 10:44:09AM -0300, Jason Gunthorpe wrote: > > > > > > > On Sun, Jun 16, 2024 at 07:15:57PM +0300, Leon Romanovsky wrote: > > > > > > > > > > > > > > > @@ -63,6 +63,7 @@ enum uverbs_default_objects { > > > > > > > > enum { > > > > > > > > UVERBS_ATTR_UHW_IN = UVERBS_UDATA_DRIVER_DATA_FLAG, > > > > > > > > UVERBS_ATTR_UHW_OUT, > > > > > > > > + UVERBS_ATTR_UHW_DRIVER_DATA, > > > > > > > > > > > > > > The start of the driver's attributes is not a "UHW", the UHW is only > > > > > > > the old structs. > > > > > > > > > > > > I asked from Akiva to keep existing naming convention UVERBS_ATTR_UHW_XXX > > > > > > to emphasize the namespace and the position of this attribute as > > > > > > relevant for existing UHW calls. > > > > > > > > > > Well, calling it DRIVER_DATA and UHW is very confusing when it is > > > > > really the start of the indexing for drivers that use UHW. > > > > > > > > > > A better name is needed > > > > > > > > UVERBS_ATTR_UHW_PRIVATE ???? > > > > > > I think it need to have the word "start" in it, because it is the > > > start of numbers, not an actual number itself. > > > > UVERBS_ATTR_UHW_DRIVER_DATA_START ???? > > What do you suggest instead? > > How about: ok, let's take this variant. Thanks > > diff --git a/include/uapi/rdma/ib_user_ioctl_cmds.h b/include/uapi/rdma/ib_user_ioctl_cmds.h > index dafc7ebe545b8d..e9322f66cd2dec 100644 > --- a/include/uapi/rdma/ib_user_ioctl_cmds.h > +++ b/include/uapi/rdma/ib_user_ioctl_cmds.h > @@ -37,9 +37,6 @@ > #define UVERBS_ID_NS_MASK 0xF000 > #define UVERBS_ID_NS_SHIFT 12 > > -#define UVERBS_UDATA_DRIVER_DATA_NS 1 > -#define UVERBS_UDATA_DRIVER_DATA_FLAG (1UL << UVERBS_ID_NS_SHIFT) > - > enum uverbs_default_objects { > UVERBS_OBJECT_DEVICE, /* No instances of DEVICE are allowed */ > UVERBS_OBJECT_PD, > @@ -61,8 +58,10 @@ enum uverbs_default_objects { > }; > > enum { > - UVERBS_ATTR_UHW_IN = UVERBS_UDATA_DRIVER_DATA_FLAG, > + UVERBS_ID_DRIVER_NS = 1U << UVERBS_ID_NS_SHIFT, > + UVERBS_ATTR_UHW_IN = UVERBS_ID_DRIVER_NS, > UVERBS_ATTR_UHW_OUT, > + UVERBS_ID_DRIVER_NS_WITH_UHW, > }; > > enum uverbs_methods_device { > > And recommend replacing the open coded UVERBS_ID_DRIVER_NS all over > the place. > > > > It is also not PRIVATE at all, this is just in the device specific > > > space number space, not the core space. > > > > Private in the sense of driver specific, like net_priv(). > > It is not a private, it is a namespace, that is the naming that was > used here. > > Jason