Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: Konstantin Taranov <kotaranov@microsoft.com>
Cc: Konstantin Taranov <kotaranov@linux.microsoft.com>,
	"shirazsaleem@microsoft.com" <shirazsaleem@microsoft.com>,
	Long Li <longli@microsoft.com>,
	"leon@kernel.org" <leon@kernel.org>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH rdma-next 1/1] RDMA/mana_ib: Adopt robust udata
Date: Fri, 10 Jul 2026 09:52:33 -0300	[thread overview]
Message-ID: <20260710125233.GN118978@ziepe.ca> (raw)
In-Reply-To: <PAWPR83MB0984EFB0540738E4393837BEB4FD2@PAWPR83MB0984.EURPRD83.prod.outlook.com>

On Fri, Jul 10, 2026 at 08:54:03AM +0000, Konstantin Taranov wrote:
> 
> > On Tue, Jun 23, 2026 at 04:44:43AM -0700, Konstantin Taranov wrote:
> > 
> > > +struct mana_ib_uctx_req {
> > > +	__aligned_u64 client_caps1;
> > > +	__aligned_u64 client_caps2;
> > > +	__aligned_u64 client_caps3;
> > > +	__aligned_u64 client_caps4;
> > > +	__aligned_u64 comp_mask;
> > > +};
> > 
> > I think Jacob has it right, This is looking pretty gross.
> > 
> 
> Jason, I sent a response to Jacob earlier. I am not sure you saw it.
> The problem of enforcing robust udata on alloc user context is that it blocks
> any future additions to the request. Since it is the first IOCTL there is no way
> to negotiate the request format. And that is why I wanted to reserve some fields now.

With the udata system you can't implement a scheme where you send
unknown bits into the kernel and it returns back the ones it
understands. That protocol just isn't supported in the 'zero means
backwards compat' semantic we are using for udata.

So I'd rather not see deviation from that normal protocol (I know a
few other places have but lets not grow)

> > If you want such a complex protocol then use the new ioctl format and
> > declare sensible driver specific attributes. Nobody has converted
> > alloc_ucontext yet, but that is usually not hard to do.
> 
> I have a question. If I add now ib_is_udata_in_empty() to alloc user
> context, would I be able to adopt new ioctl format and extend the
> udata for alloc user context?

Yep, they are orthogonal things. the "udata" is only the legacly uhw
in/out structs. The ioctl mechanism is uattrs based and completely
different.

So you can set an optional client_caps uattr and implement this
protocol there.

Jason

      reply	other threads:[~2026-07-10 12:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-23 11:44 [PATCH rdma-next 1/1] RDMA/mana_ib: Adopt robust udata Konstantin Taranov
2026-06-23 12:23 ` Jacob Moroni
2026-06-25  8:55   ` Konstantin Taranov
2026-06-25 13:29     ` Jacob Moroni
2026-06-25 13:50       ` Konstantin Taranov
2026-07-02 18:01 ` Jason Gunthorpe
2026-07-10  8:54   ` Konstantin Taranov
2026-07-10 12:52     ` Jason Gunthorpe [this message]

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=20260710125233.GN118978@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=kotaranov@linux.microsoft.com \
    --cc=kotaranov@microsoft.com \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=longli@microsoft.com \
    --cc=shirazsaleem@microsoft.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