13062Sjlahoda/* 24137Sihse * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved. 33062Sjlahoda * Copyright (c) 2007, 2008 Mellanox Technologies. All rights reserved. 43062Sjlahoda * 53062Sjlahoda * This software is available to you under a choice of one of two 63062Sjlahoda * licenses. You may choose to be licensed under the terms of the GNU 73062Sjlahoda * General Public License (GPL) Version 2, available from the file 83062Sjlahoda * COPYING in the main directory of this source tree, or the 93062Sjlahoda * OpenIB.org BSD license below: 103062Sjlahoda * 113062Sjlahoda * Redistribution and use in source and binary forms, with or 123062Sjlahoda * without modification, are permitted provided that the following 133062Sjlahoda * conditions are met: 143062Sjlahoda * 153062Sjlahoda * - Redistributions of source code must retain the above 163062Sjlahoda * copyright notice, this list of conditions and the following 173062Sjlahoda * disclaimer. 183062Sjlahoda * 193062Sjlahoda * - Redistributions in binary form must reproduce the above 203062Sjlahoda * copyright notice, this list of conditions and the following 213062Sjlahoda * disclaimer in the documentation and/or other materials 223062Sjlahoda * provided with the distribution. 233062Sjlahoda * 243062Sjlahoda * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 253062Sjlahoda * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 263062Sjlahoda * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 273062Sjlahoda * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 283424Srfield * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 293062Sjlahoda * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 303062Sjlahoda * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 313710Sjlahoda * SOFTWARE. 323062Sjlahoda */ 333781Srfield 343318Srfield#ifndef MLX4_IB_USER_H 353360Srfield#define MLX4_IB_USER_H 363360Srfield 373062Sjlahoda#include <linux/types.h> 383062Sjlahoda 393062Sjlahoda/* 403062Sjlahoda * Increment this value if any changes that break userspace ABI 413318Srfield * compatibility are made. 423062Sjlahoda */ 433318Srfield 443062Sjlahoda#define MLX4_IB_UVERBS_NO_DEV_CAPS_ABI_VERSION 3 453062Sjlahoda#define MLX4_IB_UVERBS_ABI_VERSION 4 463062Sjlahoda 473962Srfield/* 483062Sjlahoda * Make sure that all structs defined in this file remain laid out so 493569Srfield * that they pack the same way on 32-bit and 64-bit architectures (to 503962Srfield * avoid incompatibility between 32-bit userspace and 64-bit kernels). 513062Sjlahoda * In particular do not use pointer types -- pass pointers in __u64 523542Srfield * instead. 533542Srfield */ 543542Srfield 553846Srfieldstruct mlx4_ib_alloc_ucontext_resp_v3 { 563542Srfield __u32 qp_tab_size; 573062Sjlahoda __u16 bf_reg_size; 583062Sjlahoda __u16 bf_regs_per_page; 593062Sjlahoda}; 603062Sjlahoda 613464Srfieldstruct mlx4_ib_alloc_ucontext_resp { 623062Sjlahoda __u32 dev_caps; 633062Sjlahoda __u32 qp_tab_size; 643695Srfield __u16 bf_reg_size; 653062Sjlahoda __u16 bf_regs_per_page; 663062Sjlahoda __u32 cqe_size; 673464Srfield}; 683062Sjlahoda 693062Sjlahodastruct mlx4_ib_alloc_pd_resp { 703062Sjlahoda __u32 pdn; 713062Sjlahoda __u32 reserved; 723062Sjlahoda}; 733062Sjlahoda 743062Sjlahodastruct mlx4_ib_create_cq { 753062Sjlahoda __u64 buf_addr; 763062Sjlahoda __u64 db_addr; 773464Srfield}; 783464Srfield 793062Sjlahodastruct mlx4_ib_create_cq_resp { 803062Sjlahoda __u32 cqn; 813062Sjlahoda __u32 reserved; 823974Srfield}; 833062Sjlahoda 843974Srfieldstruct mlx4_ib_resize_cq { 853062Sjlahoda __u64 buf_addr; 863062Sjlahoda}; 873062Sjlahoda 883062Sjlahodastruct mlx4_ib_create_srq { 893062Sjlahoda __u64 buf_addr; 903357Srfield __u64 db_addr; 913062Sjlahoda}; 923062Sjlahoda 933062Sjlahodastruct mlx4_ib_create_srq_resp { 943062Sjlahoda __u32 srqn; 953062Sjlahoda __u32 reserved; 963062Sjlahoda}; 973360Srfield 983510Srfieldstruct mlx4_ib_create_qp { 993962Srfield __u64 buf_addr; 1003062Sjlahoda __u64 db_addr; 1013062Sjlahoda __u8 log_sq_bb_count; 1023062Sjlahoda __u8 log_sq_stride; 1033062Sjlahoda __u8 sq_no_prefetch; 1043542Srfield __u8 reserved[5]; 1053062Sjlahoda}; 1063062Sjlahoda 1073062Sjlahoda#endif /* MLX4_IB_USER_H */ 1083062Sjlahoda