18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Copyright (c) 2009-2010 Chelsio, Inc. All rights reserved. 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#ifndef CXGB4_ABI_USER_H 348c2ecf20Sopenharmony_ci#define CXGB4_ABI_USER_H 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ci#include <linux/types.h> 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ci#define C4IW_UVERBS_ABI_VERSION 3 398c2ecf20Sopenharmony_ci 408c2ecf20Sopenharmony_ci/* 418c2ecf20Sopenharmony_ci * Make sure that all structs defined in this file remain laid out so 428c2ecf20Sopenharmony_ci * that they pack the same way on 32-bit and 64-bit architectures (to 438c2ecf20Sopenharmony_ci * avoid incompatibility between 32-bit userspace and 64-bit kernels). 448c2ecf20Sopenharmony_ci * In particular do not use pointer types -- pass pointers in __aligned_u64 458c2ecf20Sopenharmony_ci * instead. 468c2ecf20Sopenharmony_ci */ 478c2ecf20Sopenharmony_ci 488c2ecf20Sopenharmony_cienum { 498c2ecf20Sopenharmony_ci C4IW_64B_CQE = (1 << 0) 508c2ecf20Sopenharmony_ci}; 518c2ecf20Sopenharmony_ci 528c2ecf20Sopenharmony_cistruct c4iw_create_cq { 538c2ecf20Sopenharmony_ci __u32 flags; 548c2ecf20Sopenharmony_ci __u32 reserved; 558c2ecf20Sopenharmony_ci}; 568c2ecf20Sopenharmony_ci 578c2ecf20Sopenharmony_cistruct c4iw_create_cq_resp { 588c2ecf20Sopenharmony_ci __aligned_u64 key; 598c2ecf20Sopenharmony_ci __aligned_u64 gts_key; 608c2ecf20Sopenharmony_ci __aligned_u64 memsize; 618c2ecf20Sopenharmony_ci __u32 cqid; 628c2ecf20Sopenharmony_ci __u32 size; 638c2ecf20Sopenharmony_ci __u32 qid_mask; 648c2ecf20Sopenharmony_ci __u32 flags; 658c2ecf20Sopenharmony_ci}; 668c2ecf20Sopenharmony_ci 678c2ecf20Sopenharmony_cienum { 688c2ecf20Sopenharmony_ci C4IW_QPF_ONCHIP = (1 << 0), 698c2ecf20Sopenharmony_ci C4IW_QPF_WRITE_W_IMM = (1 << 1) 708c2ecf20Sopenharmony_ci}; 718c2ecf20Sopenharmony_ci 728c2ecf20Sopenharmony_cistruct c4iw_create_qp_resp { 738c2ecf20Sopenharmony_ci __aligned_u64 ma_sync_key; 748c2ecf20Sopenharmony_ci __aligned_u64 sq_key; 758c2ecf20Sopenharmony_ci __aligned_u64 rq_key; 768c2ecf20Sopenharmony_ci __aligned_u64 sq_db_gts_key; 778c2ecf20Sopenharmony_ci __aligned_u64 rq_db_gts_key; 788c2ecf20Sopenharmony_ci __aligned_u64 sq_memsize; 798c2ecf20Sopenharmony_ci __aligned_u64 rq_memsize; 808c2ecf20Sopenharmony_ci __u32 sqid; 818c2ecf20Sopenharmony_ci __u32 rqid; 828c2ecf20Sopenharmony_ci __u32 sq_size; 838c2ecf20Sopenharmony_ci __u32 rq_size; 848c2ecf20Sopenharmony_ci __u32 qid_mask; 858c2ecf20Sopenharmony_ci __u32 flags; 868c2ecf20Sopenharmony_ci}; 878c2ecf20Sopenharmony_ci 888c2ecf20Sopenharmony_cistruct c4iw_create_srq_resp { 898c2ecf20Sopenharmony_ci __aligned_u64 srq_key; 908c2ecf20Sopenharmony_ci __aligned_u64 srq_db_gts_key; 918c2ecf20Sopenharmony_ci __aligned_u64 srq_memsize; 928c2ecf20Sopenharmony_ci __u32 srqid; 938c2ecf20Sopenharmony_ci __u32 srq_size; 948c2ecf20Sopenharmony_ci __u32 rqt_abs_idx; 958c2ecf20Sopenharmony_ci __u32 qid_mask; 968c2ecf20Sopenharmony_ci __u32 flags; 978c2ecf20Sopenharmony_ci __u32 reserved; /* explicit padding */ 988c2ecf20Sopenharmony_ci}; 998c2ecf20Sopenharmony_ci 1008c2ecf20Sopenharmony_cienum { 1018c2ecf20Sopenharmony_ci /* HW supports SRQ_LIMIT_REACHED event */ 1028c2ecf20Sopenharmony_ci T4_SRQ_LIMIT_SUPPORT = 1 << 0, 1038c2ecf20Sopenharmony_ci}; 1048c2ecf20Sopenharmony_ci 1058c2ecf20Sopenharmony_cistruct c4iw_alloc_ucontext_resp { 1068c2ecf20Sopenharmony_ci __aligned_u64 status_page_key; 1078c2ecf20Sopenharmony_ci __u32 status_page_size; 1088c2ecf20Sopenharmony_ci __u32 reserved; /* explicit padding (optional for i386) */ 1098c2ecf20Sopenharmony_ci}; 1108c2ecf20Sopenharmony_ci 1118c2ecf20Sopenharmony_cistruct c4iw_alloc_pd_resp { 1128c2ecf20Sopenharmony_ci __u32 pdid; 1138c2ecf20Sopenharmony_ci}; 1148c2ecf20Sopenharmony_ci 1158c2ecf20Sopenharmony_ci#endif /* CXGB4_ABI_USER_H */ 116