hc
2024-01-05 071106ecf68c401173c58808b1cf5f68cc50d390
kernel/include/uapi/rdma/ib_user_ioctl_verbs.h
....@@ -35,10 +35,18 @@
3535 #define IB_USER_IOCTL_VERBS_H
3636
3737 #include <linux/types.h>
38
+#include <rdma/ib_user_verbs.h>
3839
3940 #ifndef RDMA_UAPI_PTR
4041 #define RDMA_UAPI_PTR(_type, _name) __aligned_u64 _name
4142 #endif
43
+
44
+#define IB_UVERBS_ACCESS_OPTIONAL_FIRST (1 << 20)
45
+#define IB_UVERBS_ACCESS_OPTIONAL_LAST (1 << 29)
46
+
47
+enum ib_uverbs_core_support {
48
+ IB_UVERBS_CORE_SUPPORT_OPTIONAL_MR_ACCESS = 1 << 0,
49
+};
4250
4351 enum ib_uverbs_access_flags {
4452 IB_UVERBS_ACCESS_LOCAL_WRITE = 1 << 0,
....@@ -49,6 +57,46 @@
4957 IB_UVERBS_ACCESS_ZERO_BASED = 1 << 5,
5058 IB_UVERBS_ACCESS_ON_DEMAND = 1 << 6,
5159 IB_UVERBS_ACCESS_HUGETLB = 1 << 7,
60
+
61
+ IB_UVERBS_ACCESS_RELAXED_ORDERING = IB_UVERBS_ACCESS_OPTIONAL_FIRST,
62
+ IB_UVERBS_ACCESS_OPTIONAL_RANGE =
63
+ ((IB_UVERBS_ACCESS_OPTIONAL_LAST << 1) - 1) &
64
+ ~(IB_UVERBS_ACCESS_OPTIONAL_FIRST - 1)
65
+};
66
+
67
+enum ib_uverbs_srq_type {
68
+ IB_UVERBS_SRQT_BASIC,
69
+ IB_UVERBS_SRQT_XRC,
70
+ IB_UVERBS_SRQT_TM,
71
+};
72
+
73
+enum ib_uverbs_wq_type {
74
+ IB_UVERBS_WQT_RQ,
75
+};
76
+
77
+enum ib_uverbs_wq_flags {
78
+ IB_UVERBS_WQ_FLAGS_CVLAN_STRIPPING = 1 << 0,
79
+ IB_UVERBS_WQ_FLAGS_SCATTER_FCS = 1 << 1,
80
+ IB_UVERBS_WQ_FLAGS_DELAY_DROP = 1 << 2,
81
+ IB_UVERBS_WQ_FLAGS_PCI_WRITE_END_PADDING = 1 << 3,
82
+};
83
+
84
+enum ib_uverbs_qp_type {
85
+ IB_UVERBS_QPT_RC = 2,
86
+ IB_UVERBS_QPT_UC,
87
+ IB_UVERBS_QPT_UD,
88
+ IB_UVERBS_QPT_RAW_PACKET = 8,
89
+ IB_UVERBS_QPT_XRC_INI,
90
+ IB_UVERBS_QPT_XRC_TGT,
91
+ IB_UVERBS_QPT_DRIVER = 0xFF,
92
+};
93
+
94
+enum ib_uverbs_qp_create_flags {
95
+ IB_UVERBS_QP_CREATE_BLOCK_MULTICAST_LOOPBACK = 1 << 1,
96
+ IB_UVERBS_QP_CREATE_SCATTER_FCS = 1 << 8,
97
+ IB_UVERBS_QP_CREATE_CVLAN_STRIPPING = 1 << 9,
98
+ IB_UVERBS_QP_CREATE_PCI_WRITE_END_PADDING = 1 << 11,
99
+ IB_UVERBS_QP_CREATE_SQ_SIG_ALL = 1 << 12,
52100 };
53101
54102 enum ib_uverbs_query_port_cap_flags {
....@@ -157,4 +205,64 @@
157205 IB_UVERBS_READ_COUNTERS_PREFER_CACHED = 1 << 0,
158206 };
159207
208
+enum ib_uverbs_advise_mr_advice {
209
+ IB_UVERBS_ADVISE_MR_ADVICE_PREFETCH,
210
+ IB_UVERBS_ADVISE_MR_ADVICE_PREFETCH_WRITE,
211
+ IB_UVERBS_ADVISE_MR_ADVICE_PREFETCH_NO_FAULT,
212
+};
213
+
214
+enum ib_uverbs_advise_mr_flag {
215
+ IB_UVERBS_ADVISE_MR_FLAG_FLUSH = 1 << 0,
216
+};
217
+
218
+struct ib_uverbs_query_port_resp_ex {
219
+ struct ib_uverbs_query_port_resp legacy_resp;
220
+ __u16 port_cap_flags2;
221
+ __u8 reserved[6];
222
+};
223
+
224
+struct ib_uverbs_qp_cap {
225
+ __u32 max_send_wr;
226
+ __u32 max_recv_wr;
227
+ __u32 max_send_sge;
228
+ __u32 max_recv_sge;
229
+ __u32 max_inline_data;
230
+};
231
+
232
+enum rdma_driver_id {
233
+ RDMA_DRIVER_UNKNOWN,
234
+ RDMA_DRIVER_MLX5,
235
+ RDMA_DRIVER_MLX4,
236
+ RDMA_DRIVER_CXGB3,
237
+ RDMA_DRIVER_CXGB4,
238
+ RDMA_DRIVER_MTHCA,
239
+ RDMA_DRIVER_BNXT_RE,
240
+ RDMA_DRIVER_OCRDMA,
241
+ RDMA_DRIVER_NES,
242
+ RDMA_DRIVER_I40IW,
243
+ RDMA_DRIVER_VMW_PVRDMA,
244
+ RDMA_DRIVER_QEDR,
245
+ RDMA_DRIVER_HNS,
246
+ RDMA_DRIVER_USNIC,
247
+ RDMA_DRIVER_RXE,
248
+ RDMA_DRIVER_HFI1,
249
+ RDMA_DRIVER_QIB,
250
+ RDMA_DRIVER_EFA,
251
+ RDMA_DRIVER_SIW,
252
+};
253
+
254
+enum ib_uverbs_gid_type {
255
+ IB_UVERBS_GID_TYPE_IB,
256
+ IB_UVERBS_GID_TYPE_ROCE_V1,
257
+ IB_UVERBS_GID_TYPE_ROCE_V2,
258
+};
259
+
260
+struct ib_uverbs_gid_entry {
261
+ __aligned_u64 gid[2];
262
+ __u32 gid_index;
263
+ __u32 port_num;
264
+ __u32 gid_type;
265
+ __u32 netdev_ifindex; /* It is 0 if there is no netdev associated with it */
266
+};
267
+
160268 #endif