sm_attr.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_IB_MGT_SM_ATTR_H
#define _SYS_IB_MGT_SM_ATTR_H
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* This file contains the definitions of the various attributes specified
* in IB spec volume 1, release 1.1, chapter 14.
*/
#ifdef __cplusplus
extern "C" {
#endif
/*
* LID routed smp class header
*/
typedef struct sm_lid_class_hdr_s {
/*
* Directed route smp mad header
*/
typedef struct sm_dr_mad_hdr_s {
/* Common MAD Header1: 4 bytes, bytes 0-3 of header */
/* perform based on mgmtclass */
/* Common MAD Header2: 16 bytes, bytes 8-23 of header */
/* Direction bit */
#define SM_DR_SMP_STATUS_MASK 0x7FFF
/*
* Direct route smp class header:
*/
typedef struct sm_dr_class_hdr_s {
typedef struct sm_dr_data_s {
} sm_dr_data_t;
/* Traps: Table 118 */
#define SM_GID_IN_SERVICE_TRAP 64
#define SM_GID_OUT_OF_SERVICE_TRAP 65
#define SM_MGID_CREATED_TRAP 66
#define SM_MGID_DESTROYED_TRAP 67
#define SM_LINK_STATE_CHANGED_TRAP 128
#define SM_LINK_INTEGRITY_THRESHOLD_TRAP 129
#define SM_BUFFER_OVERRUN_THRESHOLD_TRAP 130
#define SM_WATCHDOG_TIMER_EXPIRED_TRAP 131
#define SM_CAP_MASK_CHANGED_TRAP 144
#define SM_SYS_IMG_GUID_CHANGED_TRAP 145
#define SM_BAD_MKEY_TRAP 256
#define SM_BAD_PKEY_TRAP 257
#define SM_BAD_QKEY_TRAP 258
#define SM_BAD_SWITCH_PKEY_TRAP 259
/*
* Notice Data details for various sm traps
*/
/* Traps 64, 65, 66,and 67: Table 119 */
typedef struct sm_trap_64_s {
} sm_trap_64_t;
typedef sm_trap_64_t sm_trap_65_t;
typedef sm_trap_64_t sm_trap_66_t;
typedef sm_trap_64_t sm_trap_67_t;
/* Trap 128: Table 120 */
typedef struct sm_trap_128_s {
/* Traps 129, 130, and 131: Table 121 */
typedef struct sm_trap_129_s {
typedef sm_trap_129_t sm_trap_130_t;
typedef sm_trap_129_t sm_trap_131_t;
/* Trap 144: Table 122 */
typedef struct sm_trap_144_s {
/* Trap 145: Table 123 */
typedef struct sm_trap_145_s {
/* Trap 256: Table 124 */
#if defined(_BIT_FIELDS_HTOL)
typedef struct sm_trap_256_s {
#elif defined(_BIT_FIELDS_LTOH)
typedef struct sm_trap_256_s {
#else
#endif /* _BIT_FIELDS_HTOL */
/* Traps 257 and 258: Table 125 */
#if defined(_BIT_FIELDS_HTOL)
typedef struct sm_trap_257_s {
#elif defined(_BIT_FIELDS_LTOH)
typedef struct sm_trap_257_s {
#else
#endif /* _BIT_FIELDS_HTOL */
typedef sm_trap_257_t sm_trap_258_t;
/* Trap 259: Table 126 */
#if defined(_BIT_FIELDS_HTOL)
typedef struct sm_trap_259_s {
#elif defined(_BIT_FIELDS_LTOH)
typedef struct sm_trap_259_s {
#else
#endif /* _BIT_FIELDS_HTOL */
/*
* NodeDescription: Table 127
* NodeDescription is applicable to all ports of a node.
*/
typedef struct sm_nodedesc_s {
/*
* NodeInfo: Table 128
* The value of some NodeInfo components varies by port within a node.
*/
#if defined(_BIT_FIELDS_HTOL)
typedef struct sm_nodeinfo_s {
/* with nodes controlled by */
/* common supervisory code */
#elif defined(_BIT_FIELDS_LTOH)
typedef struct sm_nodeinfo_s {
/* with nodes controlled by */
/* common supervisory code */
#else
#endif /* _BIT_FIELDS_HTOL */
/* Defines and Masks that go with NodeInfo */
#define SM_NODE_TYPE_CA 0x01
#define SM_NODE_TYPE_SWITCH 0x02
#define SM_NODE_TYPE_ROUTER 0x03
/* SwitchInfo: Table 129 */
#if defined(_BIT_FIELDS_HTOL)
typedef struct sm_switchinfo_s {
/* not in FDB */
/* pkts from def port */
/* have DLID not in FDB */
#elif defined(_BIT_FIELDS_LTOH)
typedef struct sm_switchinfo_s {
/* not in FDB */
/* pkts from def port */
/* have DLID not in FDB */
#else
#endif /* _BIT_FIELDS_HTOL */
/* Defines and Masks that go with SwitchInfo */
#define SM_PORT_STATE_CHANGE_CLEAR 0x1
#define SM_SWITCH_PART_ENF_IN 0x8
#define SM_SWITCH_PART_ENF_IN_MASK 0x8
#define SM_SWITCH_PART_ENF_OUT 0x4
#define SM_SWITCH_PART_ENF_OUT_MASK 0x4
#define SM_SWITCH_FILTER_RAW_IN 0x2
#define SM_SWITCH_FILTER_RAW_IN_MASK 0x2
#define SM_SWITCH_FILTER_RAW_OUT 0x1
#define SM_SWITCH_FILTER_RAW_OUT_MASK 0x1
/* GUIDInfo: Table 130 */
typedef struct sm_guidinfo_s {
/* defines that go with guid info */
#define SM_GUIDINFO_BLOCK_MAX 31
/*
* PortInfo: Table 132
* PortInfo is applicable to all ports of a node.
*/
#if defined(_BIT_FIELDS_HTOL)
typedef struct sm_portinfo_s {
/* VL arbitration table */
#elif defined(_BIT_FIELDS_LTOH)
typedef struct sm_portinfo_s {
/* VL arbitration table */
#else
#endif /* _BIT_FIELDS_HTOL */
/* Defines and Masks that go with PortInfo */
#define SM_CAP_MASK_IS_SM 0x00000002
#define SM_CAP_MASK_IS_NOTICE_SUPPD 0x00000004
#define SM_CAP_MASK_IS_TRAP_SUPPD 0x00000008
#define SM_CAP_MASK_IS_RESET_SUPPD 0x00000010
#define SM_CAP_MASK_IS_APM_SUPPD 0x00000020
#define SM_CAP_MASK_IS_SLMAPP_SUPPD 0x00000040
#define SM_CAP_MASK_IS_NVRAM_MKEY 0x00000080
#define SM_CAP_MASK_IS_NVRAM_PKEY 0x00000100
#define SM_CAP_MASK_IS_LEDINFO_SUPPD 0x00000200
#define SM_CAP_MASK_IS_SM_DISABLED 0x00000400
#define SM_CAP_MASK_IS_SYSIMG_GUID_DISABLED 0x00000800
#define SM_CAP_MASK_IS_PKEY_SW_TRAP_DISABLED 0x00001000
#define SM_CAP_MASK_IS_CM_SUPPD 0x00010000
#define SM_CAP_MASK_IS_SNMP_SUPPD 0x00020000
#define SM_CAP_MASK_IS_DM_SUPPD 0x00080000
#define SM_CAP_MASK_IS_VM_SUPPD 0x00100000
#define SM_CAP_MASK_IS_DR_NOTICE_SUPPD 0x00200000
#define SM_CAP_MASK_IS_CAP_MASK_NOTICE_SUPPD 0x00400000
#define SM_CAP_MASK_IS_BOOT_MGMT_SUPPD 0x00800000
/* Standard Encoding of DiagCode Bits 3-0: Table 133 */
#define SM_DIAG_CODE_PORT_READY 0x0
#define SM_DIAG_CODE_PERFORMING_SELF_TEST 0x1
#define SM_DIAG_CODE_INITIALIZING 0x2
#define SM_DIAG_CODE_SOFT_ERROR 0x3
#define SM_DIAG_CODE_HARD_ERROR 0x4
#define SM_LINK_WIDTH_ENABLED_NOP 0x00
#define SM_LINK_WIDTH_ENABLED_1X 0x01
#define SM_LINK_WIDTH_ENABLED_4X 0x02
#define SM_LINK_WIDTH_ENABLED_1X_4X 0x03
#define SM_LINK_WIDTH_ENABLED_12X 0x08
#define SM_LINK_WIDTH_ENABLED_1X_12X 0x09
#define SM_LINK_WIDTH_ENABLED_4X_12X 0x0A
#define SM_LINK_WIDTH_ENABLED_1X_4X_12X 0x0B
#define SM_LINK_WIDTH_ENABLED_SUPPORTED 0xFF
#define SM_LINK_WIDTH_SUPP_1X 0x01
#define SM_LINK_WIDTH_SUPP_1X_4X 0x03
#define SM_LINK_WIDTH_SUPP_1X_4X_12X 0x0B
#define SM_LINK_WIDTH_ACTIVE_1X 0x01
#define SM_LINK_WIDTH_ACTIVE_4X 0x02
#define SM_LINK_WIDTH_ACTIVE_12X 0x08
#define SM_LINK_SPEED_SUPP_2_5_GBPS 0x1
#define SM_PORT_STATE_NOP 0x0
#define SM_PORT_STATE_DOWN 0x1
#define SM_PORT_STATE_INITIALIZE 0x2
#define SM_PORT_STATE_ARMED 0x3
#define SM_PORT_STATE_ACTIVE 0x4
#define SM_PORT_PHYS_STATE_NOP 0x0
#define SM_PORT_PHYS_STATE_SLEEP 0x1
#define SM_PORT_PHYS_STATE_POLLING 0x2
#define SM_PORT_PHYS_STATE_DISABLED 0x3
#define SM_PORT_PHYS_STATE_TRAINING 0x4
#define SM_PORT_PHYS_STATE_LINK_UP 0x5
#define SM_PORT_PHYS_STATE_LINK_REC 0x6
#define SM_LINK_DOWN_DEFAULT_NOP 0x0
#define SM_LINK_DOWN_DEFAULT_SLEEP 0x1
#define SM_LINK_DOWN_DEFAULT_POLLING 0x2
/* MKey Protection Levels: Table 115 */
#define SM_MKEY_PROT_BITS_ALL_SUCCEED 0x0
#define SM_MKEY_PROT_BITS_GETRESP_RESETS 0x1
#define SM_MKEY_PROT_BITS_SET_FAIL 0x2
#define SM_MKEY_PROT_BITS_SET_FAILX 0x3
#define SM_LINK_SPEED_ACTIVE_2_5_GBPS 0x1
#define SM_LINK_SPEED_ENABLED_NOP 0x0
#define SM_LINK_SPEED_ENABLED_2_5_GBPS 0x1
#define SM_LINK_SPEED_ENABLED_SUPP_VALUE 0xF
#define SM_NEIGHBOR_MTU_256 0x1
#define SM_NEIGHBOR_MTU_512 0x2
#define SM_NEIGHBOR_MTU_1024 0x3
#define SM_NEIGHBOR_MTU_2048 0x4
#define SM_NEIGHBOR_MTU_4096 0x5
#define SM_VL_CAP_VL0 0x1
#define SM_VL_CAP_VL0_VL1 0x2
#define SM_VL_CAP_VL0_VL3 0x3
#define SM_VL_CAP_VL0_VL7 0x4
#define SM_VL_CAP_VL0_VL14 0x5
#define SM_INIT_TYPE_NO_LOAD 0x1
#define SM_INIT_TYPE_PRESERVE_CONTENT 0x2
#define SM_INIT_TYPE_PRESERVE_PRESENCE 0x4
#define SM_INIT_TYPE_DO_NOT_RESUSCITATE 0x8
#define SM_INIT_TYPE_REPLY_NO_LOAD_REPLY 0x1
#define SM_INIT_TYPE_PRESERVE_CONTENT_REPLY 0x2
#define SM_INIT_TYPE_PRESERVE_PRESENCE_REPLY 0x4
#define SM_MTU_CAP_256 0x1
#define SM_MTU_CAP_512 0x2
#define SM_MTU_CAP_1024 0x3
#define SM_MTU_CAP_2048 0x4
#define SM_MTU_CAP_4096 0x5
#define SM_OPERATIONAL_VLS_NOP 0x0
#define SM_OPERATIONAL_VLS_VL0 0x1
#define SM_OPERATIONAL_VLS_VL0_VL1 0x2
#define SM_OPERATIONAL_VLS_VL0_VL3 0x3
#define SM_OPERATIONAL_VLS_VL0_VL7 0x4
#define SM_OPERATIONAL_VLS_VLO_VL14 0x5
#define SM_PART_ENF_IN_BOUND 0x8
#define SM_PART_ENF_OUT_BOUND 0x4
#define SM_FILTER_RAW_IN_BOUND 0x2
#define SM_FILTER_RAW_OUT_BOUND 0x1
/* P_Key Table: Table 134 */
typedef struct sm_pkey_table_s {
/* P_Key Block Element: Table 135 */
#if defined(_BIT_FIELDS_HTOL)
typedef struct sm_pkey_block_element_s {
#elif defined(_BIT_FIELDS_LTOH)
typedef struct sm_pkey_block_element_s {
#else
#endif /* _BIT_FIELDS_HTOL */
/*
* SLtoVLMapping Table: Table 136
* Each field specifies the VL onto which packets using that SL are dropped.
*/
#if defined(_BIT_FIELDS_HTOL)
typedef struct sm_SLtoVL_mapping_table_s {
#elif defined(_BIT_FIELDS_LTOH)
typedef struct sm_SLtoVL_mapping_table_s {
#else
#endif /* _BIT_FIELDS_HTOL */
typedef struct sm_VL_weight_block_s {
/* VLArbitration Table: Table 137 */
typedef struct sm_VLarb_table_s {
/* Defines and masks that go with VLArbitrationTable & address modifier */
#define SM_LOW_PRI_VL_ARB_LOWER_32 0x1
#define SM_LOW_PRI_VL_ARB_UPPER_32 0x2
#define SM_HI_PRI_VL_ARB_LOWER_32 0x3
#define SM_HI_PRI_VL_ARB_UPPER_32 0x4
/* Defines that go with the linear forwarding table */
#define SM_LFT_BLOCK_MAX 767
#define SM_LFT_PORTS_PER_BLOCK 64
/* Linear Forwarding Table: Table 139 */
typedef struct sm_linear_forwarding_table_s {
#if defined(_BIT_FIELDS_HTOL)
typedef struct sm_lid_port_block_s {
#elif defined(_BIT_FIELDS_LTOH)
typedef struct sm_lid_port_block_s {
#else
#endif /* _BIT_FIELDS_HTOL */
/* Random Forwarding Table: Table 141 */
typedef struct sm_random_forwarding_table_s {
/* Multicast Forwarding Table: Table 143 */
typedef struct sm_multicast_forwarding_table_s {
/*
* SMInfo: Table 145
* SMInfo struct is applicable to all end ports hosting an SM
*/
#if defined(_BIT_FIELDS_HTOL)
typedef struct sm_sminfo_s {
} sm_sminfo_t;
#elif defined(_BIT_FIELDS_LTOH)
typedef struct sm_sminfo_s {
} sm_sminfo_t;
#else
#endif /* _BIT_FIELDS_HTOL */
/* defines that go with the sminfo structure */
/* SMState Defines */
#define SM_SMSTATE_INACTIVE 0
#define SM_SMSTATE_DISCOVERING 1
#define SM_SMSTATE_STANDBY 2
#define SM_SMSTATE_MASTER 3
/* SMInfo Control Packets: Table 148 */
#define SM_SMINFO_AM_HANDOVER 1
#define SM_SMINFO_AM_ACKNOWLEDGE 2
#define SM_SMINFO_AM_DISABLE 3
#define SM_SMINFO_AM_STANDBY 4
#define SM_SMINFO_AM_DISCOVER 5
/* attribute ID defines */
#define SM_NOTICE_ATTRID 0x02
#define SM_NODEDESC_ATTRID 0x10
#define SM_NODEINFO_ATTRID 0x11
#define SM_SWITCHINFO_ATTRID 0x12
#define SM_GUIDINFO_ATTRID 0x14
#define SM_PORTINFO_ATTRID 0x15
#define SM_PKEY_TABLE_ATTRID 0x16
#define SM_SLTOVLTABLE_ATTRID 0x17
#define SM_VLARBITRATION_ATTRID 0x18
#define SM_LINEARFDB_ATTRID 0x19
#define SM_RANDOMFDB_ATTRID 0x1A
#define SM_MCASTFDB_ATTRID 0x1B
#define SM_SMINFO_ATTRID 0x20
#define SM_VENDORDIAG_ATTRID 0x30
#define SM_LEDINFO_ATTRID 0x31
/* VendorDiag: Table 146 */
typedef struct sm_vendor_diag_s {
/* LedInfo: Table 147 */
#if defined(_BIT_FIELDS_HTOL)
typedef struct sm_ledinfo_s {
} sm_ledinfo_t;
#elif defined(_BIT_FIELDS_LTOH)
typedef struct sm_ledinfo_s {
} sm_ledinfo_t;
#else
#endif /* _BIT_FIELDS_HTOL */
/* LED Info Defines */
#define SM_LEDINFO_ON 0x1
#define SM_LEDINFO_OFF 0x0
#ifdef __cplusplus
}
#endif
#endif /* _SYS_IB_MGT_SM_ATTR_H */