Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: haris iqbal <haris.phnx@gmail.com>
Cc: "lizhijian@fujitsu.com" <lizhijian@fujitsu.com>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	"bvanassche@acm.org" <bvanassche@acm.org>,
	"leon@kernel.org" <leon@kernel.org>,
	"haris.iqbal@ionos.com" <haris.iqbal@ionos.com>,
	"jinpu.wang@ionos.com" <jinpu.wang@ionos.com>,
	"aleksei.marov@ionos.com" <aleksei.marov@ionos.com>,
	"rpearsonhpe@gmail.com" <rpearsonhpe@gmail.com>
Subject: Re: [PATCH] RDMA/rxe: Split rxe_invalidate_mr into local and remote versions
Date: Tue, 28 Jun 2022 13:50:47 -0300	[thread overview]
Message-ID: <20220628165047.GR23621@ziepe.ca> (raw)
In-Reply-To: <CAE_WKMz1XB19T9mXsSq+m0aUg9fKH0X4fTUYEoLtLR=NKZvKBg@mail.gmail.com>

On Tue, Jun 28, 2022 at 06:46:39PM +0200, haris iqbal wrote:
> On Tue, Jun 28, 2022 at 6:34 PM Jason Gunthorpe <jgg@ziepe.ca> wrote:
> >
> > On Tue, Jun 28, 2022 at 06:21:09PM +0200, haris iqbal wrote:
> >
> > > > Yes, no driver in Linux suports a disjoint key space.
> > >
> > > If disjoint key space is not supported in Linux; does this mean
> > > irrespective of whether an MR is registered (IB_WR_REG_MR) for LOCAL
> > > or REMOTE access, both rkey and lkey should be set?
> >
> > No.. It means given any key the driver can always tell if it is a rkey
> > or a lkey. There is never any aliasing of key values. Thus the API
> > often doesn't have a away to tell if the given key is an rkey or lkey.
> >
> > > PS: This discussion started in the following thread,
> > > https://marc.info/?l=linux-rdma&m=165390868832428&w=2
> >
> > rxe is incorrect to not accept the lkey presented on the
> > invalidate_rkey input. invalidate_rkey is misnamed.
> 
> 
> Understood. So a better fix for rxe (as compared to the one I sent)
> would be one of the following (if I understand correctly).
> 
> 1) The key sent in INV, is compared with lkey or rkey based on which
> one is set (non-zero).

This one seems to match the spec

However, it requires that keys don't alias, I don't know if rxe has
done this.

> OR,
> 2) The key sent in INV, is compared with lkey if the MR has only LOCAL
> access, and rkey if the MR has REMOTE access.

That might make more sense if rxe has aliasing keys and you need to be
specific about r/l

Jason

  reply	other threads:[~2022-06-28 16:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-09 12:03 [PATCH] RDMA/rxe: Split rxe_invalidate_mr into local and remote versions Md Haris Iqbal
2022-06-09 15:28 ` haris iqbal
2022-06-13  2:20 ` lizhijian
2022-06-13 14:20   ` haris iqbal
2022-06-24 23:27     ` Jason Gunthorpe
2022-06-28 16:21       ` haris iqbal
2022-06-28 16:34         ` Jason Gunthorpe
2022-06-28 16:46           ` haris iqbal
2022-06-28 16:50             ` Jason Gunthorpe [this message]
2022-06-28 17:05               ` haris iqbal
2022-06-28 20:04                 ` Bob Pearson
2022-06-29 12:56                   ` haris iqbal
2022-06-29 15:04                     ` Pearson, Robert B
2022-06-29 15:30                       ` haris iqbal

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=20220628165047.GR23621@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=aleksei.marov@ionos.com \
    --cc=bvanassche@acm.org \
    --cc=haris.iqbal@ionos.com \
    --cc=haris.phnx@gmail.com \
    --cc=jinpu.wang@ionos.com \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=lizhijian@fujitsu.com \
    --cc=rpearsonhpe@gmail.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