c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * This file contains definitions used in OFED defined user/kernel
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * interfaces. These are imported from the OFED header ib_user_verbs.h. Oracle
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * elects to have and use the contents of ib_user_verbs.h under and governed
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * by the OpenIB.org BSD license (see below for full license text). However,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * the following notice accompanied the original version of this file:
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * Copyright (c) 2005 Topspin Communications. All rights reserved.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * Copyright (c) 2005, 2006 Cisco Systems. All rights reserved.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * Copyright (c) 2005 PathScale, Inc. All rights reserved.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * Copyright (c) 2006 Mellanox Technologies. All rights reserved.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * This software is available to you under a choice of one of two
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * licenses. You may choose to be licensed under the terms of the GNU
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * General Public License (GPL) Version 2, available from the file
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * COPYING in the main directory of this source tree, or the
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * OpenIB.org BSD license below:
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * Redistribution and use in source and binary forms, with or
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * without modification, are permitted provided that the following
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * conditions are met:
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * - Redistributions of source code must retain the above
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * copyright notice, this list of conditions and the following
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * disclaimer.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * - Redistributions in binary form must reproduce the above
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * copyright notice, this list of conditions and the following
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * disclaimer in the documentation and/or other materials
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * provided with the distribution.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#ifndef _SYS_IB_CLIENTS_OF_RDMA_IB_USER_VERBS_H
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#define _SYS_IB_CLIENTS_OF_RDMA_IB_USER_VERBS_H
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * Increment this value if any changes that break userspace ABI
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * compatibility are made.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * Make sure that all structs defined in this file remain laid out so
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * that they pack the same way on 32-bit and 64-bit architectures (to
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * avoid incompatibility between 32-bit userspace and 64-bit kernels).
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * Specifically:
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * - Do not use pointer types -- pass pointers in uint64_t instead.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * - Make sure that any structure larger than 4 bytes is padded to a
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * multiple of 8 bytes. Otherwise the structure size will be
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * different between 32-bit and 64-bit architectures.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t event_type; /* enum ib_event_type */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * All commands from userspace should start with a uint32_t command field
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * followed by uint16_t in_words and out_words fields (which give the
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * length of the command block and response buffer if any in 32-bit
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * words). The kernel driver will read these fields first and read
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * the rest of the command struct based on these value.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * PD responses may pass opaque data to userspace drivers, we choose a value
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * larger than what any HCA requires.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikartypedef uint64_t uverbs_pd_drv_out_data_t[SOL_UVERBS_PD_DATA_OUT_SIZE];
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * CQ responses pass opaque data to userspace drivers, we choose a value
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * larger than what any HCA requires.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikartypedef uint64_t uverbs_cq_drv_out_data_t[SOL_UVERBS_CQ_DATA_OUT_SIZE];
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar /* ib_qp_cap */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * QP responses pass opaque data to userspace drivers, we choose a value
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * larger than what any HCA requires.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikartypedef uint64_t uverbs_qp_drv_out_data_t[SOL_UVERBS_QP_DATA_OUT_SIZE];
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * This struct needs to remain a multiple of 8 bytes to keep the
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * alignment of the modify QP parameters.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * The ib_uverbs_sge structure isn't used anywhere, since we assume
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * the ib_sge structure is packed the same way on 32-bit and 64-bit
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * architectures in both kernel and user space. It's just here to
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * document the ABI.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * SRQ responses pass opaque data to userspace drivers, we choose a value
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * larger than what any HCA requires.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikartypedef uint64_t uverbs_srq_drv_out_data_t[SOL_UVERBS_SRQ_DATA_OUT_SIZE];
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#endif /* _SYS_IB_CLIENTS_OF_RDMA_IB_USER_VERBS_H */