linux/drivers/infiniband/hw/qib/qib_mad.h

/*
 * Copyright (c) 2012 Intel Corporation.  All rights reserved.
 * Copyright (c) 2006 - 2012 QLogic Corporation. All rights reserved.
 * Copyright (c) 2005, 2006 PathScale, Inc. 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 _QIB_MAD_H
#define _QIB_MAD_H

#include <rdma/ib_pma.h>

#define IB_SMP_UNSUP_VERSION

#define IB_SMP_UNSUP_METHOD

#define IB_SMP_UNSUP_METH_ATTR

#define IB_SMP_INVALID_FIELD

#define IB_VLARB_LOWPRI_0_31
#define IB_VLARB_LOWPRI_32_63
#define IB_VLARB_HIGHPRI_0_31
#define IB_VLARB_HIGHPRI_32_63

#define IB_PMA_PORT_COUNTERS_CONG

struct ib_pma_portcounters_cong {} __packed;

#define IB_PMA_CONG_HW_CONTROL_TIMER
#define IB_PMA_CONG_HW_CONTROL_SAMPLE

#define QIB_XMIT_RATE_UNSUPPORTED
#define QIB_XMIT_RATE_PICO
/* number of 4nsec cycles equaling 2secs */
#define QIB_CONG_TIMER_PSINTERVAL

#define IB_PMA_SEL_CONG_ALL
#define IB_PMA_SEL_CONG_PORT_DATA
#define IB_PMA_SEL_CONG_XMIT
#define IB_PMA_SEL_CONG_ROUTING

/*
 * Congestion control class attributes
 */
#define IB_CC_ATTR_CLASSPORTINFO
#define IB_CC_ATTR_NOTICE
#define IB_CC_ATTR_CONGESTION_INFO
#define IB_CC_ATTR_CONGESTION_KEY_INFO
#define IB_CC_ATTR_CONGESTION_LOG
#define IB_CC_ATTR_SWITCH_CONGESTION_SETTING
#define IB_CC_ATTR_SWITCH_PORT_CONGESTION_SETTING
#define IB_CC_ATTR_CA_CONGESTION_SETTING
#define IB_CC_ATTR_CONGESTION_CONTROL_TABLE
#define IB_CC_ATTR_TIME_STAMP

/* generalizations for threshold values */
#define IB_CC_THRESHOLD_NONE
#define IB_CC_THRESHOLD_MIN
#define IB_CC_THRESHOLD_MAX

/* CCA MAD header constants */
#define IB_CC_MAD_LOGDATA_LEN
#define IB_CC_MAD_MGMTDATA_LEN

struct ib_cc_mad {} __packed;

/*
 * Congestion Control class portinfo capability mask bits
 */
#define IB_CC_CPI_CM_TRAP_GEN
#define IB_CC_CPI_CM_GET_SET_NOTICE
#define IB_CC_CPI_CM_CAP2
#define IB_CC_CPI_CM_ENHANCEDPORT0_CC

struct ib_cc_classportinfo_attr {} __packed;

/* Congestion control traps */
#define IB_CC_TRAP_KEY_VIOLATION

struct ib_cc_trap_key_violation_attr {} __packed;

/* Congestion info flags */
#define IB_CC_CI_FLAGS_CREDIT_STARVATION
#define IB_CC_TABLE_CAP_DEFAULT

struct ib_cc_info_attr {} __packed;

struct ib_cc_key_info_attr {} __packed;

#define IB_CC_CL_CA_LOGEVENTS_LEN

struct ib_cc_log_attr {} __packed;

#define IB_CC_CLEC_SERVICETYPE_RC
#define IB_CC_CLEC_SERVICETYPE_UC
#define IB_CC_CLEC_SERVICETYPE_RD
#define IB_CC_CLEC_SERVICETYPE_UD

struct ib_cc_log_event {} __packed;

/* Sixteen congestion entries */
#define IB_CC_CCS_ENTRIES

/* Port control flags */
#define IB_CC_CCS_PC_SL_BASED

struct ib_cc_congestion_entry {} __packed;

struct ib_cc_congestion_entry_shadow {} __packed;

struct ib_cc_congestion_setting_attr {} __packed;

struct ib_cc_congestion_setting_attr_shadow {} __packed;

#define IB_CC_TABLE_ENTRY_INCREASE_DEFAULT
#define IB_CC_TABLE_ENTRY_TIMER_DEFAULT

/* 64 Congestion Control table entries in a single MAD */
#define IB_CCT_ENTRIES
#define IB_CCT_MIN_ENTRIES

struct ib_cc_table_entry {};

struct ib_cc_table_entry_shadow {};

struct ib_cc_table_attr {} __packed;

struct ib_cc_table_attr_shadow {} __packed;

#define CC_TABLE_SHADOW_MAX

struct cc_table_shadow {} __packed;

/*
 * The PortSamplesControl.CounterMasks field is an array of 3 bit fields
 * which specify the N'th counter's capabilities. See ch. 16.1.3.2.
 * We support 5 counters which only count the mandatory quantities.
 */
#define COUNTER_MASK(q, n)
#define COUNTER_MASK0_9

#endif				/* _QIB_MAD_H */