Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: "Xiong Weimin" <15927021679@163.com>
To: "Zhu Yanjun" <yanjun.zhu@linux.dev>
Cc: linux-rdma@vger.kernel.org, jgg@nvidia.com,
	xiongweimin <xiongweimin@kylinos.cn>
Subject: Re:Re: [PATCH] RDMA/rxe: Reject unimplemented implicit ODP cleanly
Date: Tue, 14 Jul 2026 11:17:32 +0800 (CST)	[thread overview]
Message-ID: <2f63280c.2ec3.19f5ea13aaa.Coremail.15927021679@163.com> (raw)
In-Reply-To: <99a613bd-8f32-4a7c-828f-b30097075e76@linux.dev>




Thanks Zhu, I will add your Reviewed-by tag.


At 2026-07-14 10:55:37, "Zhu Yanjun" <yanjun.zhu@linux.dev> wrote:
>在 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);
>> 

      reply	other threads:[~2026-07-14  3:17 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
2026-07-14  3:17   ` Xiong Weimin [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=2f63280c.2ec3.19f5ea13aaa.Coremail.15927021679@163.com \
    --to=15927021679@163.com \
    --cc=jgg@nvidia.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=xiongweimin@kylinos.cn \
    --cc=yanjun.zhu@linux.dev \
    /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