1 /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */
3 * Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All rights reserved.
9 #include <linux/types.h>
12 * Increment this value if any changes that break userspace ABI
13 * compatibility are made.
15 #define EFA_UVERBS_ABI_VERSION 1
18 * Keep structs aligned to 8 bytes.
19 * Keep reserved fields as arrays of __u8 named reserved_XXX where XXX is the
20 * hex bit offset of the field.
24 EFA_ALLOC_UCONTEXT_CMD_COMP_TX_BATCH = 1 << 0,
25 EFA_ALLOC_UCONTEXT_CMD_COMP_MIN_SQ_WR = 1 << 1,
28 struct efa_ibv_alloc_ucontext_cmd {
33 enum efa_ibv_user_cmds_supp_udata {
34 EFA_USER_CMDS_SUPP_UDATA_QUERY_DEVICE = 1 << 0,
35 EFA_USER_CMDS_SUPP_UDATA_CREATE_AH = 1 << 1,
38 struct efa_ibv_alloc_ucontext_resp {
40 __u32 cmds_supp_udata_mask;
42 __u16 inline_buf_size;
43 __u32 max_llq_size; /* bytes */
44 __u16 max_tx_batch; /* units of 64 bytes */
49 struct efa_ibv_alloc_pd_resp {
55 struct efa_ibv_create_cq {
62 struct efa_ibv_create_cq_resp {
65 __aligned_u64 q_mmap_key;
66 __aligned_u64 q_mmap_size;
72 EFA_QP_DRIVER_TYPE_SRD = 0,
75 struct efa_ibv_create_qp {
77 __u32 rq_ring_size; /* bytes */
78 __u32 sq_ring_size; /* bytes */
82 struct efa_ibv_create_qp_resp {
84 /* the offset inside the page of the rq db */
86 /* the offset inside the page of the sq db */
88 /* the offset inside the page of descriptors buffer */
89 __u32 llq_desc_offset;
90 __aligned_u64 rq_mmap_key;
91 __aligned_u64 rq_mmap_size;
92 __aligned_u64 rq_db_mmap_key;
93 __aligned_u64 sq_db_mmap_key;
94 __aligned_u64 llq_desc_mmap_key;
95 __u16 send_sub_cq_idx;
96 __u16 recv_sub_cq_idx;
100 struct efa_ibv_create_ah_resp {
102 __u16 efa_address_handle;
107 EFA_QUERY_DEVICE_CAPS_RDMA_READ = 1 << 0,
108 EFA_QUERY_DEVICE_CAPS_RNR_RETRY = 1 << 1,
111 struct efa_ibv_ex_query_device_resp {
121 #endif /* EFA_ABI_USER_H */