linux/drivers/infiniband/hw/bnxt_re/bnxt_re.h

/*
 * Broadcom NetXtreme-E RoCE driver.
 *
 * Copyright (c) 2016 - 2017, Broadcom. All rights reserved.  The term
 * Broadcom refers to Broadcom Limited and/or its subsidiaries.
 *
 * 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
 * BSD license below:
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. 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.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS''
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
 * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * Description: Slow Path Operators (header)
 *
 */

#ifndef __BNXT_RE_H__
#define __BNXT_RE_H__
#include <rdma/uverbs_ioctl.h>
#include "hw_counters.h"
#include <linux/hashtable.h>
#define ROCE_DRV_MODULE_NAME

#define BNXT_RE_DESC

#define BNXT_RE_PAGE_SHIFT_1G
#define BNXT_RE_PAGE_SIZE_SUPPORTED

#define BNXT_RE_MAX_MR_SIZE_LOW
#define BNXT_RE_MAX_MR_SIZE_HIGH
#define BNXT_RE_MAX_MR_SIZE

#define BNXT_RE_MAX_QPC_COUNT
#define BNXT_RE_MAX_MRW_COUNT
#define BNXT_RE_MAX_SRQC_COUNT
#define BNXT_RE_MAX_CQ_COUNT
#define BNXT_RE_MAX_MRW_COUNT_64K
#define BNXT_RE_MAX_MRW_COUNT_256K

/* Number of MRs to reserve for PF, leaving remainder for VFs */
#define BNXT_RE_RESVD_MR_FOR_PF
#define BNXT_RE_MAX_GID_PER_VF

/*
 * Percentage of resources of each type reserved for PF.
 * Remaining resources are divided equally among VFs.
 * [0, 100]
 */
#define BNXT_RE_PCT_RSVD_FOR_PF

#define BNXT_RE_UD_QP_HW_STALL

#define BNXT_RE_RQ_WQE_THRESHOLD

/*
 * Setting the default ack delay value to 16, which means
 * the default timeout is approx. 260ms(4 usec * 2 ^(timeout))
 */

#define BNXT_RE_DEFAULT_ACK_DELAY

struct bnxt_re_ring_attr {};

struct bnxt_re_sqp_entries {};

#define BNXT_RE_MAX_GSI_SQP_ENTRIES
struct bnxt_re_gsi_context {};

#define BNXT_RE_AEQ_IDX
#define BNXT_RE_NQ_IDX
#define BNXT_RE_GEN_P5_MAX_VF

struct bnxt_re_pacing {};

#define BNXT_RE_MAX_DBR_DO_PACING
#define BNXT_RE_DBR_PACING_TIME
#define BNXT_RE_PACING_ALGO_THRESHOLD
#define BNXT_RE_PACING_ALARM_TH_MULTIPLE
/* Default do_pacing value when there is no congestion */
#define BNXT_RE_DBR_DO_PACING_NO_CONGESTION

#define BNXT_RE_MAX_FIFO_DEPTH_P5
#define BNXT_RE_MAX_FIFO_DEPTH_P7

#define BNXT_RE_MAX_FIFO_DEPTH(ctx)

#define BNXT_RE_GRC_FIFO_REG_BASE

#define MAX_CQ_HASH_BITS
struct bnxt_re_dev {};

#define to_bnxt_re_dev(ptr, member)

#define BNXT_RE_ROCE_V1_PACKET
#define BNXT_RE_ROCEV2_IPV4_PACKET
#define BNXT_RE_ROCEV2_IPV6_PACKET

#define BNXT_RE_CHECK_RC(x)
void bnxt_re_pacing_alert(struct bnxt_re_dev *rdev);

static inline struct device *rdev_to_dev(struct bnxt_re_dev *rdev)
{}

extern const struct uapi_definition bnxt_re_uapi_defs[];
#endif