1 /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */
3 * Copyright 2018-2021 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 {
56 EFA_CREATE_CQ_WITH_COMPLETION_CHANNEL = 1 << 0,
59 struct efa_ibv_create_cq {
68 EFA_CREATE_CQ_RESP_DB_OFF = 1 << 0,
71 struct efa_ibv_create_cq_resp {
74 __aligned_u64 q_mmap_key;
75 __aligned_u64 q_mmap_size;
79 __aligned_u64 db_mmap_key;
83 EFA_QP_DRIVER_TYPE_SRD = 0,
86 struct efa_ibv_create_qp {
88 __u32 rq_ring_size; /* bytes */
89 __u32 sq_ring_size; /* bytes */
93 struct efa_ibv_create_qp_resp {
95 /* the offset inside the page of the rq db */
97 /* the offset inside the page of the sq db */
99 /* the offset inside the page of descriptors buffer */
100 __u32 llq_desc_offset;
101 __aligned_u64 rq_mmap_key;
102 __aligned_u64 rq_mmap_size;
103 __aligned_u64 rq_db_mmap_key;
104 __aligned_u64 sq_db_mmap_key;
105 __aligned_u64 llq_desc_mmap_key;
106 __u16 send_sub_cq_idx;
107 __u16 recv_sub_cq_idx;
108 __u8 reserved_1e0[4];
111 struct efa_ibv_create_ah_resp {
113 __u16 efa_address_handle;
118 EFA_QUERY_DEVICE_CAPS_RDMA_READ = 1 << 0,
119 EFA_QUERY_DEVICE_CAPS_RNR_RETRY = 1 << 1,
120 EFA_QUERY_DEVICE_CAPS_CQ_NOTIFICATIONS = 1 << 2,
123 struct efa_ibv_ex_query_device_resp {
133 #endif /* EFA_ABI_USER_H */