/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */1/* This file is part of the Emulex RoCE Device Driver for2* RoCE (RDMA over Converged Ethernet) adapters.3* Copyright (C) 2012-2015 Emulex. All rights reserved.4* EMULEX and SLI are trademarks of Emulex.5* www.emulex.com6*7* This software is available to you under a choice of one of two licenses.8* You may choose to be licensed under the terms of the GNU General Public9* License (GPL) Version 2, available from the file COPYING in the main10* directory of this source tree, or the BSD license below:11*12* Redistribution and use in source and binary forms, with or without13* modification, are permitted provided that the following conditions14* are met:15*16* - Redistributions of source code must retain the above copyright notice,17* this list of conditions and the following disclaimer.18*19* - Redistributions in binary form must reproduce the above copyright20* notice, this list of conditions and the following disclaimer in21* the documentation and/or other materials provided with the distribution.22*23* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"24* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,THE25* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE26* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE27* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR28* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF29* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR30* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,31* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR32* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF33* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.34*35* Contact Information:36* [email protected]37*38* Emulex39* 3333 Susan Street40* Costa Mesa, CA 9262641*/4243#ifndef OCRDMA_ABI_USER_H44#define OCRDMA_ABI_USER_H4546#include <linux/types.h>4748#define OCRDMA_ABI_VERSION 249#define OCRDMA_BE_ROCE_ABI_VERSION 150/* user kernel communication data structures. */5152struct ocrdma_alloc_ucontext_resp {53__u32 dev_id;54__u32 wqe_size;55__u32 max_inline_data;56__u32 dpp_wqe_size;57__aligned_u64 ah_tbl_page;58__u32 ah_tbl_len;59__u32 rqe_size;60__u8 fw_ver[32];61/* for future use/new features in progress */62__aligned_u64 rsvd1;63__aligned_u64 rsvd2;64};6566struct ocrdma_alloc_pd_ureq {67__u32 rsvd[2];68};6970struct ocrdma_alloc_pd_uresp {71__u32 id;72__u32 dpp_enabled;73__u32 dpp_page_addr_hi;74__u32 dpp_page_addr_lo;75__u32 rsvd[2];76};7778struct ocrdma_create_cq_ureq {79__u32 dpp_cq;80__u32 rsvd; /* pad */81};8283#define MAX_CQ_PAGES 884struct ocrdma_create_cq_uresp {85__u32 cq_id;86__u32 page_size;87__u32 num_pages;88__u32 max_hw_cqe;89__aligned_u64 page_addr[MAX_CQ_PAGES];90__aligned_u64 db_page_addr;91__u32 db_page_size;92__u32 phase_change;93/* for future use/new features in progress */94__aligned_u64 rsvd1;95__aligned_u64 rsvd2;96};9798#define MAX_QP_PAGES 899#define MAX_UD_AV_PAGES 8100101struct ocrdma_create_qp_ureq {102__u8 enable_dpp_cq;103__u8 rsvd;104__u16 dpp_cq_id;105__u32 rsvd1; /* pad */106};107108struct ocrdma_create_qp_uresp {109__u16 qp_id;110__u16 sq_dbid;111__u16 rq_dbid;112__u16 resv0; /* pad */113__u32 sq_page_size;114__u32 rq_page_size;115__u32 num_sq_pages;116__u32 num_rq_pages;117__aligned_u64 sq_page_addr[MAX_QP_PAGES];118__aligned_u64 rq_page_addr[MAX_QP_PAGES];119__aligned_u64 db_page_addr;120__u32 db_page_size;121__u32 dpp_credit;122__u32 dpp_offset;123__u32 num_wqe_allocated;124__u32 num_rqe_allocated;125__u32 db_sq_offset;126__u32 db_rq_offset;127__u32 db_shift;128__aligned_u64 rsvd[11];129};130131struct ocrdma_create_srq_uresp {132__u16 rq_dbid;133__u16 resv0; /* pad */134__u32 resv1;135136__u32 rq_page_size;137__u32 num_rq_pages;138139__aligned_u64 rq_page_addr[MAX_QP_PAGES];140__aligned_u64 db_page_addr;141142__u32 db_page_size;143__u32 num_rqe_allocated;144__u32 db_rq_offset;145__u32 db_shift;146147__aligned_u64 rsvd2;148__aligned_u64 rsvd3;149};150151#endif /* OCRDMA_ABI_USER_H */152153154