Re: [PATCH v2 00/13] Provide udata helpers and use them in bnxt_re

Jason Gunthorpe
2026-03-02T19:33:49Z

On Mon, Mar 02, 2026 at 09:24:13PM +0200, Leon Romanovsky wrote:
> On Thu, Feb 26, 2026 at 09:11:03PM -0400, Jason Gunthorpe wrote:
> > Add new helpers that entirely execute the expected common patterns for
> > driver data uAPI forward and backwards compatibility so that drivers don't
> > have to open code these.
>
> <...>
>
> > Since bnxt_re has never implemented these rules correctly and now does,
> > provide a UCTX flag to tell userspace about it. If
> > BNXT_RE_UCNTX_CMASK_UAPI_COMPAT_SUPPORTED is not set then userspace must
> > not use any request or response fields beyond the current kernel uAPI.
> >
> > Using any new fields is only possible on kernels with the flag.
>
> Does a similar flag exist in any other driver? If so, we should consider
> making it global to ib_uverbs. If not, keeping it bnxt_re‑specific is
> sufficient.

I've been thinking about this too..

I think I'm pretty close in other drivers to being able to make the
same statement.

Maybe it should be a global flag in the uctx uAPI

Jason