On 2022/11/23 3:49, Jason Gunthorpe wrote:
On Sat, Oct 15, 2022 at 06:37:04AM +0000, yangx.jy@xxxxxxxxxxx wrote:
1) Define new atomic write request/completion in userspace.
2) Define new atomic write capability in userspace.
Signed-off-by: Xiao Yang <yangx.jy@xxxxxxxxxxx>
---
include/uapi/rdma/ib_user_verbs.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/uapi/rdma/ib_user_verbs.h b/include/uapi/rdma/ib_user_verbs.h
index 43672cb1fd57..237814815544 100644
--- a/include/uapi/rdma/ib_user_verbs.h
+++ b/include/uapi/rdma/ib_user_verbs.h
@@ -466,6 +466,7 @@ enum ib_uverbs_wc_opcode {
IB_UVERBS_WC_BIND_MW = 5,
IB_UVERBS_WC_LOCAL_INV = 6,
IB_UVERBS_WC_TSO = 7,
+ IB_UVERBS_WC_ATOMIC_WRITE = 9,
};
Why is this 9? The following patch does
Hi Jason,
I reserve 8 for IB_UVERBS_WC_FLUSH and 14 for IB_UVERBS_WR_FLUSH.
@@ -985,6 +986,7 @@ enum ib_wc_opcode {
IB_WC_REG_MR,
IB_WC_MASKED_COMP_SWAP,
IB_WC_MASKED_FETCH_ADD,
+ IB_WC_ATOMIC_WRITE = IB_UVERBS_WC_ATOMIC_WRITE,
Which corrupts the enum.
Good catch. I will correct it now.
Best Regards,
Xiao Yang
It should be like this:
+++ b/include/rdma/ib_verbs.h
@@ -983,10 +983,10 @@ enum ib_wc_opcode {
IB_WC_BIND_MW = IB_UVERBS_WC_BIND_MW,
IB_WC_LOCAL_INV = IB_UVERBS_WC_LOCAL_INV,
IB_WC_LSO = IB_UVERBS_WC_TSO,
+ IB_WC_ATOMIC_WRITE = IB_UVERBS_WC_ATOMIC_WRITE,
IB_WC_REG_MR,
IB_WC_MASKED_COMP_SWAP,
IB_WC_MASKED_FETCH_ADD,
- IB_WC_ATOMIC_WRITE = IB_UVERBS_WC_ATOMIC_WRITE,
/*
* Set value of IB_WC_RECV so consumers can test if a completion is a
* receive by testing (opcode & IB_WC_RECV).
+++ b/include/uapi/rdma/ib_user_verbs.h
@@ -466,7 +466,7 @@ enum ib_uverbs_wc_opcode {
IB_UVERBS_WC_BIND_MW = 5,
IB_UVERBS_WC_LOCAL_INV = 6,
IB_UVERBS_WC_TSO = 7,
- IB_UVERBS_WC_ATOMIC_WRITE = 9,
+ IB_UVERBS_WC_ATOMIC_WRITE = 8,
};
struct ib_uverbs_wc {
Jason