RDMA: Extend RDMA user ABI to support atomic write
authorXiao Yang <yangx.jy@fujitsu.com>
Thu, 1 Dec 2022 14:37:05 +0000 (14:37 +0000)
committerJason Gunthorpe <jgg@nvidia.com>
Thu, 1 Dec 2022 23:51:08 +0000 (19:51 -0400)
1) Define new atomic write request/completion in userspace.
2) Define new atomic write capability in userspace.

Link: https://lore.kernel.org/r/1669905432-14-2-git-send-email-yangx.jy@fujitsu.com
Signed-off-by: Xiao Yang <yangx.jy@fujitsu.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
include/uapi/rdma/ib_user_verbs.h

index 43672cb..2378148 100644 (file)
@@ -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,
 };
 
 struct ib_uverbs_wc {
@@ -784,6 +785,7 @@ enum ib_uverbs_wr_opcode {
        IB_UVERBS_WR_RDMA_READ_WITH_INV = 11,
        IB_UVERBS_WR_MASKED_ATOMIC_CMP_AND_SWP = 12,
        IB_UVERBS_WR_MASKED_ATOMIC_FETCH_AND_ADD = 13,
+       IB_UVERBS_WR_ATOMIC_WRITE = 15,
        /* Review enum ib_wr_opcode before modifying this */
 };
 
@@ -1331,6 +1333,8 @@ enum ib_uverbs_device_cap_flags {
        /* Deprecated. Please use IB_UVERBS_RAW_PACKET_CAP_SCATTER_FCS. */
        IB_UVERBS_DEVICE_RAW_SCATTER_FCS = 1ULL << 34,
        IB_UVERBS_DEVICE_PCI_WRITE_END_PADDING = 1ULL << 36,
+       /* Atomic write attributes */
+       IB_UVERBS_DEVICE_ATOMIC_WRITE = 1ULL << 40,
 };
 
 enum ib_uverbs_raw_packet_caps {