public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: Akiva Goldberger <agoldberger@nvidia.com>,
	Ajay Sharma <sharmaajay@microsoft.com>,
	Bernard Metzler <bmt@zurich.ibm.com>,
	Chengchang Tang <tangchengchang@huawei.com>,
	Cheng Xu <chengyou@linux.alibaba.com>,
	Junxian Huang <huangjunxian6@hisilicon.com>,
	Kai Shen <kaishen@linux.alibaba.com>,
	linux-rdma@vger.kernel.org, Long Li <longli@microsoft.com>,
	Michael Margolin <mrgolin@amazon.com>,
	Mustafa Ismail <mustafa.ismail@intel.com>,
	Potnuri Bharat Teja <bharat@chelsio.com>,
	Selvin Xavier <selvin.xavier@broadcom.com>,
	Shiraz Saleem <shiraz.saleem@intel.com>,
	Yishai Hadas <yishaih@nvidia.com>,
	Zhu Yanjun <zyjzyj2000@gmail.com>
Subject: Re: [PATCH rdma-next 1/2] RDMA: Pass entire uverbs attr bundle to create cq function
Date: Wed, 19 Jun 2024 11:57:32 +0300	[thread overview]
Message-ID: <20240619085732.GK4025@unreal> (raw)
In-Reply-To: <20240618161345.GD2494510@nvidia.com>

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

  reply	other threads:[~2024-06-19  8:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-16 16:15 [PATCH rdma-next 0/2] Extend mlx5 CQ creation with large UAR page index Leon Romanovsky
2024-06-16 16:15 ` [PATCH rdma-next 1/2] RDMA: Pass entire uverbs attr bundle to create cq function Leon Romanovsky
2024-06-17  6:17   ` Leon Romanovsky
2024-06-17 13:44   ` Jason Gunthorpe
2024-06-17 15:49     ` Leon Romanovsky
2024-06-17 20:10       ` Jason Gunthorpe
2024-06-18  5:05         ` Leon Romanovsky
2024-06-18 13:08           ` Jason Gunthorpe
2024-06-18 16:05             ` Leon Romanovsky
2024-06-18 16:13               ` Jason Gunthorpe
2024-06-19  8:57                 ` Leon Romanovsky [this message]
2024-06-17 16:00   ` Zhu Yanjun
2024-06-16 16:15 ` [PATCH rdma-next 2/2] RDMA/mlx5: Send UAR page index as ioctl attribute Leon Romanovsky
2024-06-16 21:47 ` [PATCH rdma-next 0/2] Extend mlx5 CQ creation with large UAR page index Zhu Yanjun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240619085732.GK4025@unreal \
    --to=leon@kernel.org \
    --cc=agoldberger@nvidia.com \
    --cc=bharat@chelsio.com \
    --cc=bmt@zurich.ibm.com \
    --cc=chengyou@linux.alibaba.com \
    --cc=huangjunxian6@hisilicon.com \
    --cc=jgg@nvidia.com \
    --cc=kaishen@linux.alibaba.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=longli@microsoft.com \
    --cc=mrgolin@amazon.com \
    --cc=mustafa.ismail@intel.com \
    --cc=selvin.xavier@broadcom.com \
    --cc=sharmaajay@microsoft.com \
    --cc=shiraz.saleem@intel.com \
    --cc=tangchengchang@huawei.com \
    --cc=yishaih@nvidia.com \
    --cc=zyjzyj2000@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox