Re: [PATCH rdma-next v3 1/1] RDMA/mana_ib: return PD number to the user

From: Jason Gunthorpe

Date: Fri Feb 06 2026 - 09:50:28 EST


On Fri, Feb 06, 2026 at 06:36:46AM -0800, Konstantin Taranov wrote:
> From: Konstantin Taranov <kotaranov@xxxxxxxxxxxxx>
>
> Implement returning to userspace applications PDNs of created PDs.
> The PDN is used by applications that build work requests outside of the
> rdma-core code base. The PDN is used to build work requests that require
> mentioning the PD. The MANA HW still ensures PD isolation using PDN attached
> to MRs and WRs, therefore the PDN mentioned in the work request must match
> the PDN of the used work queue. The work requests can fit only 16 bit PDNs.
> Allow users to request short PDNs which are 16 bits.

Okay, if you say so.. What a crazy thing to do, and not enough bits to
boot.

Anyhow, same comment as broadcom, the driver has to implement the
driver data forwards/back compat protocol properly before you can add
new drvdata extensions.

ie if userspace sends MANA_IB_PD_SHORT_PDN the current kernels will
just ignore it without EOPNOTSUPP, that is not OK.

So you need to do the mana version of this series:

https://lore.kernel.org/linux-rdma/0-v1-89ea7d615ba4+636-bnxt_re_uapi_jgg@xxxxxxxxxx/

And I have already written alot of the required mana parts here:

https://github.com/jgunthorpe/linux/commits/rdma_uapi/

Feel free to pull them out and make mana changes matching the broadcom ones:

RDMA/bnxt_re: Add compatibility checks to the uapi path
RDMA/bnxt_re: Add compatibility checks to the uapi path for no data
RDMA/bnxt_re: Add missing comp_mask validation
RDMA/bnxt_re: Use ib_respond_udata()
RDMA/bnxt_re: Add BNXT_RE_UCNTX_CMASK_UAPI_COMPAT_SUPPORTED

We can take it after the merge window closes in two weeks.

Jason