From: "yangx.jy@fujitsu.com" <yangx.jy@fujitsu.com>
To: "linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>
Cc: "ice_yangxiao@163.com" <ice_yangxiao@163.com>,
"leon@kernel.org" <leon@kernel.org>,
"zyjzyj2000@gmail.com" <zyjzyj2000@gmail.com>,
"yangx.jy@fujitsu.com" <yangx.jy@fujitsu.com>
Subject: Re: [PATCH] RDMA/rxe: Don't overwrite errno from ib_umem_get()
Date: Mon, 21 Jun 2021 07:20:51 +0000 [thread overview]
Message-ID: <60D03DA0.6060007@fujitsu.com> (raw)
In-Reply-To: <20210621065749.6596-1-ice_yangxiao@163.com>
On 2021/6/21 14:57, ice_yangxiao@163.com wrote:
> From: Xiao Yang <yangx.jy@cn.fujitsu.com>
Hi,
Sorry for the wrong mail address and I have resent the patch.
> rxe_mr_init_user() always returns the fixed -EINVAL when ib_umem_get()
> fails so it's hard for user to know which actual error happens in
> ib_umem_get(). For example, ib_umem_get() will return -EOPNOTSUPP
> when trying to pin pages on a DAX file.
>
> Return actual error as mlx4/mlx5 does.
>
> Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
> ---
> drivers/infiniband/sw/rxe/rxe_mr.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/infiniband/sw/rxe/rxe_mr.c b/drivers/infiniband/sw/rxe/rxe_mr.c
> index 9f63947bab12..fe2b7d223183 100644
> --- a/drivers/infiniband/sw/rxe/rxe_mr.c
> +++ b/drivers/infiniband/sw/rxe/rxe_mr.c
> @@ -135,7 +135,7 @@ int rxe_mr_init_user(struct rxe_pd *pd, u64 start, u64 length, u64 iova,
> if (IS_ERR(umem)) {
> pr_warn("err %d from rxe_umem_get\n",
> (int)PTR_ERR(umem));
> - err = -EINVAL;
> + err = PTR_ERR(umem);
> goto err1;
> }
>
prev parent reply other threads:[~2021-06-21 7:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-21 6:57 [PATCH] RDMA/rxe: Don't overwrite errno from ib_umem_get() ice_yangxiao
2021-06-21 7:20 ` yangx.jy [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=60D03DA0.6060007@fujitsu.com \
--to=yangx.jy@fujitsu.com \
--cc=ice_yangxiao@163.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--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.