/*
* interfaces. These are imported from the OFED header ib_verbs.h. Oracle
* elects to have and use the contents of ib_verbs.h under and governed
* by the OpenIB.org BSD license (see below for full license text). However,
* the following notice accompanied the original version of this file:
*/
/*
* Copyright (c) 2004 Mellanox Technologies Ltd. All rights reserved.
* Copyright (c) 2004 Infinicon Corporation. All rights reserved.
* Copyright (c) 2004 Intel Corporation. All rights reserved.
* Copyright (c) 2004 Topspin Corporation. All rights reserved.
* Copyright (c) 2004 Voltaire Corporation. All rights reserved.
* Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
* Copyright (c) 2005, 2006, 2007 Cisco Systems. 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
* 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 _SYS_IB_CLIENTS_OF_IB_VERBS_H
#define _SYS_IB_CLIENTS_OF_IB_VERBS_H
#ifdef __cplusplus
extern "C" {
#endif
union ib_gid {
struct {
} global;
};
enum rdma_node_type {
/* IB values map to NodeInfo:NodeType. */
};
enum rdma_transport_type {
};
enum rdma_transport_type
enum ib_device_cap_flags {
};
enum ib_atomic_cap {
};
struct ib_device_attr {
int max_qp;
int max_qp_wr;
int device_cap_flags;
int max_sge;
int max_sge_rd;
int max_cq;
int max_cqe;
int max_mr;
int max_pd;
int max_qp_rd_atom;
int max_ee_rd_atom;
int max_res_rd_atom;
int max_qp_init_rd_atom;
int max_ee_init_rd_atom;
int max_ee;
int max_rdd;
int max_mw;
int max_raw_ipv6_qp;
int max_raw_ethy_qp;
int max_mcast_grp;
int max_mcast_qp_attach;
int max_ah;
int max_fmr;
int max_map_per_fmr;
int max_srq;
int max_srq_wr;
int max_srq_sge;
};
enum ib_mtu {
};
enum ib_port_state {
IB_PORT_NOP = 0,
};
enum ib_port_cap_flags {
};
enum ib_port_width {
};
{
switch (width) {
case IB_WIDTH_1X: return 1;
case IB_WIDTH_4X: return 4;
case IB_WIDTH_8X: return 8;
case IB_WIDTH_12X: return 12;
default: return -1;
}
}
struct ib_port_attr {
int gid_tbl_len;
};
enum ib_device_modify_flags {
};
struct ib_device_modify {
};
enum ib_port_modify_flags {
};
struct ib_port_modify {
};
enum ib_event_type {
};
struct ib_event {
union {
} element;
};
struct ib_event_handler {
struct ib_event *);
};
struct ib_global_route {
};
enum ib_ah_flags {
};
enum ib_rate {
IB_RATE_PORT_CURRENT = 0,
};
struct ib_ah_attr {
};
enum ib_wc_status {
};
enum ib_wc_opcode {
/*
* Set value of IB_WC_RECV so consumers can test if a completion is a
* receive by testing (opcode & IB_WC_RECV).
*/
};
enum ib_wc_flags {
};
struct ib_wc {
int wc_flags;
};
enum ib_cq_notify_flags {
};
enum ib_srq_attr_mask {
};
struct ib_srq_attr {
};
struct ib_srq_init_attr {
void *srq_context;
};
struct ib_qp_cap {
};
enum ib_sig_type {
};
enum ib_qp_type {
/*
* IB_QPT_SMI and IB_QPT_GSI have to be the first two entries
* here (and in that order) since the MAD layer uses them as
* indices into a 2-entry table.
*/
};
struct ib_qp_init_attr {
void *qp_context;
};
enum ib_rnr_timeout {
IB_RNR_TIMER_655_36 = 0,
};
enum ib_qp_attr_mask {
};
enum ib_qp_state {
};
enum ib_mig_state {
};
struct ib_qp_attr {
int qp_access_flags;
};
enum ib_wr_opcode {
};
enum ib_access_flags {
};
struct ib_pd {
};
struct ib_cq {
void *cq_context;
int cqe;
};
struct ib_srq {
void *srq_context;
};
struct ib_qp {
void *qp_context;
};
typedef struct ib_device {
enum {
} reg_state;
void *data;
} ib_device_t;
typedef struct ib_client {
char *name;
enum {
} state;
} ib_client_t;
void *data);
struct ib_device_attr *device_attr);
/*
* ib_alloc_pd - Allocates an unused protection domain.
* @device: The device on which to allocate the protection domain.
*
* A protection domain object provides an association between QPs, shared
* receive queues, address handles, memory regions, and memory windows.
*/
/*
* ib_dealloc_pd - Deallocates a protection domain.
* @pd: The protection domain to deallocate.
*/
/*
* ib_create_qp - Creates a QP associated with the specified protection
* domain.
* @pd: The protection domain associated with the QP.
* @qp_init_attr: A list of initial attributes required to create the
* QP. If QP creation succeeds, then the attributes are updated to
* the actual capabilities of the created QP.
*/
struct ib_qp_init_attr *qp_init_attr);
/*
* ib_modify_qp - Modifies the attributes for the specified QP and then
* transitions the QP to the given state.
* @qp: The QP to modify.
* @qp_attr: On input, specifies the QP attributes to modify. On output,
* the current values of selected QP attributes are returned.
* @qp_attr_mask: A bit-mask used to specify which attributes of the QP
* are being modified.
*/
int qp_attr_mask);
/*
* ib_destroy_qp - Destroys the specified QP.
* @qp: The QP to destroy.
*/
/*
* IB_CQ_VECTOR_LEAST_ATTACHED: The constant specifies that
* the CQ will be attached to the completion vector that has
* the least number of CQs already attached to it.
*/
/*
* ib_create_cq - Creates a CQ on the specified device.
* @device: The device on which to create the CQ.
* @comp_handler: A user-specified callback that is invoked when a
* completion event occurs on the CQ.
* @event_handler: A user-specified callback that is invoked when an
* asynchronous event not associated with a completion occurs on the CQ.
* @cq_context: Context associated with the CQ returned to the user via
* the associated completion and event handlers.
* @cqe: The minimum size of the CQ.
* @comp_vector - Completion queue sched handle.
*
* Users can examine the cq structure to determine the actual CQ size.
*/
void (*event_handler)(struct ib_event *, void *),
/*
* ib_destroy_cq - Destroys the specified CQ.
* @cq: The CQ to destroy.
*/
/*
* ib_poll_cq - poll a CQ for completion(s)
* @cq:the CQ being polled
* @num_entries:maximum number of completions to return
* @wc:array of at least @num_entries &struct ib_wc where completions
* will be returned
*
* Poll a CQ for (possibly multiple) completions. If the return value
* is < 0, an error occurred. If the return value is >= 0, it is the
* number of completions returned. If the return value is
* non-negative and < num_entries, then the CQ was emptied.
*/
/*
* ib_req_notify_cq - Request completion notification on a CQ.
* @cq: The CQ to generate an event for.
* @flags:
* Must contain exactly one of %IB_CQ_SOLICITED or %IB_CQ_NEXT_COMP
* to request an event on the next solicited event or next work
* completion at any type, respectively. %IB_CQ_REPORT_MISSED_EVENTS
* may also be |ed in to request a hint about missed events, as
* described below.
*
* Return Value:
* < 0 means an error occurred while requesting notification
* == 0 means notification was requested successfully, and if
* IB_CQ_REPORT_MISSED_EVENTS was passed in, then no events
* were missed and it is safe to wait for another event. In
* this case is it guaranteed that any work completions added
* to the CQ since the last CQ poll will trigger a completion
* notification event.
* > 0 is only returned if IB_CQ_REPORT_MISSED_EVENTS was passed
* in. It means that the consumer must poll the CQ again to
* make sure it is empty to avoid missing an event because of a
* race between requesting notification and an entry being
* added to the CQ. This return value means it is possible
* (but not guaranteed) that a work completion has been added
* to the CQ since the last poll without triggering a
* completion notification event.
*/
struct rdma_cm_id;
#ifdef __cplusplus
}
#endif
#endif /* _SYS_IB_CLIENTS_OF_IB_VERBS_H */