summaryrefslogtreecommitdiff
path: root/include/rdma
diff options
context:
space:
mode:
authorLi Zhijian <lizhijian@fujitsu.com>2022-10-01 10:00:45 +0800
committerLeon Romanovsky <leon@kernel.org>2022-10-19 10:02:18 +0300
commit53c2d5b14a82f6e7f0f8089083972df20e66a354 (patch)
treecfe4989e21826726805684e336612870986d6cb8 /include/rdma
parent26312973bfbc1db24b157797776ee2b5b48f5c50 (diff)
RDMA/core: return -EOPNOSUPP for ODP unsupported device
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 unsupported by the HCA(such as RXE). Signed-off-by: Li Zhijian <lizhijian@fujitsu.com> Link: https://lore.kernel.org/r/20221001020045.8324-1-lizhijian@fujitsu.com Reviewed-by: Zhu Yanjun <zyjzyj2000@gmail.com> Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'include/rdma')
-rw-r--r--include/rdma/ib_verbs.h2
1 files changed, 1 insertions, 1 deletions
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;
}