File: libibverbs_enums.pxd

package info (click to toggle)
rdma-core 33.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 13,844 kB
  • sloc: ansic: 145,804; python: 5,688; sh: 2,761; perl: 1,465; makefile: 73
file content (455 lines) | stat: -rw-r--r-- 12,393 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
# SPDX-License-Identifier: (GPL-2.0 OR Linux-OpenIB)
# Copyright (c) 2018, Mellanox Technologies. All rights reserved.

#cython: language_level=3


cdef extern from '<infiniband/verbs.h>':

    cpdef enum ibv_transport_type:
        IBV_TRANSPORT_UNKNOWN
        IBV_TRANSPORT_IB
        IBV_TRANSPORT_IWARP
        IBV_TRANSPORT_USNIC
        IBV_TRANSPORT_USNIC_UDP

    cpdef enum ibv_node_type:
        IBV_NODE_UNKNOWN
        IBV_NODE_CA
        IBV_NODE_SWITCH
        IBV_NODE_ROUTER
        IBV_NODE_RNIC
        IBV_NODE_USNIC
        IBV_NODE_USNIC_UDP
        IBV_NODE_UNSPECIFIED

    cpdef enum:
        IBV_LINK_LAYER_UNSPECIFIED
        IBV_LINK_LAYER_INFINIBAND
        IBV_LINK_LAYER_ETHERNET

    cpdef enum ibv_atomic_cap:
        IBV_ATOMIC_NONE
        IBV_ATOMIC_HCA
        IBV_ATOMIC_GLOB

    cpdef enum ibv_port_state:
        IBV_PORT_NOP
        IBV_PORT_DOWN
        IBV_PORT_INIT
        IBV_PORT_ARMED
        IBV_PORT_ACTIVE
        IBV_PORT_ACTIVE_DEFER

    cpdef enum ibv_port_cap_flags:
        IBV_PORT_SM
        IBV_PORT_NOTICE_SUP
        IBV_PORT_TRAP_SUP
        IBV_PORT_OPT_IPD_SUP
        IBV_PORT_AUTO_MIGR_SUP
        IBV_PORT_SL_MAP_SUP
        IBV_PORT_MKEY_NVRAM
        IBV_PORT_PKEY_NVRAM
        IBV_PORT_LED_INFO_SUP
        IBV_PORT_SYS_IMAGE_GUID_SUP
        IBV_PORT_PKEY_SW_EXT_PORT_TRAP_SUP
        IBV_PORT_EXTENDED_SPEEDS_SUP
        IBV_PORT_CAP_MASK2_SUP
        IBV_PORT_CM_SUP
        IBV_PORT_SNMP_TUNNEL_SUP
        IBV_PORT_REINIT_SUP
        IBV_PORT_DEVICE_MGMT_SUP
        IBV_PORT_VENDOR_CLASS_SUP
        IBV_PORT_DR_NOTICE_SUP
        IBV_PORT_CAP_MASK_NOTICE_SUP
        IBV_PORT_BOOT_MGMT_SUP
        IBV_PORT_LINK_LATENCY_SUP
        IBV_PORT_CLIENT_REG_SUP
        IBV_PORT_IP_BASED_GIDS

    cpdef enum ibv_port_cap_flags2:
        IBV_PORT_SET_NODE_DESC_SUP
        IBV_PORT_INFO_EXT_SUP
        IBV_PORT_VIRT_SUP
        IBV_PORT_SWITCH_PORT_STATE_TABLE_SUP
        IBV_PORT_LINK_WIDTH_2X_SUP
        IBV_PORT_LINK_SPEED_HDR_SUP

    cpdef enum ibv_mtu:
        IBV_MTU_256
        IBV_MTU_512
        IBV_MTU_1024
        IBV_MTU_2048
        IBV_MTU_4096

    cpdef enum ibv_event_type:
        IBV_EVENT_CQ_ERR
        IBV_EVENT_QP_FATAL
        IBV_EVENT_QP_REQ_ERR
        IBV_EVENT_QP_ACCESS_ERR
        IBV_EVENT_COMM_EST
        IBV_EVENT_SQ_DRAINED
        IBV_EVENT_PATH_MIG
        IBV_EVENT_PATH_MIG_ERR
        IBV_EVENT_DEVICE_FATAL
        IBV_EVENT_PORT_ACTIVE
        IBV_EVENT_PORT_ERR
        IBV_EVENT_LID_CHANGE
        IBV_EVENT_PKEY_CHANGE
        IBV_EVENT_SM_CHANGE
        IBV_EVENT_SRQ_ERR
        IBV_EVENT_SRQ_LIMIT_REACHED
        IBV_EVENT_QP_LAST_WQE_REACHED
        IBV_EVENT_CLIENT_REREGISTER
        IBV_EVENT_GID_CHANGE
        IBV_EVENT_WQ_FATAL

    cpdef enum ibv_access_flags:
        IBV_ACCESS_LOCAL_WRITE
        IBV_ACCESS_REMOTE_WRITE
        IBV_ACCESS_REMOTE_READ
        IBV_ACCESS_REMOTE_ATOMIC
        IBV_ACCESS_MW_BIND
        IBV_ACCESS_ZERO_BASED
        IBV_ACCESS_ON_DEMAND
        IBV_ACCESS_HUGETLB
        IBV_ACCESS_RELAXED_ORDERING

    cpdef enum ibv_wr_opcode:
        IBV_WR_RDMA_WRITE
        IBV_WR_RDMA_WRITE_WITH_IMM
        IBV_WR_SEND
        IBV_WR_SEND_WITH_IMM
        IBV_WR_RDMA_READ
        IBV_WR_ATOMIC_CMP_AND_SWP
        IBV_WR_ATOMIC_FETCH_AND_ADD
        IBV_WR_LOCAL_INV
        IBV_WR_BIND_MW
        IBV_WR_SEND_WITH_INV
        IBV_WR_TSO

    cpdef enum ibv_send_flags:
        IBV_SEND_FENCE
        IBV_SEND_SIGNALED
        IBV_SEND_SOLICITED
        IBV_SEND_INLINE
        IBV_SEND_IP_CSUM

    cpdef enum ibv_qp_type:
        IBV_QPT_RC
        IBV_QPT_UC
        IBV_QPT_UD
        IBV_QPT_RAW_PACKET
        IBV_QPT_XRC_SEND
        IBV_QPT_XRC_RECV
        IBV_QPT_DRIVER

    cpdef enum ibv_qp_state:
        IBV_QPS_RESET
        IBV_QPS_INIT
        IBV_QPS_RTR
        IBV_QPS_RTS
        IBV_QPS_SQD
        IBV_QPS_SQE
        IBV_QPS_ERR
        IBV_QPS_UNKNOWN

    cpdef enum ibv_mw_type:
        IBV_MW_TYPE_1
        IBV_MW_TYPE_2

    cpdef enum ibv_wc_status:
        IBV_WC_SUCCESS
        IBV_WC_LOC_LEN_ERR
        IBV_WC_LOC_QP_OP_ERR
        IBV_WC_LOC_EEC_OP_ERR
        IBV_WC_LOC_PROT_ERR
        IBV_WC_WR_FLUSH_ERR
        IBV_WC_MW_BIND_ERR
        IBV_WC_BAD_RESP_ERR
        IBV_WC_LOC_ACCESS_ERR
        IBV_WC_REM_INV_REQ_ERR
        IBV_WC_REM_ACCESS_ERR
        IBV_WC_REM_OP_ERR
        IBV_WC_RETRY_EXC_ERR
        IBV_WC_RNR_RETRY_EXC_ERR
        IBV_WC_LOC_RDD_VIOL_ERR
        IBV_WC_REM_INV_RD_REQ_ERR
        IBV_WC_REM_ABORT_ERR
        IBV_WC_INV_EECN_ERR
        IBV_WC_INV_EEC_STATE_ERR
        IBV_WC_FATAL_ERR
        IBV_WC_RESP_TIMEOUT_ERR
        IBV_WC_GENERAL_ERR

    cpdef enum ibv_wc_opcode:
        IBV_WC_SEND
        IBV_WC_RDMA_WRITE
        IBV_WC_RDMA_READ
        IBV_WC_COMP_SWAP
        IBV_WC_FETCH_ADD
        IBV_WC_BIND_MW
        IBV_WC_LOCAL_INV
        IBV_WC_TSO
        IBV_WC_RECV
        IBV_WC_RECV_RDMA_WITH_IMM

    cpdef enum ibv_create_cq_wc_flags:
        IBV_WC_EX_WITH_BYTE_LEN
        IBV_WC_EX_WITH_IMM
        IBV_WC_EX_WITH_QP_NUM
        IBV_WC_EX_WITH_SRC_QP
        IBV_WC_EX_WITH_SLID
        IBV_WC_EX_WITH_SL
        IBV_WC_EX_WITH_DLID_PATH_BITS
        IBV_WC_EX_WITH_COMPLETION_TIMESTAMP
        IBV_WC_EX_WITH_CVLAN
        IBV_WC_EX_WITH_FLOW_TAG
        IBV_WC_EX_WITH_COMPLETION_TIMESTAMP_WALLCLOCK

    cpdef enum ibv_wc_flags:
        IBV_WC_GRH
        IBV_WC_WITH_IMM
        IBV_WC_IP_CSUM_OK
        IBV_WC_WITH_INV

    cpdef enum ibv_srq_attr_mask:
        IBV_SRQ_MAX_WR
        IBV_SRQ_LIMIT

    cpdef enum ibv_srq_type:
        IBV_SRQT_BASIC
        IBV_SRQT_XRC

    cpdef enum ibv_srq_init_attr_mask:
        IBV_SRQ_INIT_ATTR_TYPE
        IBV_SRQ_INIT_ATTR_PD
        IBV_SRQ_INIT_ATTR_XRCD
        IBV_SRQ_INIT_ATTR_CQ

    cpdef enum ibv_mig_state:
        IBV_MIG_MIGRATED
        IBV_MIG_REARM
        IBV_MIG_ARMED

    cpdef enum ibv_qp_init_attr_mask:
        IBV_QP_INIT_ATTR_PD
        IBV_QP_INIT_ATTR_XRCD
        IBV_QP_INIT_ATTR_CREATE_FLAGS
        IBV_QP_INIT_ATTR_MAX_TSO_HEADER
        IBV_QP_INIT_ATTR_IND_TABLE
        IBV_QP_INIT_ATTR_RX_HASH
        IBV_QP_INIT_ATTR_SEND_OPS_FLAGS

    cpdef enum ibv_qp_create_flags:
        IBV_QP_CREATE_BLOCK_SELF_MCAST_LB
        IBV_QP_CREATE_SCATTER_FCS
        IBV_QP_CREATE_CVLAN_STRIPPING
        IBV_QP_CREATE_SOURCE_QPN
        IBV_QP_CREATE_PCI_WRITE_END_PADDING

    cpdef enum ibv_qp_attr_mask:
        IBV_QP_STATE
        IBV_QP_CUR_STATE
        IBV_QP_EN_SQD_ASYNC_NOTIFY
        IBV_QP_ACCESS_FLAGS
        IBV_QP_PKEY_INDEX
        IBV_QP_PORT
        IBV_QP_QKEY
        IBV_QP_AV
        IBV_QP_PATH_MTU
        IBV_QP_TIMEOUT
        IBV_QP_RETRY_CNT
        IBV_QP_RNR_RETRY
        IBV_QP_RQ_PSN
        IBV_QP_MAX_QP_RD_ATOMIC
        IBV_QP_ALT_PATH
        IBV_QP_MIN_RNR_TIMER
        IBV_QP_SQ_PSN
        IBV_QP_MAX_DEST_RD_ATOMIC
        IBV_QP_PATH_MIG_STATE
        IBV_QP_CAP
        IBV_QP_DEST_QPN
        IBV_QP_RATE_LIMIT

    cpdef enum ibv_wq_type:
        IBV_WQT_RQ

    cpdef enum ibv_wq_init_attr_mask:
        IBV_WQ_INIT_ATTR_FLAGS

    cpdef enum ibv_wq_flags:
        IBV_WQ_FLAGS_CVLAN_STRIPPING
        IBV_WQ_FLAGS_SCATTER_FCS
        IBV_WQ_FLAGS_DELAY_DROP
        IBV_WQ_FLAGS_PCI_WRITE_END_PADDING

    cpdef enum ibv_wq_state:
        IBV_WQS_RESET
        IBV_WQS_RDY
        IBV_WQS_ERR
        IBV_WQS_UNKNOWN

    cpdef enum ibv_wq_attr_mask:
        IBV_WQ_ATTR_STATE
        IBV_WQ_ATTR_CURR_STATE
        IBV_WQ_ATTR_FLAGS

    cpdef enum ibv_rx_hash_function_flags:
        IBV_RX_HASH_FUNC_TOEPLITZ

    cpdef enum ibv_rx_hash_fields:
        IBV_RX_HASH_SRC_IPV4
        IBV_RX_HASH_DST_IPV4
        IBV_RX_HASH_SRC_IPV6
        IBV_RX_HASH_DST_IPV6
        IBV_RX_HASH_SRC_PORT_TCP
        IBV_RX_HASH_DST_PORT_TCP
        IBV_RX_HASH_SRC_PORT_UDP
        IBV_RX_HASH_DST_PORT_UDP

    cpdef enum ibv_flow_flags:
        IBV_FLOW_ATTR_FLAGS_DONT_TRAP
        IBV_FLOW_ATTR_FLAGS_EGRESS

    cpdef enum ibv_flow_attr_type:
        IBV_FLOW_ATTR_NORMAL
        IBV_FLOW_ATTR_ALL_DEFAULT
        IBV_FLOW_ATTR_MC_DEFAULT
        IBV_FLOW_ATTR_SNIFFER

    cpdef enum ibv_flow_spec_type:
        IBV_FLOW_SPEC_ETH
        IBV_FLOW_SPEC_IPV4
        IBV_FLOW_SPEC_IPV6
        IBV_FLOW_SPEC_IPV4_EXT
        IBV_FLOW_SPEC_ESP
        IBV_FLOW_SPEC_TCP
        IBV_FLOW_SPEC_UDP
        IBV_FLOW_SPEC_VXLAN_TUNNEL
        IBV_FLOW_SPEC_GRE
        IBV_FLOW_SPEC_MPLS
        IBV_FLOW_SPEC_INNER
        IBV_FLOW_SPEC_ACTION_TAG
        IBV_FLOW_SPEC_ACTION_DROP
        IBV_FLOW_SPEC_ACTION_HANDLE
        IBV_FLOW_SPEC_ACTION_COUNT

    cpdef enum:
        IBV_QPF_GRH_REQUIRED

    cpdef enum ibv_counter_description:
        IBV_COUNTER_PACKETS
        IBV_COUNTER_BYTES

    cpdef enum ibv_read_counters_flags:
        IBV_READ_COUNTERS_ATTR_PREFER_CACHED

    cpdef enum ibv_cq_init_attr_mask:
        IBV_CQ_INIT_ATTR_MASK_FLAGS
        IBV_CQ_INIT_ATTR_MASK_PD

    cpdef enum ibv_create_cq_attr_flags:
        IBV_CREATE_CQ_ATTR_SINGLE_THREADED
        IBV_CREATE_CQ_ATTR_IGNORE_OVERRUN

    cpdef enum ibv_odp_general_caps:
        IBV_ODP_SUPPORT
        IBV_ODP_SUPPORT_IMPLICIT

    cpdef enum ibv_odp_transport_cap_bits:
        IBV_ODP_SUPPORT_SEND
        IBV_ODP_SUPPORT_RECV
        IBV_ODP_SUPPORT_WRITE
        IBV_ODP_SUPPORT_READ
        IBV_ODP_SUPPORT_ATOMIC
        IBV_ODP_SUPPORT_SRQ_RECV

    cpdef enum ibv_device_cap_flags:
        IBV_DEVICE_RESIZE_MAX_WR
        IBV_DEVICE_BAD_PKEY_CNTR
        IBV_DEVICE_BAD_QKEY_CNTR
        IBV_DEVICE_RAW_MULTI
        IBV_DEVICE_AUTO_PATH_MIG
        IBV_DEVICE_CHANGE_PHY_PORT
        IBV_DEVICE_UD_AV_PORT_ENFORCE
        IBV_DEVICE_CURR_QP_STATE_MOD
        IBV_DEVICE_SHUTDOWN_PORT
        IBV_DEVICE_INIT_TYPE
        IBV_DEVICE_PORT_ACTIVE_EVENT
        IBV_DEVICE_SYS_IMAGE_GUID
        IBV_DEVICE_RC_RNR_NAK_GEN
        IBV_DEVICE_SRQ_RESIZE
        IBV_DEVICE_N_NOTIFY_CQ
        IBV_DEVICE_MEM_WINDOW
        IBV_DEVICE_UD_IP_CSUM
        IBV_DEVICE_XRC
        IBV_DEVICE_MEM_MGT_EXTENSIONS
        IBV_DEVICE_MEM_WINDOW_TYPE_2A
        IBV_DEVICE_MEM_WINDOW_TYPE_2B
        IBV_DEVICE_RC_IP_CSUM
        IBV_DEVICE_RAW_IP_CSUM
        IBV_DEVICE_MANAGED_FLOW_STEERING

    cpdef enum ibv_raw_packet_caps:
        IBV_RAW_PACKET_CAP_CVLAN_STRIPPING
        IBV_RAW_PACKET_CAP_SCATTER_FCS
        IBV_RAW_PACKET_CAP_IP_CSUM
        IBV_RAW_PACKET_CAP_DELAY_DROP

    cpdef enum ibv_xrcd_init_attr_mask:
        IBV_XRCD_INIT_ATTR_FD
        IBV_XRCD_INIT_ATTR_OFLAGS
        IBV_XRCD_INIT_ATTR_RESERVED

    cpdef enum:
        IBV_WC_STANDARD_FLAGS

    cpdef enum ibv_qp_create_send_ops_flags:
        IBV_QP_EX_WITH_RDMA_WRITE
        IBV_QP_EX_WITH_RDMA_WRITE_WITH_IMM
        IBV_QP_EX_WITH_SEND
        IBV_QP_EX_WITH_SEND_WITH_IMM
        IBV_QP_EX_WITH_RDMA_READ
        IBV_QP_EX_WITH_ATOMIC_CMP_AND_SWP
        IBV_QP_EX_WITH_ATOMIC_FETCH_AND_ADD
        IBV_QP_EX_WITH_LOCAL_INV
        IBV_QP_EX_WITH_BIND_MW
        IBV_QP_EX_WITH_SEND_WITH_INV
        IBV_QP_EX_WITH_TSO

    cdef unsigned long long IBV_DEVICE_RAW_SCATTER_FCS
    cdef unsigned long long IBV_DEVICE_PCI_WRITE_END_PADDING

    cpdef enum ibv_parent_domain_init_attr_mask:
        IBV_PARENT_DOMAIN_INIT_ATTR_ALLOCATORS
        IBV_PARENT_DOMAIN_INIT_ATTR_PD_CONTEXT

    cdef void *IBV_ALLOCATOR_USE_DEFAULT

    cpdef enum ibv_gid_type:
        IBV_GID_TYPE_IB
        IBV_GID_TYPE_ROCE_V1
        IBV_GID_TYPE_ROCE_V2


