Skip to contentSkip to conversation

Update kernel headers

PATCH In review Zhu Yanjun 3 participants 5 messages May 25, 2021 InfiniBand

lore
Share & tools
lore

Zhu Yanjun

author
#0 lore raw

PATCH 1/1 Update kernel headers

From: Zhu Yanjun <[email protected]>

After the patches "RDMA/rxe: Implement memory windows", the kernel headers are changed. This causes about 17 errors and 1 failure when running "run_test.py" with rxe.
This commit will fix these errors and failures.

---
 kernel-headers/rdma/rdma_user_rxe.h | 11 +++++++++++
 1 file changed, 11 insertions(+)
kernel-headers/rdma/rdma_user_rxe.h +11 -0
index 068433e2..90ea477f 100644
@@ -99,7 +99,17 @@ struct rxe_send_wr {
 			__u32	remote_qkey;
 			__u16	pkey_index;
 		} ud;
+		struct {
+			__aligned_u64	addr;
+			__aligned_u64	length;
+			__u32		mr_lkey;
+			__u32		mw_rkey;
+			__u32		rkey;
+			__u32		access;
+			__u32		flags;
+		} mw;
 		/* reg is only used by the kernel and is not part of the uapi */
+#ifdef __KERNEL__
 		struct {
 			union {
 				struct ib_mr *mr;
@@ -108,6 +118,7 @@ struct rxe_send_wr {
 			__u32	     key;
 			__u32	     access;
 		} reg;
+#endif
 	} wr;
 };
 
Signature · 1 line
2.30.2
#1 lore raw
Quoted 7 lines · Zhu Yanjun

From: Zhu Yanjun <[email protected]>

After the patches "RDMA/rxe: Implement memory windows", the kernel headers are changed. This causes about 17 errors and 1 failure when running "run_test.py" with rxe.
This commit will fix these errors and failures.

This commit is for rdma-core.
https://github.com/linux-rdma/rdma-core.git

Zhu Yanjun

Quoted 39 lines
---
 kernel-headers/rdma/rdma_user_rxe.h | 11 +++++++++++
 1 file changed, 11 insertions(+)
kernel-headers/rdma/rdma_user_rxe.h +11 -1
index 068433e2..90ea477f 100644
@@ -99,7 +99,17 @@ struct rxe_send_wr {
                        __u32   remote_qkey;
                        __u16   pkey_index;
                } ud;
+               struct {
+                       __aligned_u64   addr;
+                       __aligned_u64   length;
+                       __u32           mr_lkey;
+                       __u32           mw_rkey;
+                       __u32           rkey;
+                       __u32           access;
+                       __u32           flags;
+               } mw;
                /* reg is only used by the kernel and is not part of the uapi */
+#ifdef __KERNEL__
                struct {
                        union {
                                struct ib_mr *mr;
@@ -108,6 +118,7 @@ struct rxe_send_wr {
                        __u32        key;
                        __u32        access;
                } reg;
+#endif
        } wr;
 };
 
--

2.30.2

maintainer
#2 lore raw
In reply to Zhu Yanjun
Quoted 11 lines · Zhu Yanjun

From: Zhu Yanjun <[email protected]>

After the patches "RDMA/rxe: Implement memory windows", the kernel headers are changed. This causes about 17 errors and 1 failure when running "run_test.py" with rxe.
This commit will fix these errors and failures.

---
 kernel-headers/rdma/rdma_user_rxe.h | 11 +++++++++++
 1 file changed, 11 insertions(+)

Huh? Bob? You can't break the rxe uapi??

Quoted 11 lines
kernel-headers/rdma/rdma_user_rxe.h +2 -0
index 068433e2..90ea477f 100644
@@ -99,7 +99,17 @@ struct rxe_send_wr {
 			__u32	remote_qkey;
 			__u16	pkey_index;
 		} ud;
+		struct {
+			__aligned_u64	addr;
 

kernel-headers/rdma/rdma_user_rxe.h struct rxe_send_wr { · line 114

Quoted 10 lines
kernel-headers/rdma/rdma_user_rxe.h +7 -0
+			__aligned_u64	length;
 
+			__u32		mr_lkey;
+			__u32		mw_rkey;
 
+			__u32		rkey;
+			__u32		access;
 
+			__u32		flags;
+		} mw;

There is room for 4 u64's in 'reg' and this has 5, so it is a no-go

Jason

#3 lore raw
Quoted 32 lines · Jason Gunthorpe
Quoted 11 lines · Zhu Yanjun

From: Zhu Yanjun <[email protected]>

After the patches "RDMA/rxe: Implement memory windows", the kernel headers are changed. This causes about 17 errors and 1 failure when running "run_test.py" with rxe.
This commit will fix these errors and failures.

---
 kernel-headers/rdma/rdma_user_rxe.h | 11 +++++++++++
 1 file changed, 11 insertions(+)

Huh? Bob? You can't break the rxe uapi??

Quoted 15 lines
kernel-headers/rdma/rdma_user_rxe.h +5 -0
index 068433e2..90ea477f 100644
@@ -99,7 +99,17 @@ struct rxe_send_wr {
                      __u32   remote_qkey;
                      __u16   pkey_index;
              } ud;
+             struct {
+                     __aligned_u64   addr;
 
+                     __aligned_u64   length;
 
+                     __u32           mr_lkey;
+                     __u32           mw_rkey;
Quoted 7 lines

kernel-headers/rdma/rdma_user_rxe.h struct rxe_send_wr { · line 110

Quoted 5 lines
kernel-headers/rdma/rdma_user_rxe.h +4 -0
+                     __u32           rkey;
+                     __u32           access;
 
+                     __u32           flags;
+             } mw;

There is room for 4 u64's in 'reg' and this has 5, so it is a no-go

What is 'reg'? Where is the definition of this 'reg'? What protocol has the definition of this 'reg'?

Zhu Yanjun

Quoted 2 lines

Jason

#4 lore raw
Quoted 37 lines · Zhu Yanjun
Quoted 35 lines · Jason Gunthorpe
Quoted 11 lines · Zhu Yanjun

From: Zhu Yanjun <[email protected]>

After the patches "RDMA/rxe: Implement memory windows", the kernel headers are changed. This causes about 17 errors and 1 failure when running "run_test.py" with rxe.
This commit will fix these errors and failures.

---
 kernel-headers/rdma/rdma_user_rxe.h | 11 +++++++++++
 1 file changed, 11 insertions(+)

Huh? Bob? You can't break the rxe uapi??

Quoted 18 lines
kernel-headers/rdma/rdma_user_rxe.h +7 -0
index 068433e2..90ea477f 100644
@@ -99,7 +99,17 @@ struct rxe_send_wr {
                      __u32   remote_qkey;
                      __u16   pkey_index;
              } ud;
+             struct {
+                     __aligned_u64   addr;
 
+                     __aligned_u64   length;
 
+                     __u32           mr_lkey;
+                     __u32           mw_rkey;
 
+                     __u32           rkey;
+                     __u32           access;
Quoted 7 lines
Quoted 4 lines

kernel-headers/rdma/rdma_user_rxe.h struct rxe_send_wr { · line 110

Quoted 2 lines
kernel-headers/rdma/rdma_user_rxe.h +2 -0
+                     __u32           flags;
+             } mw;

There is room for 4 u64's in 'reg' and this has 5, so it is a no-go

What is 'reg'? Where is the definition of this 'reg'? What protocol has the definition of this 'reg'?

Got it. Please ignore my comments.

Zhu Yanjun

Quoted 5 lines

Zhu Yanjun

Quoted 2 lines

Jason