From: Leon Romanovsky <leon@kernel.org>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: Li Zhijian <lizhijian@cn.fujitsu.com>,
dledford@redhat.com, linux-rdma@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] RDMA/mlx5: return the EFAULT per ibv_advise_mr(3)
Date: Thu, 5 Aug 2021 09:43:33 +0300 [thread overview]
Message-ID: <YQuIlUT9jZLeFPNH@unreal> (raw)
In-Reply-To: <20210804185022.GM1721383@nvidia.com>
On Wed, Aug 04, 2021 at 03:50:22PM -0300, Jason Gunthorpe wrote:
> On Wed, Aug 04, 2021 at 08:35:30AM +0300, Leon Romanovsky wrote:
> > On Tue, Aug 03, 2021 at 03:13:41PM -0300, Jason Gunthorpe wrote:
> > > On Tue, Aug 03, 2021 at 08:56:54PM +0300, Leon Romanovsky wrote:
> > > > On Tue, Aug 03, 2021 at 01:25:07PM -0300, Jason Gunthorpe wrote:
> > > > > On Sun, Aug 01, 2021 at 05:20:50PM +0800, Li Zhijian wrote:
> > > > > > ibv_advise_mr(3) says:
> > > > > > EFAULT In one of the following: o When the range requested is out of the MR bounds,
> > > > > > or when parts of it are not part of the process address space. o One of the
> > > > > > lkeys provided in the scatter gather list is invalid or with wrong write access
> > > > > >
> > > > > > Actually get_prefetchable_mr() will return NULL if it see above conditions
> > > > >
> > > > > No, get_prefetchable_mr() returns NULL if the mkey is invalid
> > > >
> > > > And what is this?
> > > > 1701 static struct mlx5_ib_mr *
> > > > 1702 get_prefetchable_mr(struct ib_pd *pd, enum ib_uverbs_advise_mr_advice advice,
> > > > 1703 u32 lkey)
> > > >
> > > > ...
> > > >
> > > > 1721 /* prefetch with write-access must be supported by the MR */
> > > > 1722 if (advice == IB_UVERBS_ADVISE_MR_ADVICE_PREFETCH_WRITE &&
> > > > 1723 !mr->umem->writable) {
> > > > 1724 mr = NULL;
> > > > 1725 goto end;
> > > > 1726 }
> > >
> > > I would say that is an invalid mkey
> >
> > I see it is as wrong write access.
>
> It just means the man page is wrong
ok, it can be a solution too.
Thanks
>
> Jason
next prev parent reply other threads:[~2021-08-05 6:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-01 9:20 [PATCH] RDMA/mlx5: return the EFAULT per ibv_advise_mr(3) Li Zhijian
2021-08-01 11:27 ` Leon Romanovsky
2021-08-03 16:25 ` Jason Gunthorpe
2021-08-03 17:56 ` Leon Romanovsky
2021-08-03 18:13 ` Jason Gunthorpe
2021-08-04 5:35 ` Leon Romanovsky
2021-08-04 18:50 ` Jason Gunthorpe
2021-08-05 6:43 ` Leon Romanovsky [this message]
2021-08-16 2:59 ` lizhijian
2021-08-21 9:44 ` Li, Zhijian
2021-08-25 17:28 ` Jason Gunthorpe
2021-08-26 1:18 ` lizhijian
2021-08-28 8:42 ` Li, Zhijian
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=YQuIlUT9jZLeFPNH@unreal \
--to=leon@kernel.org \
--cc=dledford@redhat.com \
--cc=jgg@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=lizhijian@cn.fujitsu.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;
as well as URLs for NNTP newsgroup(s).