Path: blob/master/drivers/infiniband/hw/mlx4/user.h
15112 views
/*1* Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.2* Copyright (c) 2007, 2008 Mellanox Technologies. All rights reserved.3*4* This software is available to you under a choice of one of two5* licenses. You may choose to be licensed under the terms of the GNU6* General Public License (GPL) Version 2, available from the file7* COPYING in the main directory of this source tree, or the8* OpenIB.org BSD license below:9*10* Redistribution and use in source and binary forms, with or11* without modification, are permitted provided that the following12* conditions are met:13*14* - Redistributions of source code must retain the above15* copyright notice, this list of conditions and the following16* disclaimer.17*18* - Redistributions in binary form must reproduce the above19* copyright notice, this list of conditions and the following20* disclaimer in the documentation and/or other materials21* provided with the distribution.22*23* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,24* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF25* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND26* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS27* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN28* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN29* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE30* SOFTWARE.31*/3233#ifndef MLX4_IB_USER_H34#define MLX4_IB_USER_H3536#include <linux/types.h>3738/*39* Increment this value if any changes that break userspace ABI40* compatibility are made.41*/42#define MLX4_IB_UVERBS_ABI_VERSION 34344/*45* Make sure that all structs defined in this file remain laid out so46* that they pack the same way on 32-bit and 64-bit architectures (to47* avoid incompatibility between 32-bit userspace and 64-bit kernels).48* In particular do not use pointer types -- pass pointers in __u6449* instead.50*/5152struct mlx4_ib_alloc_ucontext_resp {53__u32 qp_tab_size;54__u16 bf_reg_size;55__u16 bf_regs_per_page;56};5758struct mlx4_ib_alloc_pd_resp {59__u32 pdn;60__u32 reserved;61};6263struct mlx4_ib_create_cq {64__u64 buf_addr;65__u64 db_addr;66};6768struct mlx4_ib_create_cq_resp {69__u32 cqn;70__u32 reserved;71};7273struct mlx4_ib_resize_cq {74__u64 buf_addr;75};7677struct mlx4_ib_create_srq {78__u64 buf_addr;79__u64 db_addr;80};8182struct mlx4_ib_create_srq_resp {83__u32 srqn;84__u32 reserved;85};8687struct mlx4_ib_create_qp {88__u64 buf_addr;89__u64 db_addr;90__u8 log_sq_bb_count;91__u8 log_sq_stride;92__u8 sq_no_prefetch;93__u8 reserved[5];94};9596#endif /* MLX4_IB_USER_H */979899