18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * Copyright (c) 2006 - 2016 Intel Corporation. All rights reserved. 38c2ecf20Sopenharmony_ci * Copyright (c) 2005 Topspin Communications. All rights reserved. 48c2ecf20Sopenharmony_ci * Copyright (c) 2005 Cisco Systems. All rights reserved. 58c2ecf20Sopenharmony_ci * Copyright (c) 2005 Open Grid Computing, Inc. All rights reserved. 68c2ecf20Sopenharmony_ci * 78c2ecf20Sopenharmony_ci * This software is available to you under a choice of one of two 88c2ecf20Sopenharmony_ci * licenses. You may choose to be licensed under the terms of the GNU 98c2ecf20Sopenharmony_ci * General Public License (GPL) Version 2, available from the file 108c2ecf20Sopenharmony_ci * COPYING in the main directory of this source tree, or the 118c2ecf20Sopenharmony_ci * OpenIB.org BSD license below: 128c2ecf20Sopenharmony_ci * 138c2ecf20Sopenharmony_ci * Redistribution and use in source and binary forms, with or 148c2ecf20Sopenharmony_ci * without modification, are permitted provided that the following 158c2ecf20Sopenharmony_ci * conditions are met: 168c2ecf20Sopenharmony_ci * 178c2ecf20Sopenharmony_ci * - Redistributions of source code must retain the above 188c2ecf20Sopenharmony_ci * copyright notice, this list of conditions and the following 198c2ecf20Sopenharmony_ci * disclaimer. 208c2ecf20Sopenharmony_ci * 218c2ecf20Sopenharmony_ci * - Redistributions in binary form must reproduce the above 228c2ecf20Sopenharmony_ci * copyright notice, this list of conditions and the following 238c2ecf20Sopenharmony_ci * disclaimer in the documentation and/or other materials 248c2ecf20Sopenharmony_ci * provided with the distribution. 258c2ecf20Sopenharmony_ci * 268c2ecf20Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 278c2ecf20Sopenharmony_ci * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 288c2ecf20Sopenharmony_ci * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 298c2ecf20Sopenharmony_ci * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 308c2ecf20Sopenharmony_ci * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 318c2ecf20Sopenharmony_ci * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 328c2ecf20Sopenharmony_ci * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 338c2ecf20Sopenharmony_ci * SOFTWARE. 348c2ecf20Sopenharmony_ci * 358c2ecf20Sopenharmony_ci */ 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ci#ifndef I40IW_ABI_H 388c2ecf20Sopenharmony_ci#define I40IW_ABI_H 398c2ecf20Sopenharmony_ci 408c2ecf20Sopenharmony_ci#include <linux/types.h> 418c2ecf20Sopenharmony_ci 428c2ecf20Sopenharmony_ci#define I40IW_ABI_VER 5 438c2ecf20Sopenharmony_ci 448c2ecf20Sopenharmony_cistruct i40iw_alloc_ucontext_req { 458c2ecf20Sopenharmony_ci __u32 reserved32; 468c2ecf20Sopenharmony_ci __u8 userspace_ver; 478c2ecf20Sopenharmony_ci __u8 reserved8[3]; 488c2ecf20Sopenharmony_ci}; 498c2ecf20Sopenharmony_ci 508c2ecf20Sopenharmony_cistruct i40iw_alloc_ucontext_resp { 518c2ecf20Sopenharmony_ci __u32 max_pds; /* maximum pds allowed for this user process */ 528c2ecf20Sopenharmony_ci __u32 max_qps; /* maximum qps allowed for this user process */ 538c2ecf20Sopenharmony_ci __u32 wq_size; /* size of the WQs (sq+rq) allocated to the mmaped area */ 548c2ecf20Sopenharmony_ci __u8 kernel_ver; 558c2ecf20Sopenharmony_ci __u8 reserved[3]; 568c2ecf20Sopenharmony_ci}; 578c2ecf20Sopenharmony_ci 588c2ecf20Sopenharmony_cistruct i40iw_alloc_pd_resp { 598c2ecf20Sopenharmony_ci __u32 pd_id; 608c2ecf20Sopenharmony_ci __u8 reserved[4]; 618c2ecf20Sopenharmony_ci}; 628c2ecf20Sopenharmony_ci 638c2ecf20Sopenharmony_cistruct i40iw_create_cq_req { 648c2ecf20Sopenharmony_ci __aligned_u64 user_cq_buffer; 658c2ecf20Sopenharmony_ci __aligned_u64 user_shadow_area; 668c2ecf20Sopenharmony_ci}; 678c2ecf20Sopenharmony_ci 688c2ecf20Sopenharmony_cistruct i40iw_create_qp_req { 698c2ecf20Sopenharmony_ci __aligned_u64 user_wqe_buffers; 708c2ecf20Sopenharmony_ci __aligned_u64 user_compl_ctx; 718c2ecf20Sopenharmony_ci 728c2ecf20Sopenharmony_ci /* UDA QP PHB */ 738c2ecf20Sopenharmony_ci __aligned_u64 user_sq_phb; /* place for VA of the sq phb buff */ 748c2ecf20Sopenharmony_ci __aligned_u64 user_rq_phb; /* place for VA of the rq phb buff */ 758c2ecf20Sopenharmony_ci}; 768c2ecf20Sopenharmony_ci 778c2ecf20Sopenharmony_cienum i40iw_memreg_type { 788c2ecf20Sopenharmony_ci IW_MEMREG_TYPE_MEM = 0x0000, 798c2ecf20Sopenharmony_ci IW_MEMREG_TYPE_QP = 0x0001, 808c2ecf20Sopenharmony_ci IW_MEMREG_TYPE_CQ = 0x0002, 818c2ecf20Sopenharmony_ci}; 828c2ecf20Sopenharmony_ci 838c2ecf20Sopenharmony_cistruct i40iw_mem_reg_req { 848c2ecf20Sopenharmony_ci __u16 reg_type; /* Memory, QP or CQ */ 858c2ecf20Sopenharmony_ci __u16 cq_pages; 868c2ecf20Sopenharmony_ci __u16 rq_pages; 878c2ecf20Sopenharmony_ci __u16 sq_pages; 888c2ecf20Sopenharmony_ci}; 898c2ecf20Sopenharmony_ci 908c2ecf20Sopenharmony_cistruct i40iw_create_cq_resp { 918c2ecf20Sopenharmony_ci __u32 cq_id; 928c2ecf20Sopenharmony_ci __u32 cq_size; 938c2ecf20Sopenharmony_ci __u32 mmap_db_index; 948c2ecf20Sopenharmony_ci __u32 reserved; 958c2ecf20Sopenharmony_ci}; 968c2ecf20Sopenharmony_ci 978c2ecf20Sopenharmony_cistruct i40iw_create_qp_resp { 988c2ecf20Sopenharmony_ci __u32 qp_id; 998c2ecf20Sopenharmony_ci __u32 actual_sq_size; 1008c2ecf20Sopenharmony_ci __u32 actual_rq_size; 1018c2ecf20Sopenharmony_ci __u32 i40iw_drv_opt; 1028c2ecf20Sopenharmony_ci __u16 push_idx; 1038c2ecf20Sopenharmony_ci __u8 lsmm; 1048c2ecf20Sopenharmony_ci __u8 rsvd2; 1058c2ecf20Sopenharmony_ci}; 1068c2ecf20Sopenharmony_ci 1078c2ecf20Sopenharmony_ci#endif 108