public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: Konstantin Taranov <kotaranov@microsoft.com>
Cc: Leon Romanovsky <leon@kernel.org>,
	Konstantin Taranov <kotaranov@linux.microsoft.com>,
	Shiraz Saleem <shirazsaleem@microsoft.com>,
	Long Li <longli@microsoft.com>,
	"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: return PD number to the user
Date: Fri, 6 Feb 2026 10:55:27 -0400	[thread overview]
Message-ID: <20260206145527.GL943673@ziepe.ca> (raw)
In-Reply-To: <DU8PR83MB0975E65E87B49534950E9447B499A@DU8PR83MB0975.EURPRD83.prod.outlook.com>

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@microsoft.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

      reply	other threads:[~2026-02-06 14:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-04 13:58 [PATCH rdma-next 1/1] RDMA/mana_ib: return PD number to the user Konstantin Taranov
2026-02-04 14:28 ` Jason Gunthorpe
2026-02-04 17:46   ` Leon Romanovsky
2026-02-05 12:03     ` Konstantin Taranov
2026-02-06 14:55       ` 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=20260206145527.GL943673@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