/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */1/*2* Copyright (c) 2005 Topspin Communications. All rights reserved.3* Copyright (c) 2005, 2006 Cisco Systems. All rights reserved.4*5* This software is available to you under a choice of one of two6* licenses. You may choose to be licensed under the terms of the GNU7* General Public License (GPL) Version 2, available from the file8* COPYING in the main directory of this source tree, or the9* OpenIB.org BSD license below:10*11* Redistribution and use in source and binary forms, with or12* without modification, are permitted provided that the following13* conditions are met:14*15* - Redistributions of source code must retain the above16* copyright notice, this list of conditions and the following17* disclaimer.18*19* - Redistributions in binary form must reproduce the above20* copyright notice, this list of conditions and the following21* disclaimer in the documentation and/or other materials22* provided with the distribution.23*24* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,25* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF26* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND27* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS28* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN29* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN30* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE31* SOFTWARE.32*/3334#ifndef MTHCA_ABI_USER_H35#define MTHCA_ABI_USER_H3637#include <linux/types.h>3839/*40* Increment this value if any changes that break userspace ABI41* compatibility are made.42*/43#define MTHCA_UVERBS_ABI_VERSION 14445/*46* Make sure that all structs defined in this file remain laid out so47* that they pack the same way on 32-bit and 64-bit architectures (to48* avoid incompatibility between 32-bit userspace and 64-bit kernels).49* In particular do not use pointer types -- pass pointers in __u6450* instead.51*/52struct mthca_alloc_ucontext_resp {53__u32 qp_tab_size;54__u32 uarc_size;55};5657struct mthca_alloc_pd_resp {58__u32 pdn;59__u32 reserved;60};6162/*63* Mark the memory region with a DMA attribute that causes64* in-flight DMA to be flushed when the region is written to:65*/66#define MTHCA_MR_DMASYNC 0x16768struct mthca_reg_mr {69__u32 mr_attrs;70__u32 reserved;71};7273struct mthca_create_cq {74__u32 lkey;75__u32 pdn;76__aligned_u64 arm_db_page;77__aligned_u64 set_db_page;78__u32 arm_db_index;79__u32 set_db_index;80};8182struct mthca_create_cq_resp {83__u32 cqn;84__u32 reserved;85};8687struct mthca_resize_cq {88__u32 lkey;89__u32 reserved;90};9192struct mthca_create_srq {93__u32 lkey;94__u32 db_index;95__aligned_u64 db_page;96};9798struct mthca_create_srq_resp {99__u32 srqn;100__u32 reserved;101};102103struct mthca_create_qp {104__u32 lkey;105__u32 reserved;106__aligned_u64 sq_db_page;107__aligned_u64 rq_db_page;108__u32 sq_db_index;109__u32 rq_db_index;110};111#endif /* MTHCA_ABI_USER_H */112113114