mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH for-next 0/1] RDMA/core: Move ODP capability definitions to uapi
@ 2025-04-18  5:13 Daisuke Matsuda
  2025-04-18  5:13 ` [PATCH for-next 1/1] " Daisuke Matsuda
  0 siblings, 1 reply; 3+ messages in thread
From: Daisuke Matsuda @ 2025-04-18  5:13 UTC (permalink / raw)
  To: linux-rdma, leon, jgg; +Cc: linux-kernel, Daisuke Matsuda

The On-Demand Paging capabilities bits are defined respectively with
identical values in the kernel and rdma-core. It is conventional that such
definitions are placed in UAPI in order to avoid the definitions being
inconsistent among the two components.

Here is a PR for rdma-core:
https://github.com/linux-rdma/rdma-core/pull/1580
The former three patches correspond to this kernel-side change.
The latter four patches are for adding a new feature to rxe, and changes
for kernel-side are already merged in wip/leon-for-next tree[1].

[1] [PATCH for-next v3 0/2] RDMA/rxe: RDMA FLUSH and ATOMIC WRITE with ODP
https://lore.kernel.org/linux-rdma/174411071857.217309.12836295631004196048.b4-ty@kernel.org/

Daisuke Matsuda (1):
  RDMA/core: Move ODP capability definitions to uapi

 include/rdma/ib_verbs.h           | 20 ++++++++++----------
 include/uapi/rdma/ib_user_verbs.h | 16 ++++++++++++++++
 2 files changed, 26 insertions(+), 10 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH for-next 1/1] RDMA/core: Move ODP capability definitions to uapi
  2025-04-18  5:13 [PATCH for-next 0/1] RDMA/core: Move ODP capability definitions to uapi Daisuke Matsuda
@ 2025-04-18  5:13 ` Daisuke Matsuda
  2025-04-21 11:53   ` Leon Romanovsky
  0 siblings, 1 reply; 3+ messages in thread
From: Daisuke Matsuda @ 2025-04-18  5:13 UTC (permalink / raw)
  To: linux-rdma, leon, jgg; +Cc: linux-kernel, Daisuke Matsuda

The bits are used from both kernel space and userland, so they should be
placed in UAPI.

Signed-off-by: Daisuke Matsuda <matsuda-daisuke@fujitsu.com>
---
 include/rdma/ib_verbs.h           | 20 ++++++++++----------
 include/uapi/rdma/ib_user_verbs.h | 16 ++++++++++++++++
 2 files changed, 26 insertions(+), 10 deletions(-)

diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index 0a7ccd08b365..b06a0ed81bdd 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -314,19 +314,19 @@ enum ib_atomic_cap {
 };
 
 enum ib_odp_general_cap_bits {
-	IB_ODP_SUPPORT		= 1 << 0,
-	IB_ODP_SUPPORT_IMPLICIT = 1 << 1,
+	IB_ODP_SUPPORT		= IB_UVERBS_ODP_SUPPORT,
+	IB_ODP_SUPPORT_IMPLICIT = IB_UVERBS_ODP_SUPPORT_IMPLICIT,
 };
 
 enum ib_odp_transport_cap_bits {
-	IB_ODP_SUPPORT_SEND	= 1 << 0,
-	IB_ODP_SUPPORT_RECV	= 1 << 1,
-	IB_ODP_SUPPORT_WRITE	= 1 << 2,
-	IB_ODP_SUPPORT_READ	= 1 << 3,
-	IB_ODP_SUPPORT_ATOMIC	= 1 << 4,
-	IB_ODP_SUPPORT_SRQ_RECV	= 1 << 5,
-	IB_ODP_SUPPORT_FLUSH	= 1 << 6,
-	IB_ODP_SUPPORT_ATOMIC_WRITE	= 1 << 7,
+	IB_ODP_SUPPORT_SEND	= IB_UVERBS_ODP_SUPPORT_SEND,
+	IB_ODP_SUPPORT_RECV	= IB_UVERBS_ODP_SUPPORT_RECV,
+	IB_ODP_SUPPORT_WRITE	= IB_UVERBS_ODP_SUPPORT_WRITE,
+	IB_ODP_SUPPORT_READ	= IB_UVERBS_ODP_SUPPORT_READ,
+	IB_ODP_SUPPORT_ATOMIC	= IB_UVERBS_ODP_SUPPORT_ATOMIC,
+	IB_ODP_SUPPORT_SRQ_RECV	= IB_UVERBS_ODP_SUPPORT_SRQ_RECV,
+	IB_ODP_SUPPORT_FLUSH	= IB_UVERBS_ODP_SUPPORT_FLUSH,
+	IB_ODP_SUPPORT_ATOMIC_WRITE	= IB_UVERBS_ODP_SUPPORT_ATOMIC_WRITE,
 };
 
 struct ib_odp_caps {
diff --git a/include/uapi/rdma/ib_user_verbs.h b/include/uapi/rdma/ib_user_verbs.h
index e16650f0c85d..3b7bd99813e9 100644
--- a/include/uapi/rdma/ib_user_verbs.h
+++ b/include/uapi/rdma/ib_user_verbs.h
@@ -233,6 +233,22 @@ struct ib_uverbs_ex_query_device {
 	__u32 reserved;
 };
 
+enum ib_uverbs_odp_general_cap_bits {
+	IB_UVERBS_ODP_SUPPORT          = 1 << 0,
+	IB_UVERBS_ODP_SUPPORT_IMPLICIT = 1 << 1,
+};
+
+enum ib_uverbs_odp_transport_cap_bits {
+	IB_UVERBS_ODP_SUPPORT_SEND     = 1 << 0,
+	IB_UVERBS_ODP_SUPPORT_RECV     = 1 << 1,
+	IB_UVERBS_ODP_SUPPORT_WRITE    = 1 << 2,
+	IB_UVERBS_ODP_SUPPORT_READ     = 1 << 3,
+	IB_UVERBS_ODP_SUPPORT_ATOMIC   = 1 << 4,
+	IB_UVERBS_ODP_SUPPORT_SRQ_RECV = 1 << 5,
+	IB_UVERBS_ODP_SUPPORT_FLUSH    = 1 << 6,
+	IB_UVERBS_ODP_SUPPORT_ATOMIC_WRITE     = 1 << 7,
+};
+
 struct ib_uverbs_odp_caps {
 	__aligned_u64 general_caps;
 	struct {
-- 
2.43.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH for-next 1/1] RDMA/core: Move ODP capability definitions to uapi
  2025-04-18  5:13 ` [PATCH for-next 1/1] " Daisuke Matsuda
@ 2025-04-21 11:53   ` Leon Romanovsky
  0 siblings, 0 replies; 3+ messages in thread
From: Leon Romanovsky @ 2025-04-21 11:53 UTC (permalink / raw)
  To: linux-rdma, jgg, Daisuke Matsuda; +Cc: linux-kernel


On Fri, 18 Apr 2025 14:13:45 +0900, Daisuke Matsuda wrote:
> The bits are used from both kernel space and userland, so they should be
> placed in UAPI.
> 
> 

Applied, thanks!

[1/1] RDMA/core: Move ODP capability definitions to uapi
      https://git.kernel.org/rdma/rdma/c/685f9537a72877

Best regards,
-- 
Leon Romanovsky <leon@kernel.org>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-04-21 11:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-18  5:13 [PATCH for-next 0/1] RDMA/core: Move ODP capability definitions to uapi Daisuke Matsuda
2025-04-18  5:13 ` [PATCH for-next 1/1] " Daisuke Matsuda
2025-04-21 11:53   ` Leon Romanovsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®