linux/include/uapi/rdma/ib_user_verbs.h

/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */
/*
 * Copyright (c) 2005 Topspin Communications.  All rights reserved.
 * Copyright (c) 2005, 2006 Cisco Systems.  All rights reserved.
 * Copyright (c) 2005 PathScale, Inc.  All rights reserved.
 * Copyright (c) 2006 Mellanox Technologies.  All rights reserved.
 *
 * This software is available to you under a choice of one of two
 * licenses.  You may choose to be licensed under the terms of the GNU
 * General Public License (GPL) Version 2, available from the file
 * COPYING in the main directory of this source tree, or the
 * OpenIB.org BSD license below:
 *
 *     Redistribution and use in source and binary forms, with or
 *     without modification, are permitted provided that the following
 *     conditions are met:
 *
 *      - Redistributions of source code must retain the above
 *        copyright notice, this list of conditions and the following
 *        disclaimer.
 *
 *      - Redistributions in binary form must reproduce the above
 *        copyright notice, this list of conditions and the following
 *        disclaimer in the documentation and/or other materials
 *        provided with the distribution.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

#ifndef IB_USER_VERBS_H
#define IB_USER_VERBS_H

#include <linux/types.h>

/*
 * Increment this value if any changes that break userspace ABI
 * compatibility are made.
 */
#define IB_USER_VERBS_ABI_VERSION
#define IB_USER_VERBS_CMD_THRESHOLD

enum ib_uverbs_write_cmds {};

enum {};

/* see IBA A19.4.1.1 Placement Types */
enum ib_placement_type {};

/* see IBA A19.4.1.2 Selectivity Level */
enum ib_selectivity_level {};

/*
 * Make sure that all structs defined in this file remain laid out so
 * that they pack the same way on 32-bit and 64-bit architectures (to
 * avoid incompatibility between 32-bit userspace and 64-bit kernels).
 * Specifically:
 *  - Do not use pointer types -- pass pointers in __u64 instead.
 *  - Make sure that any structure larger than 4 bytes is padded to a
 *    multiple of 8 bytes.  Otherwise the structure size will be
 *    different between 32-bit and 64-bit architectures.
 */

struct ib_uverbs_async_event_desc {};

struct ib_uverbs_comp_event_desc {};

struct ib_uverbs_cq_moderation_caps {};

/*
 * All commands from userspace should start with a __u32 command field
 * followed by __u16 in_words and out_words fields (which give the
 * length of the command block and response buffer if any in 32-bit
 * words).  The kernel driver will read these fields first and read
 * the rest of the command struct based on these value.
 */

#define IB_USER_VERBS_CMD_COMMAND_MASK
#define IB_USER_VERBS_CMD_FLAG_EXTENDED

struct ib_uverbs_cmd_hdr {};

struct ib_uverbs_ex_cmd_hdr {};

struct ib_uverbs_get_context {};

struct ib_uverbs_get_context_resp {};

struct ib_uverbs_query_device {};

struct ib_uverbs_query_device_resp {};

struct ib_uverbs_ex_query_device {};

struct ib_uverbs_odp_caps {};

struct ib_uverbs_rss_caps {};

struct ib_uverbs_tm_caps {};

struct ib_uverbs_ex_query_device_resp {};

struct ib_uverbs_query_port {};

struct ib_uverbs_query_port_resp {};

struct ib_uverbs_alloc_pd {};

struct ib_uverbs_alloc_pd_resp {};

struct ib_uverbs_dealloc_pd {};

struct ib_uverbs_open_xrcd {};

struct ib_uverbs_open_xrcd_resp {};

struct ib_uverbs_close_xrcd {};

struct ib_uverbs_reg_mr {};

struct ib_uverbs_reg_mr_resp {};

struct ib_uverbs_rereg_mr {};

struct ib_uverbs_rereg_mr_resp {};

struct ib_uverbs_dereg_mr {};

struct ib_uverbs_alloc_mw {};

struct ib_uverbs_alloc_mw_resp {};

struct ib_uverbs_dealloc_mw {};

struct ib_uverbs_create_comp_channel {};

struct ib_uverbs_create_comp_channel_resp {};

struct ib_uverbs_create_cq {};

enum ib_uverbs_ex_create_cq_flags {};

struct ib_uverbs_ex_create_cq {};

struct ib_uverbs_create_cq_resp {};

struct ib_uverbs_ex_create_cq_resp {};

struct ib_uverbs_resize_cq {};

struct ib_uverbs_resize_cq_resp {};

struct ib_uverbs_poll_cq {};

enum ib_uverbs_wc_opcode {};

struct ib_uverbs_wc {};

struct ib_uverbs_poll_cq_resp {};

struct ib_uverbs_req_notify_cq {};

struct ib_uverbs_destroy_cq {};

