Commit 0c17da49 authored by Li Zhijian's avatar Li Zhijian Committed by Jason Gunthorpe
Browse files

RDMA: Extend RDMA user ABI to support flush

This commit extends the RDMA user ABI to support the flush
operation defined in IBA A19.4.1. These changes are
backward compatible with the existing RDMA user ABI.

Link: https://lore.kernel.org/r/20221206130201.30986-2-lizhijian@fujitsu.com


Reviewed-by: default avatarZhu Yanjun <zyjzyj2000@gmail.com>
Signed-off-by: default avatarLi Zhijian <lizhijian@fujitsu.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
parent 689c5421
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -57,6 +57,8 @@ enum ib_uverbs_access_flags {
	IB_UVERBS_ACCESS_ZERO_BASED = 1 << 5,
	IB_UVERBS_ACCESS_ON_DEMAND = 1 << 6,
	IB_UVERBS_ACCESS_HUGETLB = 1 << 7,
	IB_UVERBS_ACCESS_FLUSH_GLOBAL = 1 << 8,
	IB_UVERBS_ACCESS_FLUSH_PERSISTENT = 1 << 9,

	IB_UVERBS_ACCESS_RELAXED_ORDERING = IB_UVERBS_ACCESS_OPTIONAL_FIRST,
	IB_UVERBS_ACCESS_OPTIONAL_RANGE =
+17 −0
Original line number Diff line number Diff line
@@ -105,6 +105,18 @@ enum {
	IB_USER_VERBS_EX_CMD_MODIFY_CQ
};

/* see IBA A19.4.1.1 Placement Types */
enum ib_placement_type {
	IB_FLUSH_GLOBAL = 1U << 0,
	IB_FLUSH_PERSISTENT = 1U << 1,
};

/* see IBA A19.4.1.2 Selectivity Level */
enum ib_selectivity_level {
	IB_FLUSH_RANGE = 0,
	IB_FLUSH_MR,
};

/*
 * Make sure that all structs defined in this file remain laid out so
 * that they pack the same way on 32-bit and 64-bit architectures (to
@@ -466,6 +478,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_FLUSH = 8,
	IB_UVERBS_WC_ATOMIC_WRITE = 9,
};

@@ -785,6 +798,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_FLUSH = 14,
	IB_UVERBS_WR_ATOMIC_WRITE = 15,
	/* Review enum ib_wr_opcode before modifying this */
};
@@ -1333,6 +1347,9 @@ 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,
	/* Flush placement types */
	IB_UVERBS_DEVICE_FLUSH_GLOBAL = 1ULL << 38,
	IB_UVERBS_DEVICE_FLUSH_PERSISTENT = 1ULL << 39,
	/* Atomic write attributes */
	IB_UVERBS_DEVICE_ATOMIC_WRITE = 1ULL << 40,
};