cdef extern from "<infiniband/verbs_api.h>":
    cdef unsigned long long IBV_ADVISE_MR_ADVICE_PREFETCH
    cdef unsigned long long IBV_ADVISE_MR_ADVICE_PREFETCH_WRITE
    cdef unsigned long long IBV_ADVISE_MR_FLAG_FLUSH
    cdef unsigned long long IBV_ADVISE_MR_ADVICE_PREFETCH_NO_FAULT


_IBV_DEVICE_RAW_SCATTER_FCS = IBV_DEVICE_RAW_SCATTER_FCS
_IBV_DEVICE_PCI_WRITE_END_PADDING = IBV_DEVICE_PCI_WRITE_END_PADDING
_IBV_ALLOCATOR_USE_DEFAULT = <size_t>IBV_ALLOCATOR_USE_DEFAULT
_IBV_ADVISE_MR_ADVICE_PREFETCH = IBV_ADVISE_MR_ADVICE_PREFETCH
_IBV_ADVISE_MR_ADVICE_PREFETCH_WRITE = IBV_ADVISE_MR_ADVICE_PREFETCH_WRITE
_IBV_ADVISE_MR_FLAG_FLUSH = IBV_ADVISE_MR_FLAG_FLUSH
_IBV_ADVISE_MR_ADVICE_PREFETCH_NO_FAULT = IBV_ADVISE_MR_ADVICE_PREFETCH_NO_FAULT


cdef extern from '<infiniband/driver.h>':
    cpdef enum ibv_gid_type_sysfs:
        IBV_GID_TYPE_SYSFS_IB_ROCE_V1
        IBV_GID_TYPE_SYSFS_ROCE_V2