1 /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */
3 * Copyright (c) 2006 - 2011 Intel Corporation. All rights reserved.
4 * Copyright (c) 2005 Topspin Communications. All rights reserved.
5 * Copyright (c) 2005 Cisco Systems. All rights reserved.
6 * Copyright (c) 2005 Open Grid Computing, Inc. All rights reserved.
8 * This software is available to you under a choice of one of two
9 * licenses. You may choose to be licensed under the terms of the GNU
10 * General Public License (GPL) Version 2, available from the file
11 * COPYING in the main directory of this source tree, or the
12 * OpenIB.org BSD license below:
14 * Redistribution and use in source and binary forms, with or
15 * without modification, are permitted provided that the following
18 * - Redistributions of source code must retain the above
19 * copyright notice, this list of conditions and the following
22 * - Redistributions in binary form must reproduce the above
23 * copyright notice, this list of conditions and the following
24 * disclaimer in the documentation and/or other materials
25 * provided with the distribution.
27 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
28 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
29 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
30 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
31 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
32 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
33 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
38 #ifndef NES_ABI_USER_H
39 #define NES_ABI_USER_H
41 #include <linux/types.h>
43 #define NES_ABI_USERSPACE_VER 2
44 #define NES_ABI_KERNEL_VER 2
47 * Make sure that all structs defined in this file remain laid out so
48 * that they pack the same way on 32-bit and 64-bit architectures (to
49 * avoid incompatibility between 32-bit userspace and 64-bit kernels).
50 * In particular do not use pointer types -- pass pointers in __u64
54 struct nes_alloc_ucontext_req
{
60 struct nes_alloc_ucontext_resp
{
61 __u32 max_pds
; /* maximum pds allowed for this user process */
62 __u32 max_qps
; /* maximum qps allowed for this user process */
63 __u32 wq_size
; /* size of the WQs (sq+rq) allocated to the mmaped area */
64 __u8 virtwq
; /* flag to indicate if virtual WQ are to be used or not */
69 struct nes_alloc_pd_resp
{
74 struct nes_create_cq_req
{
80 struct nes_create_qp_req
{
81 __u64 user_wqe_buffers
;
85 enum iwnes_memreg_type
{
86 IWNES_MEMREG_TYPE_MEM
= 0x0000,
87 IWNES_MEMREG_TYPE_QP
= 0x0001,
88 IWNES_MEMREG_TYPE_CQ
= 0x0002,
89 IWNES_MEMREG_TYPE_MW
= 0x0003,
90 IWNES_MEMREG_TYPE_FMR
= 0x0004,
91 IWNES_MEMREG_TYPE_FMEM
= 0x0005,
94 struct nes_mem_reg_req
{
95 __u32 reg_type
; /* indicates if id is memory, QP or CQ */
99 struct nes_create_cq_resp
{
106 struct nes_create_qp_resp
{
108 __u32 actual_sq_size
;
109 __u32 actual_rq_size
;
110 __u32 mmap_sq_db_index
;
111 __u32 mmap_rq_db_index
;
115 #endif /* NES_ABI_USER_H */