linux/drivers/infiniband/hw/qedr/qedr.h

/* QLogic qedr NIC Driver
 * Copyright (c) 2015-2016  QLogic Corporation
 *
 * 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 __QEDR_H__
#define __QEDR_H__

#include <linux/pci.h>
#include <linux/xarray.h>
#include <rdma/ib_addr.h>
#include <linux/qed/qed_if.h>
#include <linux/qed/qed_chain.h>
#include <linux/qed/qed_rdma_if.h>
#include <linux/qed/qede_rdma.h>
#include <linux/qed/roce_common.h>
#include <linux/completion.h>
#include "qedr_hsi_rdma.h"

#define QEDR_NODE_DESC
#define DP_NAME(_dev)
#define IS_IWARP(_dev)
#define IS_ROCE(_dev)

#define DP_DEBUG(dev, module, fmt, ...)

#define QEDR_MSG_INIT
#define QEDR_MSG_MISC
#define QEDR_MSG_CQ
#define QEDR_MSG_MR
#define QEDR_MSG_RQ
#define QEDR_MSG_SQ
#define QEDR_MSG_QP
#define QEDR_MSG_SRQ
#define QEDR_MSG_GSI
#define QEDR_MSG_IWARP

#define QEDR_CQ_MAGIC_NUMBER

#define FW_PAGE_SIZE
#define FW_PAGE_SHIFT

struct qedr_dev;

struct qedr_cnq {};

#define QEDR_MAX_SGID

struct qedr_device_attr {};

#define QEDR_ENET_STATE_BIT

struct qedr_dev {};

#define QEDR_MAX_SQ_PBL
#define QEDR_MAX_SQ_PBL_ENTRIES
#define QEDR_SQE_ELEMENT_SIZE
#define QEDR_MAX_SQE_ELEMENTS_PER_SQE
#define QEDR_MAX_SQE_ELEMENTS_PER_PAGE
#define QEDR_MAX_SQE
/* RQ */
#define QEDR_MAX_RQ_PBL
#define QEDR_MAX_RQ_PBL_ENTRIES
#define QEDR_RQE_ELEMENT_SIZE
#define QEDR_MAX_RQE_ELEMENTS_PER_RQE
#define QEDR_MAX_RQE_ELEMENTS_PER_PAGE
#define QEDR_MAX_RQE

#define QEDR_CQE_SIZE
#define QEDR_MAX_CQE_PBL_SIZE
#define QEDR_MAX_CQE_PBL_ENTRIES
#define QEDR_MAX_CQES

#define QEDR_ROCE_MAX_CNQ_SIZE

#define QEDR_MAX_PORT
#define QEDR_PORT

#define QEDR_UVERBS(CMD_NAME)

#define QEDR_ROCE_PKEY_MAX
#define QEDR_ROCE_PKEY_TABLE_LEN
#define QEDR_ROCE_PKEY_DEFAULT

struct qedr_pbl {};

struct qedr_ucontext {};

db_prod32;

db_prod64;

enum qedr_cq_type {};

struct qedr_pbl_info {};

struct qedr_userq {};

struct qedr_cq {};

struct qedr_pd {};

struct qedr_xrcd {};

struct qedr_qp_hwq_info {};

#define QEDR_INC_SW_IDX(p_info, index)

struct qedr_srq_hwq_info {};

struct qedr_srq {};

enum qedr_qp_err_bitmap {};

enum qedr_qp_create_type {};

enum qedr_iwarp_cm_flags {};

struct qedr_qp {};

struct qedr_ah {};

enum qedr_mr_type {};

struct mr_info {};

struct qedr_mr {};

struct qedr_user_mmap_entry {};

#define SET_FIELD2(value, name, flag)

#define QEDR_RESP_IMM
#define QEDR_RESP_RDMA
#define QEDR_RESP_INV

static inline void qedr_inc_sw_cons(struct qedr_qp_hwq_info *info)
{}

static inline void qedr_inc_sw_prod(struct qedr_qp_hwq_info *info)
{}

static inline int qedr_get_dmac(struct qedr_dev *dev,
				struct rdma_ah_attr *ah_attr, u8 *mac_addr)
{}

struct qedr_iw_listener {};

struct qedr_iw_ep {};

static inline
struct qedr_ucontext *get_qedr_ucontext(struct ib_ucontext *ibucontext)
{}

static inline struct qedr_dev *get_qedr_dev(struct ib_device *ibdev)
{}

static inline struct qedr_pd *get_qedr_pd(struct ib_pd *ibpd)
{}

static inline struct qedr_xrcd *get_qedr_xrcd(struct ib_xrcd *ibxrcd)
{}

static inline struct qedr_cq *get_qedr_cq(struct ib_cq *ibcq)
{}

static inline struct qedr_qp *get_qedr_qp(struct ib_qp *ibqp)
{}

static inline struct qedr_ah *get_qedr_ah(struct ib_ah *ibah)
{}

static inline struct qedr_mr *get_qedr_mr(struct ib_mr *ibmr)
{}

static inline struct qedr_srq *get_qedr_srq(struct ib_srq *ibsrq)
{}

static inline bool qedr_qp_has_srq(struct qedr_qp *qp)
{}

static inline bool qedr_qp_has_sq(struct qedr_qp *qp)
{}

static inline bool qedr_qp_has_rq(struct qedr_qp *qp)
{}

static inline struct qedr_user_mmap_entry *
get_qedr_mmap_entry(struct rdma_user_mmap_entry *rdma_entry)
{}
#endif