[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20260206145527.GL943673@ziepe.ca>
Date: Fri, 6 Feb 2026 10:55:27 -0400
From: Jason Gunthorpe <jgg@...pe.ca>
To: Konstantin Taranov <kotaranov@...rosoft.com>
Cc: Leon Romanovsky <leon@...nel.org>,
Konstantin Taranov <kotaranov@...ux.microsoft.com>,
Shiraz Saleem <shirazsaleem@...rosoft.com>,
Long Li <longli@...rosoft.com>,
"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH rdma-next 1/1] RDMA/mana_ib: return PD number to the user
On Thu, Feb 05, 2026 at 12:03:18PM +0000, Konstantin Taranov wrote:
> >
> > 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@...rosoft.com>
> > > >
> > > > 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.
But they don't put it in a WQE and don't check in HW it is exactly the same as
the PDN the WQ already has.
You have PDs in AHs and other related objects which make sense, but a
WQ only has one PD, it is illogical to pass in a PDN in a WQE, because
it can never take on a different value.
If it can take on a different value then your HW's security model is
broken.
Jason
Powered by blists - more mailing lists