/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */
* Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All rights reserved.
* Increment this value if any changes that break userspace ABI
* compatibility are made.
#define EFA_UVERBS_ABI_VERSION 1
* Keep structs aligned to 8 bytes.
* Keep reserved fields as arrays of __u8 named reserved_XXX where XXX is the
* hex bit offset of the field.
EFA_ALLOC_UCONTEXT_CMD_COMP_TX_BATCH = 1 << 0,
EFA_ALLOC_UCONTEXT_CMD_COMP_MIN_SQ_WR = 1 << 1,
struct efa_ibv_alloc_ucontext_cmd {
enum efa_ibv_user_cmds_supp_udata {
EFA_USER_CMDS_SUPP_UDATA_QUERY_DEVICE = 1 << 0,
EFA_USER_CMDS_SUPP_UDATA_CREATE_AH = 1 << 1,
struct efa_ibv_alloc_ucontext_resp {
__u32 cmds_supp_udata_mask;
__u32 max_llq_size; /* bytes */
__u16 max_tx_batch; /* units of 64 bytes */
struct efa_ibv_alloc_pd_resp {
EFA_CREATE_CQ_WITH_COMPLETION_CHANNEL = 1 << 0,
EFA_CREATE_CQ_WITH_SGID = 1 << 1,
struct efa_ibv_create_cq {
EFA_CREATE_CQ_RESP_DB_OFF = 1 << 0,
struct efa_ibv_create_cq_resp {
__aligned_u64 q_mmap_key;
__aligned_u64 q_mmap_size;
__aligned_u64 db_mmap_key;
EFA_QP_DRIVER_TYPE_SRD = 0,
struct efa_ibv_create_qp {
__u32 rq_ring_size; /* bytes */
__u32 sq_ring_size; /* bytes */
struct efa_ibv_create_qp_resp {
/* the offset inside the page of the rq db */
/* the offset inside the page of the sq db */
/* the offset inside the page of descriptors buffer */
__aligned_u64 rq_mmap_key;
__aligned_u64 rq_mmap_size;
__aligned_u64 rq_db_mmap_key;
__aligned_u64 sq_db_mmap_key;
__aligned_u64 llq_desc_mmap_key;
struct efa_ibv_create_ah_resp {
__u16 efa_address_handle;
EFA_QUERY_DEVICE_CAPS_RDMA_READ = 1 << 0,
EFA_QUERY_DEVICE_CAPS_RNR_RETRY = 1 << 1,
EFA_QUERY_DEVICE_CAPS_CQ_NOTIFICATIONS = 1 << 2,
EFA_QUERY_DEVICE_CAPS_CQ_WITH_SGID = 1 << 3,
EFA_QUERY_DEVICE_CAPS_DATA_POLLING_128 = 1 << 4,
EFA_QUERY_DEVICE_CAPS_RDMA_WRITE = 1 << 5,
struct efa_ibv_ex_query_device_resp {
#endif /* EFA_ABI_USER_H */