1 /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */
3 * Copyright 2018-2019 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.
23 enum efa_ibv_user_cmds_supp_udata
{
24 EFA_USER_CMDS_SUPP_UDATA_QUERY_DEVICE
= 1 << 0,
25 EFA_USER_CMDS_SUPP_UDATA_CREATE_AH
= 1 << 1,
28 struct efa_ibv_alloc_ucontext_resp
{
30 __u32 cmds_supp_udata_mask
;
32 __u16 inline_buf_size
;
33 __u32 max_llq_size
; /* bytes */
36 struct efa_ibv_alloc_pd_resp
{
42 struct efa_ibv_create_cq
{
49 struct efa_ibv_create_cq_resp
{
52 __aligned_u64 q_mmap_key
;
53 __aligned_u64 q_mmap_size
;
59 EFA_QP_DRIVER_TYPE_SRD
= 0,
62 struct efa_ibv_create_qp
{
64 __u32 rq_ring_size
; /* bytes */
65 __u32 sq_ring_size
; /* bytes */
69 struct efa_ibv_create_qp_resp
{
71 /* the offset inside the page of the rq db */
73 /* the offset inside the page of the sq db */
75 /* the offset inside the page of descriptors buffer */
76 __u32 llq_desc_offset
;
77 __aligned_u64 rq_mmap_key
;
78 __aligned_u64 rq_mmap_size
;
79 __aligned_u64 rq_db_mmap_key
;
80 __aligned_u64 sq_db_mmap_key
;
81 __aligned_u64 llq_desc_mmap_key
;
82 __u16 send_sub_cq_idx
;
83 __u16 recv_sub_cq_idx
;
87 struct efa_ibv_create_ah_resp
{
89 __u16 efa_address_handle
;
94 EFA_QUERY_DEVICE_CAPS_RDMA_READ
= 1 << 0,
97 struct efa_ibv_ex_query_device_resp
{
107 #endif /* EFA_ABI_USER_H */