From: Jason Gunthorpe <jgg@nvidia.com>
To: Leon Romanovsky <leon@kernel.org>,
linux-rdma@vger.kernel.org, Yishai Hadas <yishaih@nvidia.com>
Cc: Matan Barak <matanb@mellanox.com>,
Or Gerlitz <ogerlitz@mellanox.com>,
patches@lists.linux.dev, Roland Dreier <roland@purestorage.com>
Subject: Re: [PATCH] IB/mlx4: Fill in the access_flags if IB_MR_REREG_ACCESS is not specified
Date: Tue, 9 Jun 2026 16:00:21 -0300 [thread overview]
Message-ID: <20260609190021.GA584729@nvidia.com> (raw)
In-Reply-To: <0-v1-29ca7a402625+ddd6-mlx4_rereg_flags_jgg@nvidia.com>
On Fri, Jun 05, 2026 at 08:53:35AM -0300, Jason Gunthorpe wrote:
> Sashiko noticed mlx4 was using whatever random access flags were provided
> when IB_MR_REREG_ACCESS is not used. Since IB_MR_REREG_TRANS needs
> access_flags it used the random ones which means it doesn't work sensibly
> if userspace provides only IB_MR_REREG_TRANS.
>
> Keep track of the current access_flag of the MR and use it if the user
> does not specify one.
>
> Also fixup a little confusion around mmr.access, it is the HW access flags
> so the convert_access() was missing. But nothing reads this by the time
> rereg_mr can happen.
>
> Fixes: 9376932d0c26 ("IB/mlx4_ib: Add support for user MR re-registration")
> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
> ---
> drivers/infiniband/hw/mlx4/mlx4_ib.h | 1 +
> drivers/infiniband/hw/mlx4/mr.c | 9 +++++++--
> 2 files changed, 8 insertions(+), 2 deletions(-)
>
> Sashiko also noticed the error unwinds are broken too, but properly fixing
> that that requires switching to use the new mr replacement rereg flow which is
> not worth doing for this ancient driver.
Applied to for-next
Jason
prev parent reply other threads:[~2026-06-09 19:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-05 11:53 [PATCH] IB/mlx4: Fill in the access_flags if IB_MR_REREG_ACCESS is not specified Jason Gunthorpe
2026-06-09 19:00 ` 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=20260609190021.GA584729@nvidia.com \
--to=jgg@nvidia.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=matanb@mellanox.com \
--cc=ogerlitz@mellanox.com \
--cc=patches@lists.linux.dev \
--cc=roland@purestorage.com \
--cc=yishaih@nvidia.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.