Path: blob/main/sys/ofed/include/uapi/rdma/mlx4-abi.h
39488 views
/*-1* SPDX-License-Identifier: BSD-2-Clause OR GPL-2.02*3* Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.4* Copyright (c) 2007, 2008 Mellanox Technologies. All rights reserved.5*6* This software is available to you under a choice of one of two7* licenses. You may choose to be licensed under the terms of the GNU8* General Public License (GPL) Version 2, available from the file9* COPYING in the main directory of this source tree, or the10* OpenIB.org BSD license below:11*12* Redistribution and use in source and binary forms, with or13* without modification, are permitted provided that the following14* conditions are met:15*16* - Redistributions of source code must retain the above17* copyright notice, this list of conditions and the following18* disclaimer.19*20* - Redistributions in binary form must reproduce the above21* copyright notice, this list of conditions and the following22* disclaimer in the documentation and/or other materials23* provided with the distribution.24*25* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,26* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF27* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND28* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS29* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN30* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN31* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE32* SOFTWARE.33*/3435#ifndef MLX4_ABI_USER_H36#define MLX4_ABI_USER_H3738#ifdef _KERNEL39#include <linux/types.h>40#else41#include <infiniband/types.h>42#endif4344/*45* Increment this value if any changes that break userspace ABI46* compatibility are made.47*/4849#define MLX4_IB_UVERBS_NO_DEV_CAPS_ABI_VERSION 350#define MLX4_IB_UVERBS_ABI_VERSION 45152/*53* Make sure that all structs defined in this file remain laid out so54* that they pack the same way on 32-bit and 64-bit architectures (to55* avoid incompatibility between 32-bit userspace and 64-bit kernels).56* In particular do not use pointer types -- pass pointers in __u6457* instead.58*/5960struct mlx4_ib_alloc_ucontext_resp_v3 {61__u32 qp_tab_size;62__u16 bf_reg_size;63__u16 bf_regs_per_page;64};6566struct mlx4_ib_alloc_ucontext_resp {67__u32 dev_caps;68__u32 qp_tab_size;69__u16 bf_reg_size;70__u16 bf_regs_per_page;71__u32 cqe_size;72};7374struct mlx4_ib_alloc_pd_resp {75__u32 pdn;76__u32 reserved;77};7879struct mlx4_ib_create_cq {80__u64 buf_addr;81__u64 db_addr;82};8384struct mlx4_ib_create_cq_resp {85__u32 cqn;86__u32 reserved;87};8889struct mlx4_ib_resize_cq {90__u64 buf_addr;91};9293struct mlx4_ib_create_srq {94__u64 buf_addr;95__u64 db_addr;96};9798struct mlx4_ib_create_srq_resp {99__u32 srqn;100__u32 reserved;101};102103struct mlx4_ib_create_qp {104__u64 buf_addr;105__u64 db_addr;106__u8 log_sq_bb_count;107__u8 log_sq_stride;108__u8 sq_no_prefetch;109__u8 reserved[5];110};111112#endif /* MLX4_ABI_USER_H */113114115