c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar/*
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 */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar/*
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 *
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 *
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 *
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 *
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 *
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 * SOFTWARE.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar *
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
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
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#ifdef __cplusplus
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarextern "C" {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#endif
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar/*
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * Increment this value if any changes that break userspace ABI
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * compatibility are made.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#define IB_USER_VERBS_ABI_VERSION 6
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarenum {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar IB_USER_VERBS_CMD_GET_CONTEXT,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar IB_USER_VERBS_CMD_QUERY_DEVICE,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar IB_USER_VERBS_CMD_QUERY_PORT,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar IB_USER_VERBS_CMD_ALLOC_PD,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar IB_USER_VERBS_CMD_DEALLOC_PD,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar IB_USER_VERBS_CMD_CREATE_AH,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar IB_USER_VERBS_CMD_MODIFY_AH,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar IB_USER_VERBS_CMD_QUERY_AH,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar IB_USER_VERBS_CMD_DESTROY_AH,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar IB_USER_VERBS_CMD_REG_MR,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar IB_USER_VERBS_CMD_REG_SMR,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar IB_USER_VERBS_CMD_REREG_MR,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar IB_USER_VERBS_CMD_QUERY_MR,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar IB_USER_VERBS_CMD_DEREG_MR,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar IB_USER_VERBS_CMD_ALLOC_MW,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar IB_USER_VERBS_CMD_BIND_MW,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar IB_USER_VERBS_CMD_DEALLOC_MW,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar IB_USER_VERBS_CMD_CREATE_COMP_CHANNEL,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar IB_USER_VERBS_CMD_CREATE_CQ,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar IB_USER_VERBS_CMD_RESIZE_CQ,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar IB_USER_VERBS_CMD_DESTROY_CQ,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar IB_USER_VERBS_CMD_POLL_CQ,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar IB_USER_VERBS_CMD_PEEK_CQ,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar IB_USER_VERBS_CMD_REQ_NOTIFY_CQ,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar IB_USER_VERBS_CMD_CREATE_QP,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar IB_USER_VERBS_CMD_QUERY_QP,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar IB_USER_VERBS_CMD_MODIFY_QP,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar IB_USER_VERBS_CMD_DESTROY_QP,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar IB_USER_VERBS_CMD_POST_SEND,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar IB_USER_VERBS_CMD_POST_RECV,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar IB_USER_VERBS_CMD_ATTACH_MCAST,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar IB_USER_VERBS_CMD_DETACH_MCAST,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar IB_USER_VERBS_CMD_CREATE_SRQ,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar IB_USER_VERBS_CMD_MODIFY_SRQ,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar IB_USER_VERBS_CMD_QUERY_SRQ,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar IB_USER_VERBS_CMD_DESTROY_SRQ,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar IB_USER_VERBS_CMD_POST_SRQ_RECV,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar IB_USER_VERBS_CMD_CREATE_XRC_SRQ,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar IB_USER_VERBS_CMD_OPEN_XRC_DOMAIN,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar IB_USER_VERBS_CMD_CLOSE_XRC_DOMAIN,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar IB_USER_VERBS_CMD_CREATE_XRC_RCV_QP,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar IB_USER_VERBS_CMD_MODIFY_XRC_RCV_QP,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar IB_USER_VERBS_CMD_QUERY_XRC_RCV_QP,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar IB_USER_VERBS_CMD_REG_XRC_RCV_QP,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar IB_USER_VERBS_CMD_UNREG_XRC_RCV_QP,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar IB_USER_VERBS_CMD_QUERY_GID,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar IB_USER_VERBS_CMD_QUERY_PKEY
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar/*
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 */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_async_event_desc {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint64_t element;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t event_type; /* enum ib_event_type */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t reserved;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_comp_event_desc {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint64_t cq_handle;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar/*
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 */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_cmd_hdr {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t command;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint16_t in_words;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint16_t out_words;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_get_context {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar ofv_resp_addr_t response;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint64_t driver_data[];
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_get_context_resp {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t async_fd;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t num_comp_vectors;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_query_device {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar ofv_resp_addr_t response;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint64_t driver_data[];
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_query_device_resp {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint64_t fw_ver;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint64_t node_guid;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint64_t sys_image_guid;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint64_t max_mr_size;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint64_t page_size_cap;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t vendor_id;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t vendor_part_id;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t hw_ver;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_qp;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_qp_wr;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t device_cap_flags;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_sge;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_sge_rd;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_cq;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_cqe;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_mr;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_pd;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_qp_rd_atom;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_ee_rd_atom;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_res_rd_atom;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_qp_init_rd_atom;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_ee_init_rd_atom;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t atomic_cap;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_ee;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_rdd;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_mw;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_raw_ipv6_qp;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_raw_ethy_qp;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_mcast_grp;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_mcast_qp_attach;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_total_mcast_qp_attach;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_ah;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_fmr;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_map_per_fmr;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_srq;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_srq_wr;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_srq_sge;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint16_t max_pkeys;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t local_ca_ack_delay;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t phys_port_cnt;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t reserved[4];
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_query_port {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar ofv_resp_addr_t response;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t port_num;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t reserved[7];
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint64_t driver_data[];
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_query_port_resp {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t port_cap_flags;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_msg_sz;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t bad_pkey_cntr;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t qkey_viol_cntr;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t gid_tbl_len;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint16_t pkey_tbl_len;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint16_t lid;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint16_t sm_lid;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t state;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t max_mtu;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t active_mtu;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t lmc;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t max_vl_num;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t sm_sl;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t subnet_timeout;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t init_type_reply;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t active_width;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t active_speed;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t phys_state;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t reserved[3];
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_query_gid {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar ofv_resp_addr_t response;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t gid_index;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t port_num;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t reserved[3];
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint64_t driver_data;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_query_gid_resp {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t gid[16];
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_query_pkey {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar ofv_resp_addr_t response;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t pkey_index;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t port_num;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t reserved[3];
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint64_t driver_data;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_query_pkey_resp {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint16_t pkey;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint16_t reserved;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_alloc_pd {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar ofv_resp_addr_t response;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint64_t driver_data[];
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar/*
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * PD responses may pass opaque data to userspace drivers, we choose a value
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * larger than what any HCA requires.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#define SOL_UVERBS_PD_DATA_OUT_SIZE 24
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikartypedef uint64_t uverbs_pd_drv_out_data_t[SOL_UVERBS_PD_DATA_OUT_SIZE];
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_alloc_pd_resp {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t pd_handle;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t reserved;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uverbs_pd_drv_out_data_t drv_out;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_dealloc_pd {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t pd_handle;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_reg_mr {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar ofv_resp_addr_t response;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint64_t start;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint64_t length;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint64_t hca_va;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t pd_handle;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t access_flags;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint64_t driver_data[];
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_reg_mr_resp {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t mr_handle;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t lkey;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t rkey;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_dereg_mr {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t mr_handle;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_create_comp_channel {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar ofv_resp_addr_t response;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_create_comp_channel_resp {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t fd;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_create_cq {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar ofv_resp_addr_t response;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint64_t user_handle;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t cqe;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t comp_vector;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar int32_t comp_channel;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t reserved;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint64_t driver_data[];
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar/*
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * CQ responses pass opaque data to userspace drivers, we choose a value
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * larger than what any HCA requires.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#define SOL_UVERBS_CQ_DATA_OUT_SIZE 24
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikartypedef uint64_t uverbs_cq_drv_out_data_t[SOL_UVERBS_CQ_DATA_OUT_SIZE];
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_create_cq_resp {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t cq_handle;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t cqe;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uverbs_cq_drv_out_data_t drv_out;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_resize_cq {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar ofv_resp_addr_t response;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t cq_handle;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t cqe;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint64_t driver_data[];
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_resize_cq_resp {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t cqe;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t reserved;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uverbs_cq_drv_out_data_t drv_out;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_poll_cq {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar ofv_resp_addr_t response;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t cq_handle;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t ne;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_wc {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint64_t wr_id;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t status;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t opcode;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t vendor_err;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t byte_len;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t imm_data;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t qp_num;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t src_qp;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t wc_flags;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint16_t pkey_index;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint16_t slid;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t sl;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t dlid_path_bits;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t port_num;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t reserved;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_poll_cq_resp {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t count;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t reserved;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar struct ib_uverbs_wc wc[];
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_req_notify_cq {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t cq_handle;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t solicited_only;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_destroy_cq {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar ofv_resp_addr_t response;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t cq_handle;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t reserved;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_destroy_cq_resp {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t comp_events_reported;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t async_events_reported;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_global_route {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t dgid[16];
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t flow_label;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t sgid_index;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t hop_limit;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t traffic_class;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t reserved;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_ah_attr {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar struct ib_uverbs_global_route grh;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint16_t dlid;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t sl;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t src_path_bits;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t static_rate;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t is_global;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t port_num;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t reserved;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_qp_attr {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t qp_attr_mask;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t qp_state;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t cur_qp_state;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t path_mtu;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t path_mig_state;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t qkey;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t rq_psn;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t sq_psn;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t dest_qp_num;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t qp_access_flags;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar struct ib_uverbs_ah_attr ah_attr;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar struct ib_uverbs_ah_attr alt_ah_attr;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar /* ib_qp_cap */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_send_wr;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_recv_wr;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_send_sge;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_recv_sge;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_inline_data;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint16_t pkey_index;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint16_t alt_pkey_index;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t en_sqd_async_notify;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t sq_draining;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t max_rd_atomic;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t max_dest_rd_atomic;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t min_rnr_timer;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t port_num;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t timeout;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t retry_cnt;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t rnr_retry;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t alt_port_num;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t alt_timeout;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t reserved[5];
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_create_qp {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar ofv_resp_addr_t response;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint64_t user_handle;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t pd_handle;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t send_cq_handle;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t recv_cq_handle;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t srq_handle;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_send_wr;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_recv_wr;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_send_sge;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_recv_sge;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_inline_data;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t sq_sig_all;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t qp_type;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t is_srq;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t reserved;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint64_t driver_data[];
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar/*
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * QP responses pass opaque data to userspace drivers, we choose a value
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * larger than what any HCA requires.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#define SOL_UVERBS_QP_DATA_OUT_SIZE 24
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikartypedef uint64_t uverbs_qp_drv_out_data_t[SOL_UVERBS_QP_DATA_OUT_SIZE];
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_create_qp_resp {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t qp_handle;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t qpn;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_send_wr;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_recv_wr;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_send_sge;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_recv_sge;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_inline_data;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t reserved;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uverbs_qp_drv_out_data_t drv_out;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar/*
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 */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_qp_dest {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t dgid[16];
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t flow_label;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint16_t dlid;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint16_t reserved;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t sgid_index;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t hop_limit;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t traffic_class;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t sl;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t src_path_bits;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t static_rate;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t is_global;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t port_num;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_query_qp {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar ofv_resp_addr_t response;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t qp_handle;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t attr_mask;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint64_t driver_data[];
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_query_qp_resp {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar struct ib_uverbs_qp_dest dest;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar struct ib_uverbs_qp_dest alt_dest;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_send_wr;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_recv_wr;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_send_sge;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_recv_sge;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_inline_data;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t qkey;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t rq_psn;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t sq_psn;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t dest_qp_num;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t qp_access_flags;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint16_t pkey_index;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint16_t alt_pkey_index;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t qp_state;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t cur_qp_state;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t path_mtu;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t path_mig_state;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t sq_draining;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t max_rd_atomic;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t max_dest_rd_atomic;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t min_rnr_timer;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t port_num;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t timeout;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t retry_cnt;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t rnr_retry;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t alt_port_num;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t alt_timeout;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t sq_sig_all;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t reserved[5];
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint64_t driver_data[];
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_modify_qp {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar struct ib_uverbs_qp_dest dest;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar struct ib_uverbs_qp_dest alt_dest;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t qp_handle;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t attr_mask;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t qkey;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t rq_psn;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t sq_psn;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t dest_qp_num;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t qp_access_flags;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint16_t pkey_index;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint16_t alt_pkey_index;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t qp_state;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t cur_qp_state;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t path_mtu;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t path_mig_state;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t en_sqd_async_notify;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t max_rd_atomic;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t max_dest_rd_atomic;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t min_rnr_timer;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t port_num;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t timeout;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t retry_cnt;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t rnr_retry;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t alt_port_num;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t alt_timeout;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t reserved[2];
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint64_t driver_data[];
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_destroy_qp {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar ofv_resp_addr_t response;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t qp_handle;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t reserved;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_destroy_qp_resp {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t events_reported;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar/*
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 */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_sge {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint64_t addr;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t length;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t lkey;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_send_wr {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint64_t wr_id;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t num_sge;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t opcode;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t send_flags;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t imm_data;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar union {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar struct {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint64_t remote_addr;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t rkey;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t reserved;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar } rdma;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar struct {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint64_t remote_addr;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint64_t compare_add;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint64_t swap;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t rkey;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t reserved;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar } atomic;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar struct {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t ah;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t remote_qpn;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t remote_qkey;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t reserved;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar } ud;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar } wr;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_post_send {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint64_t response;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t qp_handle;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t wr_count;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t sge_count;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t wqe_size;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar struct ib_uverbs_send_wr send_wr[];
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_post_send_resp {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t bad_wr;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_recv_wr {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint64_t wr_id;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t num_sge;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t reserved;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_post_recv {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint64_t response;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t qp_handle;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t wr_count;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t sge_count;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t wqe_size;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar struct ib_uverbs_recv_wr recv_wr[];
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_post_recv_resp {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t bad_wr;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_post_srq_recv {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint64_t response;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t srq_handle;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t wr_count;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t sge_count;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t wqe_size;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar struct ib_uverbs_recv_wr recv[];
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_post_srq_recv_resp {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t bad_wr;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_create_ah {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint64_t response;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint64_t user_handle;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t pd_handle;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t reserved;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar struct ib_uverbs_ah_attr attr;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_create_ah_resp {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t ah_handle;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_destroy_ah {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t ah_handle;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_attach_mcast {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t gid[16];
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t qp_handle;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint16_t mlid;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint16_t reserved;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint64_t driver_data[];
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_detach_mcast {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t gid[16];
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t qp_handle;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint16_t mlid;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint16_t reserved;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint64_t driver_data[];
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_create_srq {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar ofv_resp_addr_t response;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint64_t user_handle;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t pd_handle;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_wr;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_sge;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t srq_limit;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint64_t driver_data[];
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar/*
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * SRQ responses pass opaque data to userspace drivers, we choose a value
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * larger than what any HCA requires.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#define SOL_UVERBS_SRQ_DATA_OUT_SIZE 24
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikartypedef uint64_t uverbs_srq_drv_out_data_t[SOL_UVERBS_SRQ_DATA_OUT_SIZE];
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_create_srq_resp {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t srq_handle;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_wr;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_sge;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t reserved;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uverbs_srq_drv_out_data_t drv_out;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_modify_srq {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t srq_handle;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t attr_mask;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_wr;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t srq_limit;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint64_t driver_data[];
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_query_srq {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar ofv_resp_addr_t response;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t srq_handle;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t reserved;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint64_t driver_data[];
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_query_srq_resp {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_wr;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_sge;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t srq_limit;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t reserved;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_destroy_srq {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar ofv_resp_addr_t response;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t srq_handle;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t reserved;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_uverbs_destroy_srq_resp {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t events_reported;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#ifdef __cplusplus
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar}
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#endif
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#endif /* _SYS_IB_CLIENTS_OF_RDMA_IB_USER_VERBS_H */