From: Zhu Yanjun <yanjun.zhu@linux.dev>
To: weimin xiong <15927021679@163.com>,
linux-rdma@vger.kernel.org,
"yanjun.zhu@linux.dev" <yanjun.zhu@linux.dev>
Cc: jgg@nvidia.com, xiongweimin <xiongweimin@kylinos.cn>
Subject: Re: [PATCH] RDMA/rxe: Reject unimplemented implicit ODP cleanly
Date: Mon, 13 Jul 2026 19:55:37 -0700 [thread overview]
Message-ID: <99a613bd-8f32-4a7c-828f-b30097075e76@linux.dev> (raw)
In-Reply-To: <20260713010439.331054-1-15927021679@163.com>
在 2026/7/12 18:04, weimin xiong 写道:
> From: xiongweimin <xiongweimin@kylinos.cn>
>
> rxe advertises ODP but not IB_ODP_SUPPORT_IMPLICIT. The reg_user_mr path
> still contained a dead branch that checked the implicit capability and
> could never succeed.
>
> Return -EOPNOTSUPP for the implicit ODP address range up front so the
> intent is obvious and the unreachable code is gone.
>
> Signed-off-by: xiongweimin <xiongweimin@kylinos.cn>
> Cc: linux-rdma@vger.kernel.org
> Cc: Jason Gunthorpe <jgg@nvidia.com>
> ---
>
> --- a/drivers/infiniband/sw/rxe/rxe_odp.c
> +++ b/drivers/infiniband/sw/rxe/rxe_odp.c
> @@ -87,14 +87,9 @@
>
> rxe_mr_init(access_flags, mr);
>
> - if (!start && length == U64_MAX) {
> - if (iova != 0)
> - return -EINVAL;
> - if (!(rxe->attr.odp_caps.general_caps & IB_ODP_SUPPORT_IMPLICIT))
> - return -EINVAL;
> -
> - /* Never reach here, for implicit ODP is not implemented. */
> - }
It seems that the above are for implicit ODP. However the implicit ODP
is not implemented currently. I am fine with removing this.
Reviewed-by: Zhu Yanjun <yanjun.zhu@linux.dev>
Zhu Yanjun
> + /* Implicit ODP (start=0, length=U64_MAX) is not implemented. */
> + if (!start && length == U64_MAX)
> + return -EOPNOTSUPP;
>
> umem_odp = ib_umem_odp_get(&rxe->ib_dev, start, length, access_flags,
> &rxe_mn_ops);
>
next prev parent reply other threads:[~2026-07-14 2:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-13 1:04 [PATCH] RDMA/rxe: Reject unimplemented implicit ODP cleanly weimin xiong
2026-07-14 2:55 ` Zhu Yanjun [this message]
2026-07-14 3:17 ` Xiong Weimin
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=99a613bd-8f32-4a7c-828f-b30097075e76@linux.dev \
--to=yanjun.zhu@linux.dev \
--cc=15927021679@163.com \
--cc=jgg@nvidia.com \
--cc=linux-rdma@vger.kernel.org \
--cc=xiongweimin@kylinos.cn \
/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