linux/drivers/infiniband/core/mad_priv.h

/*
 * Copyright (c) 2004, 2005, Voltaire, Inc. All rights reserved.
 * Copyright (c) 2005 Intel Corporation. All rights reserved.
 * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
 * Copyright (c) 2009 HNR Consulting. 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_MAD_PRIV_H__
#define __IB_MAD_PRIV_H__

#include <linux/completion.h>
#include <linux/err.h>
#include <linux/workqueue.h>
#include <rdma/ib_mad.h>
#include <rdma/ib_smi.h>
#include <rdma/opa_smi.h>

#define IB_MAD_QPS_CORE

/* QP and CQ parameters */
#define IB_MAD_QP_SEND_SIZE
#define IB_MAD_QP_RECV_SIZE
#define IB_MAD_QP_MIN_SIZE
#define IB_MAD_QP_MAX_SIZE
#define IB_MAD_SEND_REQ_MAX_SG
#define IB_MAD_RECV_REQ_MAX_SG

#define IB_MAD_SEND_Q_PSN

/* Registration table sizes */
#define MAX_MGMT_CLASS
#define MAX_MGMT_VERSION
#define MAX_MGMT_OUI
#define MAX_MGMT_VENDOR_RANGE2

struct ib_mad_list_head {};

struct ib_mad_private_header {} __packed;

struct ib_mad_private {} __packed;

struct ib_rmpp_segment {};

struct ib_mad_agent_private {};

struct ib_mad_snoop_private {};

struct ib_mad_send_wr_private {};

struct ib_mad_local_private {};

struct ib_mad_mgmt_method_table {};

struct ib_mad_mgmt_class_table {};

struct ib_mad_mgmt_vendor_class {};

struct ib_mad_mgmt_vendor_class_table {};

struct ib_mad_mgmt_version_table {};

struct ib_mad_queue {};

struct ib_mad_qp_info {};

struct ib_mad_port_private {};

int ib_send_mad(struct ib_mad_send_wr_private *mad_send_wr);

struct ib_mad_send_wr_private *
ib_find_send_mad(const struct ib_mad_agent_private *mad_agent_priv,
		 const struct ib_mad_recv_wc *mad_recv_wc);

void ib_mad_complete_send_wr(struct ib_mad_send_wr_private *mad_send_wr,
			     struct ib_mad_send_wc *mad_send_wc);

void ib_mark_mad_done(struct ib_mad_send_wr_private *mad_send_wr);

void ib_reset_mad_timeout(struct ib_mad_send_wr_private *mad_send_wr,
			  unsigned long timeout_ms);

#endif	/* __IB_MAD_PRIV_H__ */