1 /**************************************************************************** 2 **************************************************************************** 3 *** 4 *** This header was automatically generated from a Linux kernel header 5 *** of the same name, to make information necessary for userspace to 6 *** call into the kernel available to libc. It contains only constants, 7 *** structures, and macros generated from the original header, and thus, 8 *** contains no copyrightable information. 9 *** 10 *** To edit the content of this header, modify the corresponding 11 *** source file (e.g. under external/kernel-headers/original/) then 12 *** run bionic/libc/kernel/tools/update_all.py 13 *** 14 *** Any manual change here will be lost the next time this script will 15 *** be run. You've been warned! 16 *** 17 **************************************************************************** 18 ****************************************************************************/ 19 #ifndef EFA_ABI_USER_H 20 #define EFA_ABI_USER_H 21 #include <linux/types.h> 22 #define EFA_UVERBS_ABI_VERSION 1 23 enum { 24 EFA_ALLOC_UCONTEXT_CMD_COMP_TX_BATCH = 1 << 0, 25 EFA_ALLOC_UCONTEXT_CMD_COMP_MIN_SQ_WR = 1 << 1, 26 }; 27 struct efa_ibv_alloc_ucontext_cmd { 28 __u32 comp_mask; 29 __u8 reserved_20[4]; 30 }; 31 enum efa_ibv_user_cmds_supp_udata { 32 EFA_USER_CMDS_SUPP_UDATA_QUERY_DEVICE = 1 << 0, 33 EFA_USER_CMDS_SUPP_UDATA_CREATE_AH = 1 << 1, 34 }; 35 struct efa_ibv_alloc_ucontext_resp { 36 __u32 comp_mask; 37 __u32 cmds_supp_udata_mask; 38 __u16 sub_cqs_per_cq; 39 __u16 inline_buf_size; 40 __u32 max_llq_size; 41 __u16 max_tx_batch; 42 __u16 min_sq_wr; 43 __u8 reserved_a0[4]; 44 }; 45 struct efa_ibv_alloc_pd_resp { 46 __u32 comp_mask; 47 __u16 pdn; 48 __u8 reserved_30[2]; 49 }; 50 enum { 51 EFA_CREATE_CQ_WITH_COMPLETION_CHANNEL = 1 << 0, 52 EFA_CREATE_CQ_WITH_SGID = 1 << 1, 53 }; 54 struct efa_ibv_create_cq { 55 __u32 comp_mask; 56 __u32 cq_entry_size; 57 __u16 num_sub_cqs; 58 __u8 flags; 59 __u8 reserved_58[5]; 60 }; 61 enum { 62 EFA_CREATE_CQ_RESP_DB_OFF = 1 << 0, 63 }; 64 struct efa_ibv_create_cq_resp { 65 __u32 comp_mask; 66 __u8 reserved_20[4]; 67 __aligned_u64 q_mmap_key; 68 __aligned_u64 q_mmap_size; 69 __u16 cq_idx; 70 __u8 reserved_d0[2]; 71 __u32 db_off; 72 __aligned_u64 db_mmap_key; 73 }; 74 enum { 75 EFA_QP_DRIVER_TYPE_SRD = 0, 76 }; 77 struct efa_ibv_create_qp { 78 __u32 comp_mask; 79 __u32 rq_ring_size; 80 __u32 sq_ring_size; 81 __u32 driver_qp_type; 82 }; 83 struct efa_ibv_create_qp_resp { 84 __u32 comp_mask; 85 __u32 rq_db_offset; 86 __u32 sq_db_offset; 87 __u32 llq_desc_offset; 88 __aligned_u64 rq_mmap_key; 89 __aligned_u64 rq_mmap_size; 90 __aligned_u64 rq_db_mmap_key; 91 __aligned_u64 sq_db_mmap_key; 92 __aligned_u64 llq_desc_mmap_key; 93 __u16 send_sub_cq_idx; 94 __u16 recv_sub_cq_idx; 95 __u8 reserved_1e0[4]; 96 }; 97 struct efa_ibv_create_ah_resp { 98 __u32 comp_mask; 99 __u16 efa_address_handle; 100 __u8 reserved_30[2]; 101 }; 102 enum { 103 EFA_QUERY_DEVICE_CAPS_RDMA_READ = 1 << 0, 104 EFA_QUERY_DEVICE_CAPS_RNR_RETRY = 1 << 1, 105 EFA_QUERY_DEVICE_CAPS_CQ_NOTIFICATIONS = 1 << 2, 106 EFA_QUERY_DEVICE_CAPS_CQ_WITH_SGID = 1 << 3, 107 }; 108 struct efa_ibv_ex_query_device_resp { 109 __u32 comp_mask; 110 __u32 max_sq_wr; 111 __u32 max_rq_wr; 112 __u16 max_sq_sge; 113 __u16 max_rq_sge; 114 __u32 max_rdma_size; 115 __u32 device_caps; 116 }; 117 #endif 118