18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Copyright (c) 2016 Hisilicon Limited. 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * This software is available to you under a choice of one of two 68c2ecf20Sopenharmony_ci * licenses. You may choose to be licensed under the terms of the GNU 78c2ecf20Sopenharmony_ci * General Public License (GPL) Version 2, available from the file 88c2ecf20Sopenharmony_ci * COPYING in the main directory of this source tree, or the 98c2ecf20Sopenharmony_ci * OpenIB.org BSD license below: 108c2ecf20Sopenharmony_ci * 118c2ecf20Sopenharmony_ci * Redistribution and use in source and binary forms, with or 128c2ecf20Sopenharmony_ci * without modification, are permitted provided that the following 138c2ecf20Sopenharmony_ci * conditions are met: 148c2ecf20Sopenharmony_ci * 158c2ecf20Sopenharmony_ci * - Redistributions of source code must retain the above 168c2ecf20Sopenharmony_ci * copyright notice, this list of conditions and the following 178c2ecf20Sopenharmony_ci * disclaimer. 188c2ecf20Sopenharmony_ci * 198c2ecf20Sopenharmony_ci * - Redistributions in binary form must reproduce the above 208c2ecf20Sopenharmony_ci * copyright notice, this list of conditions and the following 218c2ecf20Sopenharmony_ci * disclaimer in the documentation and/or other materials 228c2ecf20Sopenharmony_ci * provided with the distribution. 238c2ecf20Sopenharmony_ci * 248c2ecf20Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 258c2ecf20Sopenharmony_ci * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 268c2ecf20Sopenharmony_ci * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 278c2ecf20Sopenharmony_ci * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 288c2ecf20Sopenharmony_ci * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 298c2ecf20Sopenharmony_ci * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 308c2ecf20Sopenharmony_ci * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 318c2ecf20Sopenharmony_ci * SOFTWARE. 328c2ecf20Sopenharmony_ci */ 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ci#ifndef HNS_ABI_USER_H 358c2ecf20Sopenharmony_ci#define HNS_ABI_USER_H 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ci#include <linux/types.h> 388c2ecf20Sopenharmony_ci 398c2ecf20Sopenharmony_cistruct hns_roce_ib_create_cq { 408c2ecf20Sopenharmony_ci __aligned_u64 buf_addr; 418c2ecf20Sopenharmony_ci __aligned_u64 db_addr; 428c2ecf20Sopenharmony_ci __u32 cqe_size; 438c2ecf20Sopenharmony_ci __u32 reserved; 448c2ecf20Sopenharmony_ci}; 458c2ecf20Sopenharmony_ci 468c2ecf20Sopenharmony_cistruct hns_roce_ib_create_cq_resp { 478c2ecf20Sopenharmony_ci __aligned_u64 cqn; /* Only 32 bits used, 64 for compat */ 488c2ecf20Sopenharmony_ci __aligned_u64 cap_flags; 498c2ecf20Sopenharmony_ci}; 508c2ecf20Sopenharmony_ci 518c2ecf20Sopenharmony_cistruct hns_roce_ib_create_srq { 528c2ecf20Sopenharmony_ci __aligned_u64 buf_addr; 538c2ecf20Sopenharmony_ci __aligned_u64 db_addr; 548c2ecf20Sopenharmony_ci __aligned_u64 que_addr; 558c2ecf20Sopenharmony_ci}; 568c2ecf20Sopenharmony_ci 578c2ecf20Sopenharmony_cistruct hns_roce_ib_create_srq_resp { 588c2ecf20Sopenharmony_ci __u32 srqn; 598c2ecf20Sopenharmony_ci __u32 reserved; 608c2ecf20Sopenharmony_ci}; 618c2ecf20Sopenharmony_ci 628c2ecf20Sopenharmony_cistruct hns_roce_ib_create_qp { 638c2ecf20Sopenharmony_ci __aligned_u64 buf_addr; 648c2ecf20Sopenharmony_ci __aligned_u64 db_addr; 658c2ecf20Sopenharmony_ci __u8 log_sq_bb_count; 668c2ecf20Sopenharmony_ci __u8 log_sq_stride; 678c2ecf20Sopenharmony_ci __u8 sq_no_prefetch; 688c2ecf20Sopenharmony_ci __u8 reserved[5]; 698c2ecf20Sopenharmony_ci __aligned_u64 sdb_addr; 708c2ecf20Sopenharmony_ci}; 718c2ecf20Sopenharmony_ci 728c2ecf20Sopenharmony_cistruct hns_roce_ib_create_qp_resp { 738c2ecf20Sopenharmony_ci __aligned_u64 cap_flags; 748c2ecf20Sopenharmony_ci}; 758c2ecf20Sopenharmony_ci 768c2ecf20Sopenharmony_cistruct hns_roce_ib_alloc_ucontext_resp { 778c2ecf20Sopenharmony_ci __u32 qp_tab_size; 788c2ecf20Sopenharmony_ci __u32 cqe_size; 798c2ecf20Sopenharmony_ci}; 808c2ecf20Sopenharmony_ci 818c2ecf20Sopenharmony_cistruct hns_roce_ib_alloc_pd_resp { 828c2ecf20Sopenharmony_ci __u32 pdn; 838c2ecf20Sopenharmony_ci}; 848c2ecf20Sopenharmony_ci 858c2ecf20Sopenharmony_ci#endif /* HNS_ABI_USER_H */ 86