* [PATCH for-next] RDMA: return -EOPNOSUPP for ODP unsupported device
@ 2022-10-01 2:00 Li Zhijian
2022-10-01 10:50 ` Zhu Yanjun
2022-10-19 6:59 ` Leon Romanovsky
0 siblings, 2 replies; 3+ messages in thread
From: Li Zhijian @ 2022-10-01 2:00 UTC (permalink / raw)
To: Bob Pearson, Leon Romanovsky, Jason Gunthorpe, linux-rdma
Cc: Zhu Yanjun, linux-kernel, Li Zhijian
ib_reg_mr(3) which is used to register a MR with specific access flags
for specific HCA will set errno when something go wrong.
So, here we should return the specific -EOPNOTSUPP when the being
requested ODP access flag is unspported by the HCA(such as RXE).
Signed-off-by: Li Zhijian <lizhijian@fujitsu.com>
---
include/rdma/ib_verbs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index 975d6e9efbcb..a1f4d53a4bb6 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -4334,7 +4334,7 @@ static inline int ib_check_mr_access(struct ib_device *ib_dev,
if (flags & IB_ACCESS_ON_DEMAND &&
!(ib_dev->attrs.kernel_cap_flags & IBK_ON_DEMAND_PAGING))
- return -EINVAL;
+ return -EOPNOTSUPP;
return 0;
}
--
2.31.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH for-next] RDMA: return -EOPNOSUPP for ODP unsupported device
2022-10-01 2:00 [PATCH for-next] RDMA: return -EOPNOSUPP for ODP unsupported device Li Zhijian
@ 2022-10-01 10:50 ` Zhu Yanjun
2022-10-19 6:59 ` Leon Romanovsky
1 sibling, 0 replies; 3+ messages in thread
From: Zhu Yanjun @ 2022-10-01 10:50 UTC (permalink / raw)
To: Li Zhijian
Cc: Bob Pearson, Leon Romanovsky, Jason Gunthorpe, linux-rdma, linux-kernel
On Sat, Oct 1, 2022 at 10:00 AM Li Zhijian <lizhijian@fujitsu.com> wrote:
>
> ib_reg_mr(3) which is used to register a MR with specific access flags
> for specific HCA will set errno when something go wrong.
> So, here we should return the specific -EOPNOTSUPP when the being
> requested ODP access flag is unspported by the HCA(such as RXE).
>
> Signed-off-by: Li Zhijian <lizhijian@fujitsu.com>
Reviewed-by: Zhu Yanjun <zyjzyj2000@gmail.com>
Thanks.
Zhu Yanjun
> ---
> include/rdma/ib_verbs.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
> index 975d6e9efbcb..a1f4d53a4bb6 100644
> --- a/include/rdma/ib_verbs.h
> +++ b/include/rdma/ib_verbs.h
> @@ -4334,7 +4334,7 @@ static inline int ib_check_mr_access(struct ib_device *ib_dev,
>
> if (flags & IB_ACCESS_ON_DEMAND &&
> !(ib_dev->attrs.kernel_cap_flags & IBK_ON_DEMAND_PAGING))
> - return -EINVAL;
> + return -EOPNOTSUPP;
> return 0;
> }
>
> --
> 2.31.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH for-next] RDMA: return -EOPNOSUPP for ODP unsupported device
2022-10-01 2:00 [PATCH for-next] RDMA: return -EOPNOSUPP for ODP unsupported device Li Zhijian
2022-10-01 10:50 ` Zhu Yanjun
@ 2022-10-19 6:59 ` Leon Romanovsky
1 sibling, 0 replies; 3+ messages in thread
From: Leon Romanovsky @ 2022-10-19 6:59 UTC (permalink / raw)
To: Jason Gunthorpe, Bob Pearson, Li Zhijian, linux-rdma
Cc: Zhu Yanjun, linux-kernel
On Sat, 1 Oct 2022 10:00:45 +0800, Li Zhijian wrote:
> ib_reg_mr(3) which is used to register a MR with specific access flags
> for specific HCA will set errno when something go wrong.
> So, here we should return the specific -EOPNOTSUPP when the being
> requested ODP access flag is unspported by the HCA(such as RXE).
>
>
Applied, thanks!
[1/1] RDMA: return -EOPNOSUPP for ODP unsupported device
https://git.kernel.org/rdma/rdma/c/0154331c318907
Best regards,
--
Leon Romanovsky <leon@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-10-19 6:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-01 2:00 [PATCH for-next] RDMA: return -EOPNOSUPP for ODP unsupported device Li Zhijian
2022-10-01 10:50 ` Zhu Yanjun
2022-10-19 6:59 ` Leon Romanovsky
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).