vmw_pvrdma-abi.h revision 48af7cb2e205dcc2f09a1a1b8a1a37c93e1943f0
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 __VMW_PVRDMA_ABI_H__ 20#define __VMW_PVRDMA_ABI_H__ 21#include <linux/types.h> 22#define PVRDMA_UVERBS_ABI_VERSION 3 23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 24#define PVRDMA_UAR_HANDLE_MASK 0x00FFFFFF 25#define PVRDMA_UAR_QP_OFFSET 0 26#define PVRDMA_UAR_QP_SEND BIT(30) 27#define PVRDMA_UAR_QP_RECV BIT(31) 28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 29#define PVRDMA_UAR_CQ_OFFSET 4 30#define PVRDMA_UAR_CQ_ARM_SOL BIT(29) 31#define PVRDMA_UAR_CQ_ARM BIT(30) 32#define PVRDMA_UAR_CQ_POLL BIT(31) 33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 34enum pvrdma_wr_opcode { 35 PVRDMA_WR_RDMA_WRITE, 36 PVRDMA_WR_RDMA_WRITE_WITH_IMM, 37 PVRDMA_WR_SEND, 38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 39 PVRDMA_WR_SEND_WITH_IMM, 40 PVRDMA_WR_RDMA_READ, 41 PVRDMA_WR_ATOMIC_CMP_AND_SWP, 42 PVRDMA_WR_ATOMIC_FETCH_AND_ADD, 43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 44 PVRDMA_WR_LSO, 45 PVRDMA_WR_SEND_WITH_INV, 46 PVRDMA_WR_RDMA_READ_WITH_INV, 47 PVRDMA_WR_LOCAL_INV, 48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 49 PVRDMA_WR_FAST_REG_MR, 50 PVRDMA_WR_MASKED_ATOMIC_CMP_AND_SWP, 51 PVRDMA_WR_MASKED_ATOMIC_FETCH_AND_ADD, 52 PVRDMA_WR_BIND_MW, 53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 54 PVRDMA_WR_REG_SIG_MR, 55}; 56enum pvrdma_wc_status { 57 PVRDMA_WC_SUCCESS, 58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 59 PVRDMA_WC_LOC_LEN_ERR, 60 PVRDMA_WC_LOC_QP_OP_ERR, 61 PVRDMA_WC_LOC_EEC_OP_ERR, 62 PVRDMA_WC_LOC_PROT_ERR, 63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 64 PVRDMA_WC_WR_FLUSH_ERR, 65 PVRDMA_WC_MW_BIND_ERR, 66 PVRDMA_WC_BAD_RESP_ERR, 67 PVRDMA_WC_LOC_ACCESS_ERR, 68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 69 PVRDMA_WC_REM_INV_REQ_ERR, 70 PVRDMA_WC_REM_ACCESS_ERR, 71 PVRDMA_WC_REM_OP_ERR, 72 PVRDMA_WC_RETRY_EXC_ERR, 73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 74 PVRDMA_WC_RNR_RETRY_EXC_ERR, 75 PVRDMA_WC_LOC_RDD_VIOL_ERR, 76 PVRDMA_WC_REM_INV_RD_REQ_ERR, 77 PVRDMA_WC_REM_ABORT_ERR, 78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 79 PVRDMA_WC_INV_EECN_ERR, 80 PVRDMA_WC_INV_EEC_STATE_ERR, 81 PVRDMA_WC_FATAL_ERR, 82 PVRDMA_WC_RESP_TIMEOUT_ERR, 83/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 84 PVRDMA_WC_GENERAL_ERR, 85}; 86enum pvrdma_wc_opcode { 87 PVRDMA_WC_SEND, 88/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 89 PVRDMA_WC_RDMA_WRITE, 90 PVRDMA_WC_RDMA_READ, 91 PVRDMA_WC_COMP_SWAP, 92 PVRDMA_WC_FETCH_ADD, 93/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 94 PVRDMA_WC_BIND_MW, 95 PVRDMA_WC_LSO, 96 PVRDMA_WC_LOCAL_INV, 97 PVRDMA_WC_FAST_REG_MR, 98/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 99 PVRDMA_WC_MASKED_COMP_SWAP, 100 PVRDMA_WC_MASKED_FETCH_ADD, 101 PVRDMA_WC_RECV = 1 << 7, 102 PVRDMA_WC_RECV_RDMA_WITH_IMM, 103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 104}; 105enum pvrdma_wc_flags { 106 PVRDMA_WC_GRH = 1 << 0, 107 PVRDMA_WC_WITH_IMM = 1 << 1, 108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 109 PVRDMA_WC_WITH_INVALIDATE = 1 << 2, 110 PVRDMA_WC_IP_CSUM_OK = 1 << 3, 111 PVRDMA_WC_WITH_SMAC = 1 << 4, 112 PVRDMA_WC_WITH_VLAN = 1 << 5, 113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 114 PVRDMA_WC_FLAGS_MAX = PVRDMA_WC_WITH_VLAN, 115}; 116struct pvrdma_alloc_ucontext_resp { 117 __u32 qp_tab_size; 118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 119 __u32 reserved; 120}; 121struct pvrdma_alloc_pd_resp { 122 __u32 pdn; 123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 124 __u32 reserved; 125}; 126struct pvrdma_create_cq { 127 __u64 buf_addr; 128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 129 __u32 buf_size; 130 __u32 reserved; 131}; 132struct pvrdma_create_cq_resp { 133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 134 __u32 cqn; 135 __u32 reserved; 136}; 137struct pvrdma_resize_cq { 138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 139 __u64 buf_addr; 140 __u32 buf_size; 141 __u32 reserved; 142}; 143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 144struct pvrdma_create_srq { 145 __u64 buf_addr; 146}; 147struct pvrdma_create_srq_resp { 148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 149 __u32 srqn; 150 __u32 reserved; 151}; 152struct pvrdma_create_qp { 153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 154 __u64 rbuf_addr; 155 __u64 sbuf_addr; 156 __u32 rbuf_size; 157 __u32 sbuf_size; 158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 159 __u64 qp_addr; 160}; 161struct pvrdma_ex_cmp_swap { 162 __u64 swap_val; 163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 164 __u64 compare_val; 165 __u64 swap_mask; 166 __u64 compare_mask; 167}; 168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 169struct pvrdma_ex_fetch_add { 170 __u64 add_val; 171 __u64 field_boundary; 172}; 173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 174struct pvrdma_av { 175 __u32 port_pd; 176 __u32 sl_tclass_flowlabel; 177 __u8 dgid[16]; 178/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 179 __u8 src_path_bits; 180 __u8 gid_index; 181 __u8 stat_rate; 182 __u8 hop_limit; 183/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 184 __u8 dmac[6]; 185 __u8 reserved[6]; 186}; 187struct pvrdma_sge { 188/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 189 __u64 addr; 190 __u32 length; 191 __u32 lkey; 192}; 193/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 194struct pvrdma_rq_wqe_hdr { 195 __u64 wr_id; 196 __u32 num_sge; 197 __u32 total_len; 198/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 199}; 200struct pvrdma_sq_wqe_hdr { 201 __u64 wr_id; 202 __u32 num_sge; 203/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 204 __u32 total_len; 205 __u32 opcode; 206 __u32 send_flags; 207 union { 208/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 209 __u32 imm_data; 210 __u32 invalidate_rkey; 211 } ex; 212 __u32 reserved; 213/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 214 union { 215 struct { 216 __u64 remote_addr; 217 __u32 rkey; 218/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 219 __u8 reserved[4]; 220 } rdma; 221 struct { 222 __u64 remote_addr; 223/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 224 __u64 compare_add; 225 __u64 swap; 226 __u32 rkey; 227 __u32 reserved; 228/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 229 } atomic; 230 struct { 231 __u64 remote_addr; 232 __u32 log_arg_sz; 233/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 234 __u32 rkey; 235 union { 236 struct pvrdma_ex_cmp_swap cmp_swap; 237 struct pvrdma_ex_fetch_add fetch_add; 238/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 239 } wr_data; 240 } masked_atomics; 241 struct { 242 __u64 iova_start; 243/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 244 __u64 pl_pdir_dma; 245 __u32 page_shift; 246 __u32 page_list_len; 247 __u32 length; 248/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 249 __u32 access_flags; 250 __u32 rkey; 251 } fast_reg; 252 struct { 253/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 254 __u32 remote_qpn; 255 __u32 remote_qkey; 256 struct pvrdma_av av; 257 } ud; 258/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 259 } wr; 260}; 261struct pvrdma_cqe { 262 __u64 wr_id; 263/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 264 __u64 qp; 265 __u32 opcode; 266 __u32 status; 267 __u32 byte_len; 268/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 269 __u32 imm_data; 270 __u32 src_qp; 271 __u32 wc_flags; 272 __u32 vendor_err; 273/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 274 __u16 pkey_index; 275 __u16 slid; 276 __u8 sl; 277 __u8 dlid_path_bits; 278/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 279 __u8 port_num; 280 __u8 smac[6]; 281 __u8 reserved2[7]; 282}; 283/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 284#endif 285