struct ib_uverbs_destroy_cq_resp {};

struct ib_uverbs_global_route {};

struct ib_uverbs_ah_attr {};

struct ib_uverbs_qp_attr {};

struct ib_uverbs_create_qp {};

enum ib_uverbs_create_qp_mask {};

enum {};

struct ib_uverbs_ex_create_qp {};

struct ib_uverbs_open_qp {};

/* also used for open response */
struct ib_uverbs_create_qp_resp {};

struct ib_uverbs_ex_create_qp_resp {};

/*
 * This struct needs to remain a multiple of 8 bytes to keep the
 * alignment of the modify QP parameters.
 */
struct ib_uverbs_qp_dest {};

struct ib_uverbs_query_qp {};

struct ib_uverbs_query_qp_resp {};

struct ib_uverbs_modify_qp {};

struct ib_uverbs_ex_modify_qp {};

struct ib_uverbs_ex_modify_qp_resp {};

struct ib_uverbs_destroy_qp {};

struct ib_uverbs_destroy_qp_resp {};

/*
 * The ib_uverbs_sge structure isn't used anywhere, since we assume
 * the ib_sge structure is packed the same way on 32-bit and 64-bit
 * architectures in both kernel and user space.  It's just here to
 * document the ABI.
 */
struct ib_uverbs_sge {};

enum ib_uverbs_wr_opcode {};

struct ib_uverbs_send_wr {};

struct ib_uverbs_post_send {};

struct ib_uverbs_post_send_resp {};

struct ib_uverbs_recv_wr {};

struct ib_uverbs_post_recv {};

struct ib_uverbs_post_recv_resp {};

struct ib_uverbs_post_srq_recv {};

struct ib_uverbs_post_srq_recv_resp {};

struct ib_uverbs_create_ah {};

struct ib_uverbs_create_ah_resp {};

struct ib_uverbs_destroy_ah {};

struct ib_uverbs_attach_mcast {};

struct ib_uverbs_detach_mcast {};

struct ib_uverbs_flow_spec_hdr {};

struct ib_uverbs_flow_eth_filter {};

struct ib_uverbs_flow_spec_eth {};

struct ib_uverbs_flow_ipv4_filter {};

struct ib_uverbs_flow_spec_ipv4 {};

struct ib_uverbs_flow_tcp_udp_filter {};

struct ib_uverbs_flow_spec_tcp_udp {};

struct ib_uverbs_flow_ipv6_filter {};

struct ib_uverbs_flow_spec_ipv6 {};

struct ib_uverbs_flow_spec_action_tag {};

struct ib_uverbs_flow_spec_action_drop {};

struct ib_uverbs_flow_spec_action_handle {};

struct ib_uverbs_flow_spec_action_count {};

struct ib_uverbs_flow_tunnel_filter {};

struct ib_uverbs_flow_spec_tunnel {};

struct ib_uverbs_flow_spec_esp_filter {};

struct ib_uverbs_flow_spec_esp {};

struct ib_uverbs_flow_gre_filter {};

struct ib_uverbs_flow_spec_gre {};

struct ib_uverbs_flow_mpls_filter {};

struct ib_uverbs_flow_spec_mpls {};

struct ib_uverbs_flow_attr {};

struct ib_uverbs_create_flow  {};

struct ib_uverbs_create_flow_resp {};

struct ib_uverbs_destroy_flow  {};

struct ib_uverbs_create_srq {};

struct ib_uverbs_create_xsrq {};

struct ib_uverbs_create_srq_resp {};

struct ib_uverbs_modify_srq {};

struct ib_uverbs_query_srq {};

struct ib_uverbs_query_srq_resp {};

struct ib_uverbs_destroy_srq {};

struct ib_uverbs_destroy_srq_resp {};

struct ib_uverbs_ex_create_wq  {};

struct ib_uverbs_ex_create_wq_resp {};

struct ib_uverbs_ex_destroy_wq  {};

struct ib_uverbs_ex_destroy_wq_resp {};

struct ib_uverbs_ex_modify_wq  {};

/* Prevent memory allocation rather than max expected size */
#define IB_USER_VERBS_MAX_LOG_IND_TBL_SIZE
struct ib_uverbs_ex_create_rwq_ind_table  {};

struct ib_uverbs_ex_create_rwq_ind_table_resp {};

struct ib_uverbs_ex_destroy_rwq_ind_table  {};

struct ib_uverbs_cq_moderation {};

struct ib_uverbs_ex_modify_cq {};

#define IB_DEVICE_NAME_MAX

/*
 * bits 9, 15, 16, 19, 22, 27, 30, 31, 32, 33, 35 and 37 may be set by old
 * kernels and should not be used.
 */
enum ib_uverbs_device_cap_flags {};

enum ib_uverbs_raw_packet_caps {};

#endif /* IB_USER_VERBS_H */