All of lore.kernel.org
 help / color / mirror / Atom feed
From: haris iqbal <haris.phnx@gmail.com>
To: Jason Gunthorpe <jgg@ziepe.ca>
Cc: "Pearson, Robert B" <robert.pearson2@hpe.com>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	"zyjzyj2000@gmail.com" <zyjzyj2000@gmail.com>,
	"aleksei.marov@ionos.com" <aleksei.marov@ionos.com>,
	"leon@kernel.org" <leon@kernel.org>,
	"haris.iqbal@ionos.com" <haris.iqbal@ionos.com>,
	"jinpu.wang@ionos.com" <jinpu.wang@ionos.com>,
	"rpearsonhpe@gmail.com" <rpearsonhpe@gmail.com>
Subject: Re: [PATCH] RDMA/rxe: For invalidate compare keys according to the MR access
Date: Thu, 7 Jul 2022 09:32:14 +0200	[thread overview]
Message-ID: <CAE_WKMz0u43YjoFs=QTpLAOdb_LEEf5es6UL4eWbU9U+OYQUNA@mail.gmail.com> (raw)
In-Reply-To: <20220706163948.GL23621@ziepe.ca>

On Wed, Jul 6, 2022 at 6:39 PM Jason Gunthorpe <jgg@ziepe.ca> wrote:
>
> On Wed, Jul 06, 2022 at 05:41:08AM +0200, haris iqbal wrote:
> > On Tue, Jul 5, 2022 at 4:00 PM Jason Gunthorpe <jgg@ziepe.ca> wrote:
> > >
> > > On Tue, Jul 05, 2022 at 11:28:59AM +0200, haris iqbal wrote:
> > > > On Wed, Jun 29, 2022 at 8:48 PM Pearson, Robert B
> > > > <robert.pearson2@hpe.com> wrote:
> > > > >
> > > > > > > > If the rkey's and lkeys are always the same why do we store them twice in the mr ?
> > > > > > >
> > > > > > > They are not always the same currently. If you request remote access they are the same if you don't rkey is set to zero.
> > > > > > > You could, of course, check both the keys and the access bits but that is not the way it is written currently.
> > > > >
> > > > > > Storing the rkey instead of checking the flags seems like a weird obfuscation to me..
> > > > >
> > > > > > Jason
> > > > >
> > > > > One always has the choice to always just use the lkey and check the flags. But referring the rkey just uses one memory reference 😊
> > > >
> > > > Have we reached a consensus here as to how to solve this?
> > > >
> > > > This (and the issue created by dual map) has basically caused a
> > > > regression in RTRS since the 5.15. And we would appreciate it a lot if
> > > > the fix goes in and is backported.
> > >
> > > I think your patch is close, it should just be tweaked a bit.
> >
> > I couldn't conclude from the conversation above what that tweak should
> > be, if a conclusion has been reached. If not, then I'll wait.
>
> The 'rkey' input can be an lkey or rkey, and in rxe the lkey or rkey
> have the same value, including the variant bits.
>
> So, don't check based on the flags, if the rkey is not 0 check it,
> otherwise check the lkey
>
> Since we already did a lookup on the non-varient bits to get this far,
> the check's only purpose is to confirm that the wqe has the correct
> variant bits.

Thanks Jason. I sent the patch with the changes suggested. Also, I
stole your comment and used it as commit message, since that described
the changes accurately. :)

>
> Jason

      reply	other threads:[~2022-07-07  7:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-29 16:49 [PATCH] RDMA/rxe: For invalidate compare keys according to the MR access Md Haris Iqbal
2022-06-29 17:20 ` haris iqbal
2022-06-29 18:34 ` Jason Gunthorpe
2022-06-29 18:40   ` Pearson, Robert B
2022-06-29 18:44     ` Jason Gunthorpe
2022-06-29 18:47       ` Pearson, Robert B
2022-07-05  9:28         ` haris iqbal
2022-07-05 13:59           ` Jason Gunthorpe
2022-07-06  3:41             ` haris iqbal
2022-07-06 16:39               ` Jason Gunthorpe
2022-07-07  7:32                 ` haris iqbal [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='CAE_WKMz0u43YjoFs=QTpLAOdb_LEEf5es6UL4eWbU9U+OYQUNA@mail.gmail.com' \
    --to=haris.phnx@gmail.com \
    --cc=aleksei.marov@ionos.com \
    --cc=haris.iqbal@ionos.com \
    --cc=jgg@ziepe.ca \
    --cc=jinpu.wang@ionos.com \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=robert.pearson2@hpe.com \
    --cc=rpearsonhpe@gmail.com \
    --cc=zyjzyj2000@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.