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

From: Konstantin Taranov

Date: Thu Feb 05 2026 - 07:06:36 EST


>
> On Wed, Feb 04, 2026 at 10:28:27AM -0400, Jason Gunthorpe wrote:
> > On Wed, Feb 04, 2026 at 05:58:13AM -0800, Konstantin Taranov wrote:
> > > From: Konstantin Taranov <kotaranov@xxxxxxxxxxxxx>
> > >
> > > Implement returning to userspace applications PDNs of created PDs.
> > > Allow users to request short PDNs which are 16 bits.
> >
> > Why does userspace ever need to see a PDN? Please justify that in the
> > commit message
>
> Probably for the debug and we have restrack for it.
>

Sure, I will add the explanation in v2. Overall, it is for applications working on top of the rdma-core (e.g., mana DPDK).
The use-case is similar to what mlx4 and mthca have for address vectors in rdma-core for isolation.
As the whole process of working with WQs and CQs is implemented in that applications (e.g., mana DPDK), they need to know
PDN to build a correct request. What is more, the HW folks put a limit of 16 bits to the PDN field, requiring a flag to ensure
that we get a PDN that fits into the field.

I hope that it justifies the change as most ib providers have pdn in the user-space.

- Konstantin

> Thanks
>
> >
> > Jason