17c478bd9Sstevel@tonic-gate /* 27c478bd9Sstevel@tonic-gate * CDDL HEADER START 37c478bd9Sstevel@tonic-gate * 47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 550949b65Sagiri * Common Development and Distribution License (the "License"). 650949b65Sagiri * You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate * 87c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate * and limitations under the License. 127c478bd9Sstevel@tonic-gate * 137c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate * 197c478bd9Sstevel@tonic-gate * CDDL HEADER END 207c478bd9Sstevel@tonic-gate */ 217c478bd9Sstevel@tonic-gate /* 22*76c04273SRajkumar Sivaprakasam * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 237c478bd9Sstevel@tonic-gate * Use is subject to license terms. 247c478bd9Sstevel@tonic-gate */ 257c478bd9Sstevel@tonic-gate 267c478bd9Sstevel@tonic-gate #ifndef _SYS_IB_MGT_SM_ATTR_H 277c478bd9Sstevel@tonic-gate #define _SYS_IB_MGT_SM_ATTR_H 287c478bd9Sstevel@tonic-gate 297c478bd9Sstevel@tonic-gate /* 307c478bd9Sstevel@tonic-gate * This file contains the definitions of the various attributes specified 317c478bd9Sstevel@tonic-gate * in IB spec volume 1, release 1.1, chapter 14. 327c478bd9Sstevel@tonic-gate */ 337c478bd9Sstevel@tonic-gate 347c478bd9Sstevel@tonic-gate #ifdef __cplusplus 357c478bd9Sstevel@tonic-gate extern "C" { 367c478bd9Sstevel@tonic-gate #endif 377c478bd9Sstevel@tonic-gate 387c478bd9Sstevel@tonic-gate #include <sys/ib/ib_types.h> 397c478bd9Sstevel@tonic-gate #include <sys/ib/mgt/ib_mad.h> 407c478bd9Sstevel@tonic-gate 417c478bd9Sstevel@tonic-gate #define SM_MAX_DR_PATH 64 /* max ports in a DR path */ 427c478bd9Sstevel@tonic-gate 437c478bd9Sstevel@tonic-gate /* 447c478bd9Sstevel@tonic-gate * LID routed smp class header 457c478bd9Sstevel@tonic-gate */ 467c478bd9Sstevel@tonic-gate typedef struct sm_lid_class_hdr_s { 477c478bd9Sstevel@tonic-gate uint64_t M_Key; 487c478bd9Sstevel@tonic-gate uint8_t Reserved[32]; 497c478bd9Sstevel@tonic-gate } sm_lid_class_hdr_t; 507c478bd9Sstevel@tonic-gate 517c478bd9Sstevel@tonic-gate /* 527c478bd9Sstevel@tonic-gate * Directed route smp mad header 537c478bd9Sstevel@tonic-gate */ 547c478bd9Sstevel@tonic-gate typedef struct sm_dr_mad_hdr_s { 557c478bd9Sstevel@tonic-gate /* Common MAD Header1: 4 bytes, bytes 0-3 of header */ 567c478bd9Sstevel@tonic-gate uint8_t BaseVersion; /* version of MAD base format */ 577c478bd9Sstevel@tonic-gate uint8_t MgmtClass; /* class of operation */ 587c478bd9Sstevel@tonic-gate uint8_t ClassVersion; /* version of MAD class format */ 597c478bd9Sstevel@tonic-gate uint8_t R_Method; /* response bit & method to */ 607c478bd9Sstevel@tonic-gate /* perform based on mgmtclass */ 617c478bd9Sstevel@tonic-gate 627c478bd9Sstevel@tonic-gate uint16_t D_Status; /* direction, status unused */ 637c478bd9Sstevel@tonic-gate uint8_t HopPointer; /* index into Initial/Return Paths */ 647c478bd9Sstevel@tonic-gate uint8_t HopCount; /* number of directed route hops */ 657c478bd9Sstevel@tonic-gate 667c478bd9Sstevel@tonic-gate 677c478bd9Sstevel@tonic-gate /* Common MAD Header2: 16 bytes, bytes 8-23 of header */ 687c478bd9Sstevel@tonic-gate uint64_t TransactionID; /* transaction id */ 697c478bd9Sstevel@tonic-gate uint16_t AttributeID; /* defines class spec. objects */ 707c478bd9Sstevel@tonic-gate uint16_t Reserved; 717c478bd9Sstevel@tonic-gate uint32_t AttributeModifier; /* further scope to attributes */ 727c478bd9Sstevel@tonic-gate } sm_dr_mad_hdr_t; 737c478bd9Sstevel@tonic-gate 747c478bd9Sstevel@tonic-gate /* Direction bit */ 757c478bd9Sstevel@tonic-gate #define SM_DR_SMP_D_OUT 0x0000 /* SMP is outbound from SM */ 767c478bd9Sstevel@tonic-gate #define SM_DR_SMP_D_IN 0x8000 /* SMP is inbound to SM */ 777c478bd9Sstevel@tonic-gate #define SM_DR_SMP_D_MASK 0x8000 /* direction mask */ 787c478bd9Sstevel@tonic-gate 797c478bd9Sstevel@tonic-gate #define SM_DR_SMP_STATUS_MASK 0x7FFF 807c478bd9Sstevel@tonic-gate 817c478bd9Sstevel@tonic-gate /* 827c478bd9Sstevel@tonic-gate * Direct route smp class header: 837c478bd9Sstevel@tonic-gate */ 847c478bd9Sstevel@tonic-gate typedef struct sm_dr_class_hdr_s { 857c478bd9Sstevel@tonic-gate uint64_t M_Key; 867c478bd9Sstevel@tonic-gate ib_lid_t DrSLID; 877c478bd9Sstevel@tonic-gate ib_lid_t DrDLID; 887c478bd9Sstevel@tonic-gate uint8_t Reserved[28]; 897c478bd9Sstevel@tonic-gate } sm_dr_class_hdr_t; 907c478bd9Sstevel@tonic-gate 917c478bd9Sstevel@tonic-gate typedef struct sm_dr_data_s { 927c478bd9Sstevel@tonic-gate uint8_t Data[64]; 937c478bd9Sstevel@tonic-gate uint8_t InitialPath[SM_MAX_DR_PATH]; 947c478bd9Sstevel@tonic-gate uint8_t ReturnPath[SM_MAX_DR_PATH]; 957c478bd9Sstevel@tonic-gate } sm_dr_data_t; 967c478bd9Sstevel@tonic-gate 977c478bd9Sstevel@tonic-gate /* Traps: Table 118 */ 987c478bd9Sstevel@tonic-gate #define SM_GID_IN_SERVICE_TRAP 64 997c478bd9Sstevel@tonic-gate #define SM_GID_OUT_OF_SERVICE_TRAP 65 1007c478bd9Sstevel@tonic-gate #define SM_MGID_CREATED_TRAP 66 1017c478bd9Sstevel@tonic-gate #define SM_MGID_DESTROYED_TRAP 67 1027c478bd9Sstevel@tonic-gate #define SM_LINK_STATE_CHANGED_TRAP 128 1037c478bd9Sstevel@tonic-gate #define SM_LINK_INTEGRITY_THRESHOLD_TRAP 129 1047c478bd9Sstevel@tonic-gate #define SM_BUFFER_OVERRUN_THRESHOLD_TRAP 130 1057c478bd9Sstevel@tonic-gate #define SM_WATCHDOG_TIMER_EXPIRED_TRAP 131 1067c478bd9Sstevel@tonic-gate #define SM_CAP_MASK_CHANGED_TRAP 144 1077c478bd9Sstevel@tonic-gate #define SM_SYS_IMG_GUID_CHANGED_TRAP 145 1087c478bd9Sstevel@tonic-gate #define SM_BAD_MKEY_TRAP 256 1097c478bd9Sstevel@tonic-gate #define SM_BAD_PKEY_TRAP 257 1107c478bd9Sstevel@tonic-gate #define SM_BAD_QKEY_TRAP 258 1117c478bd9Sstevel@tonic-gate #define SM_BAD_SWITCH_PKEY_TRAP 259 1127c478bd9Sstevel@tonic-gate 1137c478bd9Sstevel@tonic-gate /* 1147c478bd9Sstevel@tonic-gate * Notice Data details for various sm traps 1157c478bd9Sstevel@tonic-gate */ 1167c478bd9Sstevel@tonic-gate /* Traps 64, 65, 66,and 67: Table 119 */ 1177c478bd9Sstevel@tonic-gate typedef struct sm_trap_64_s { 1187c478bd9Sstevel@tonic-gate uint8_t Reserved[6]; 1197c478bd9Sstevel@tonic-gate ib_gid_t GIDADDR; /* global identifier */ 1207c478bd9Sstevel@tonic-gate uint8_t Padding[32]; 1217c478bd9Sstevel@tonic-gate } sm_trap_64_t; 1227c478bd9Sstevel@tonic-gate 1237c478bd9Sstevel@tonic-gate typedef sm_trap_64_t sm_trap_65_t; 1247c478bd9Sstevel@tonic-gate typedef sm_trap_64_t sm_trap_66_t; 1257c478bd9Sstevel@tonic-gate typedef sm_trap_64_t sm_trap_67_t; 1267c478bd9Sstevel@tonic-gate 1277c478bd9Sstevel@tonic-gate /* Trap 128: Table 120 */ 1287c478bd9Sstevel@tonic-gate typedef struct sm_trap_128_s { 1297c478bd9Sstevel@tonic-gate ib_lid_t LIDADDR; /* trap generator's LID */ 1307c478bd9Sstevel@tonic-gate uint8_t Padding[52]; 1317c478bd9Sstevel@tonic-gate } sm_trap_128_t; 1327c478bd9Sstevel@tonic-gate 1337c478bd9Sstevel@tonic-gate /* Traps 129, 130, and 131: Table 121 */ 1347c478bd9Sstevel@tonic-gate typedef struct sm_trap_129_s { 1357c478bd9Sstevel@tonic-gate uint16_t Reserved; 1367c478bd9Sstevel@tonic-gate ib_lid_t LIDADDR; /* generator's LID */ 1377c478bd9Sstevel@tonic-gate uint8_t PORTNO; /* generator's port */ 1387c478bd9Sstevel@tonic-gate uint8_t Padding[49]; 1397c478bd9Sstevel@tonic-gate } sm_trap_129_t; 1407c478bd9Sstevel@tonic-gate 1417c478bd9Sstevel@tonic-gate typedef sm_trap_129_t sm_trap_130_t; 1427c478bd9Sstevel@tonic-gate typedef sm_trap_129_t sm_trap_131_t; 1437c478bd9Sstevel@tonic-gate 1447c478bd9Sstevel@tonic-gate /* Trap 144: Table 122 */ 1457c478bd9Sstevel@tonic-gate typedef struct sm_trap_144_s { 1467c478bd9Sstevel@tonic-gate uint16_t Reserved; 1477c478bd9Sstevel@tonic-gate ib_lid_t LIDADDR; /* generator's LID */ 1487c478bd9Sstevel@tonic-gate uint16_t Reserved2; 1497c478bd9Sstevel@tonic-gate uint32_t CAPABILITYMASK; /* generator's CapMask */ 1507c478bd9Sstevel@tonic-gate uint8_t Padding[44]; 1517c478bd9Sstevel@tonic-gate } sm_trap_144_t; 1527c478bd9Sstevel@tonic-gate 1537c478bd9Sstevel@tonic-gate /* Trap 145: Table 123 */ 1547c478bd9Sstevel@tonic-gate typedef struct sm_trap_145_s { 1557c478bd9Sstevel@tonic-gate uint16_t Reserved; 1567c478bd9Sstevel@tonic-gate ib_lid_t LIDADDR; 1577c478bd9Sstevel@tonic-gate uint16_t Reserved2; 1587c478bd9Sstevel@tonic-gate ib_guid_t SYSTEMIMAGEGUID; /* generator's SysImage GUID */ 1597c478bd9Sstevel@tonic-gate uint8_t Padding[40]; 1607c478bd9Sstevel@tonic-gate } sm_trap_145_t; 1617c478bd9Sstevel@tonic-gate 1627c478bd9Sstevel@tonic-gate /* Trap 256: Table 124 */ 1637c478bd9Sstevel@tonic-gate #if defined(_BIT_FIELDS_HTOL) 1647c478bd9Sstevel@tonic-gate typedef struct sm_trap_256_s { 1657c478bd9Sstevel@tonic-gate uint16_t Reserved; 1667c478bd9Sstevel@tonic-gate ib_lid_t LIDADDR; /* generator's LID */ 1677c478bd9Sstevel@tonic-gate uint16_t Reserved1; 1687c478bd9Sstevel@tonic-gate uint8_t METHOD; /* method */ 1697c478bd9Sstevel@tonic-gate uint8_t Reserved2; 1707c478bd9Sstevel@tonic-gate uint16_t ATTRIBUTEID; /* attribute casuing the trap */ 1717c478bd9Sstevel@tonic-gate uint32_t ATTRIBUTEMODIFIER; /* modifier for the attrib */ 1727c478bd9Sstevel@tonic-gate uint64_t MKEY; 1737c478bd9Sstevel@tonic-gate uint8_t DRSLID; /* SLID of SMP causing notice */ 1747c478bd9Sstevel@tonic-gate uint8_t DRNotice :1; /* notice from a dr SMP */ 1757c478bd9Sstevel@tonic-gate uint8_t DRPathTruncated :1; /* return path is truncated */ 1767c478bd9Sstevel@tonic-gate uint8_t DRHopCount :6; /* num bytes in return path */ 1777c478bd9Sstevel@tonic-gate uint8_t DRNoticeReturnPath[30]; /* return path from the SMP */ 1787c478bd9Sstevel@tonic-gate } sm_trap_256_t; 1797c478bd9Sstevel@tonic-gate 1807c478bd9Sstevel@tonic-gate #elif defined(_BIT_FIELDS_LTOH) 1817c478bd9Sstevel@tonic-gate 1827c478bd9Sstevel@tonic-gate typedef struct sm_trap_256_s { 1837c478bd9Sstevel@tonic-gate uint16_t Reserved; 1847c478bd9Sstevel@tonic-gate ib_lid_t LIDADDR; /* generator's LID */ 1857c478bd9Sstevel@tonic-gate uint16_t Reserved1; 1867c478bd9Sstevel@tonic-gate uint8_t METHOD; /* method */ 1877c478bd9Sstevel@tonic-gate uint8_t Reserved2; 1887c478bd9Sstevel@tonic-gate uint16_t ATTRIBUTEID; /* attribute casuing the trap */ 1897c478bd9Sstevel@tonic-gate uint32_t ATTRIBUTEMODIFIER; /* modifier for the attrib */ 1907c478bd9Sstevel@tonic-gate uint64_t MKEY; 1917c478bd9Sstevel@tonic-gate uint8_t DRSLID; /* SLID of SMP causing notice */ 1927c478bd9Sstevel@tonic-gate uint8_t DRHopCount :6; /* num bytes in return path */ 1937c478bd9Sstevel@tonic-gate uint8_t DRPathTruncated :1; /* return path is truncated */ 1947c478bd9Sstevel@tonic-gate uint8_t DRNotice :1; /* notice from a dr SMP */ 1957c478bd9Sstevel@tonic-gate uint8_t DRNoticeReturnPath[30]; /* return path from the SMP */ 1967c478bd9Sstevel@tonic-gate } sm_trap_256_t; 1977c478bd9Sstevel@tonic-gate #else 1987c478bd9Sstevel@tonic-gate #error One of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined 1997c478bd9Sstevel@tonic-gate #endif /* _BIT_FIELDS_HTOL */ 2007c478bd9Sstevel@tonic-gate 2017c478bd9Sstevel@tonic-gate /* Traps 257 and 258: Table 125 */ 2027c478bd9Sstevel@tonic-gate #if defined(_BIT_FIELDS_HTOL) 2037c478bd9Sstevel@tonic-gate typedef struct sm_trap_257_s { 2047c478bd9Sstevel@tonic-gate uint16_t Reserved; 2057c478bd9Sstevel@tonic-gate ib_lid_t LIDADDR1; /* see spec description */ 2067c478bd9Sstevel@tonic-gate ib_lid_t LIDADDR2; 2077c478bd9Sstevel@tonic-gate uint32_t KEY; /* qkey or pkey */ 2087c478bd9Sstevel@tonic-gate uint32_t SL :4; /* sl for the trap */ 2097c478bd9Sstevel@tonic-gate uint32_t Reserved2 :4; /* reserved */ 2107c478bd9Sstevel@tonic-gate uint32_t QP :24; /* queue pair */ 2117c478bd9Sstevel@tonic-gate uint32_t Reserved3 :8; 2127c478bd9Sstevel@tonic-gate uint32_t QP2 :24; /* queue pair */ 2137c478bd9Sstevel@tonic-gate ib_gid_t GIDADDR1; /* see spec description */ 2147c478bd9Sstevel@tonic-gate ib_gid_t GIDADDR2; 2157c478bd9Sstevel@tonic-gate uint8_t Padding[4]; 2167c478bd9Sstevel@tonic-gate } sm_trap_257_t; 2177c478bd9Sstevel@tonic-gate 2187c478bd9Sstevel@tonic-gate #elif defined(_BIT_FIELDS_LTOH) 2197c478bd9Sstevel@tonic-gate 2207c478bd9Sstevel@tonic-gate typedef struct sm_trap_257_s { 2217c478bd9Sstevel@tonic-gate uint16_t Reserved; 2227c478bd9Sstevel@tonic-gate ib_lid_t LIDADDR1; /* see spec description */ 2237c478bd9Sstevel@tonic-gate ib_lid_t LIDADDR2; 2247c478bd9Sstevel@tonic-gate uint32_t KEY; /* qkey or pkey */ 2257c478bd9Sstevel@tonic-gate uint32_t QP :24; /* queue pair */ 2267c478bd9Sstevel@tonic-gate uint32_t Reserved2 :4; /* reserved */ 2277c478bd9Sstevel@tonic-gate uint32_t SL :4; /* sl for the trap */ 2287c478bd9Sstevel@tonic-gate uint32_t QP2 :24; /* queue pair */ 2297c478bd9Sstevel@tonic-gate uint32_t Reserved3 :8; 2307c478bd9Sstevel@tonic-gate ib_gid_t GIDADDR1; /* see spec description */ 2317c478bd9Sstevel@tonic-gate ib_gid_t GIDADDR2; 2327c478bd9Sstevel@tonic-gate uint8_t Padding[4]; 2337c478bd9Sstevel@tonic-gate } sm_trap_257_t; 2347c478bd9Sstevel@tonic-gate #else 2357c478bd9Sstevel@tonic-gate #error One of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined 2367c478bd9Sstevel@tonic-gate #endif /* _BIT_FIELDS_HTOL */ 2377c478bd9Sstevel@tonic-gate 2387c478bd9Sstevel@tonic-gate typedef sm_trap_257_t sm_trap_258_t; 2397c478bd9Sstevel@tonic-gate 2407c478bd9Sstevel@tonic-gate /* Trap 259: Table 126 */ 2417c478bd9Sstevel@tonic-gate #if defined(_BIT_FIELDS_HTOL) 2427c478bd9Sstevel@tonic-gate typedef struct sm_trap_259_s { 2437c478bd9Sstevel@tonic-gate uint16_t DataValid; /* validity of optional data */ 2447c478bd9Sstevel@tonic-gate ib_lid_t LIDADDR1; /* see spec description */ 2457c478bd9Sstevel@tonic-gate ib_lid_t LIDADDR2; 2467c478bd9Sstevel@tonic-gate uint16_t PKEY; /* pkey */ 2477c478bd9Sstevel@tonic-gate uint32_t SL :4; /* service level */ 2487c478bd9Sstevel@tonic-gate uint32_t Reserved :4; 2497c478bd9Sstevel@tonic-gate uint32_t QP1 :24; /* queue pair */ 2507c478bd9Sstevel@tonic-gate uint32_t Reserved8 :8; 2517c478bd9Sstevel@tonic-gate uint32_t QP2 :24; /* queue pair */ 2527c478bd9Sstevel@tonic-gate ib_gid_t GIDADDR1; /* see spec description */ 2537c478bd9Sstevel@tonic-gate ib_gid_t GIDADDR2; 2547c478bd9Sstevel@tonic-gate ib_lid_t SWLIDADDR; /* lid of switch */ 2557c478bd9Sstevel@tonic-gate uint8_t PORTNO; /* port number */ 2567c478bd9Sstevel@tonic-gate uint8_t Padding[3]; 2577c478bd9Sstevel@tonic-gate } sm_trap_259_t; 2587c478bd9Sstevel@tonic-gate 2597c478bd9Sstevel@tonic-gate #elif defined(_BIT_FIELDS_LTOH) 2607c478bd9Sstevel@tonic-gate 2617c478bd9Sstevel@tonic-gate typedef struct sm_trap_259_s { 2627c478bd9Sstevel@tonic-gate uint16_t DataValid; /* validity of optional data */ 2637c478bd9Sstevel@tonic-gate ib_lid_t LIDADDR1; /* see spec description */ 2647c478bd9Sstevel@tonic-gate ib_lid_t LIDADDR2; 2657c478bd9Sstevel@tonic-gate uint16_t PKEY; /* pkey */ 2667c478bd9Sstevel@tonic-gate uint32_t QP1 :24; /* queue pair */ 2677c478bd9Sstevel@tonic-gate uint32_t Reserved :4; 2687c478bd9Sstevel@tonic-gate uint32_t SL :4; /* service level */ 2697c478bd9Sstevel@tonic-gate uint32_t QP2 :24; /* queue pair */ 2707c478bd9Sstevel@tonic-gate uint32_t Reserved8 :8; 2717c478bd9Sstevel@tonic-gate ib_gid_t GIDADDR1; /* see spec description */ 2727c478bd9Sstevel@tonic-gate ib_gid_t GIDADDR2; 2737c478bd9Sstevel@tonic-gate ib_lid_t SWLIDADDR; /* lid of switch */ 2747c478bd9Sstevel@tonic-gate uint8_t PORTNO; /* port number */ 2757c478bd9Sstevel@tonic-gate uint8_t Padding[3]; 2767c478bd9Sstevel@tonic-gate } sm_trap_259_t; 2777c478bd9Sstevel@tonic-gate #else 2787c478bd9Sstevel@tonic-gate #error One of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined 2797c478bd9Sstevel@tonic-gate #endif /* _BIT_FIELDS_HTOL */ 2807c478bd9Sstevel@tonic-gate 2817c478bd9Sstevel@tonic-gate /* 2827c478bd9Sstevel@tonic-gate * NodeDescription: Table 127 2837c478bd9Sstevel@tonic-gate * NodeDescription is applicable to all ports of a node. 2847c478bd9Sstevel@tonic-gate */ 2857c478bd9Sstevel@tonic-gate typedef struct sm_nodedesc_s { 2867c478bd9Sstevel@tonic-gate uint8_t NodeString[64]; /* description string */ 2877c478bd9Sstevel@tonic-gate } sm_nodedesc_t; 2887c478bd9Sstevel@tonic-gate 2897c478bd9Sstevel@tonic-gate /* 2907c478bd9Sstevel@tonic-gate * NodeInfo: Table 128 2917c478bd9Sstevel@tonic-gate * The value of some NodeInfo components varies by port within a node. 2927c478bd9Sstevel@tonic-gate */ 2937c478bd9Sstevel@tonic-gate #if defined(_BIT_FIELDS_HTOL) 2947c478bd9Sstevel@tonic-gate typedef struct sm_nodeinfo_s { 2957c478bd9Sstevel@tonic-gate uint8_t BaseVersion; /* supported MAD base version */ 2967c478bd9Sstevel@tonic-gate uint8_t ClassVersion; /* support SMP version */ 2977c478bd9Sstevel@tonic-gate uint8_t NodeType; /* node type(CA, switch, etc) */ 2987c478bd9Sstevel@tonic-gate uint8_t NumPorts; /* # of phys ports on node */ 2997c478bd9Sstevel@tonic-gate ib_guid_t SystemImageGUID; /* GUID associating this node */ 3007c478bd9Sstevel@tonic-gate /* with nodes controlled by */ 3017c478bd9Sstevel@tonic-gate /* common supervisory code */ 3027c478bd9Sstevel@tonic-gate ib_guid_t NodeGUID; /* GUID of the node itself */ 3037c478bd9Sstevel@tonic-gate ib_guid_t PortGUID; /* GUID of this port */ 3047c478bd9Sstevel@tonic-gate uint16_t PartitionCap; /* # of entries in part. tbl. */ 3057c478bd9Sstevel@tonic-gate uint16_t DeviceID; /* device ID info */ 3067c478bd9Sstevel@tonic-gate uint32_t Revision; /* device revision */ 3077c478bd9Sstevel@tonic-gate uint32_t LocalPortNum :8; /* link port # SMP came in on */ 3087c478bd9Sstevel@tonic-gate uint32_t VendorID :24; /* device vendor, per IEEE */ 3097c478bd9Sstevel@tonic-gate } sm_nodeinfo_t; 3107c478bd9Sstevel@tonic-gate 3117c478bd9Sstevel@tonic-gate #elif defined(_BIT_FIELDS_LTOH) 3127c478bd9Sstevel@tonic-gate 3137c478bd9Sstevel@tonic-gate typedef struct sm_nodeinfo_s { 3147c478bd9Sstevel@tonic-gate uint8_t BaseVersion; /* supported MAD base version */ 3157c478bd9Sstevel@tonic-gate uint8_t ClassVersion; /* support SMP version */ 3167c478bd9Sstevel@tonic-gate uint8_t NodeType; /* node type(CA, switch, etc) */ 3177c478bd9Sstevel@tonic-gate uint8_t NumPorts; /* # of phys ports on node */ 3187c478bd9Sstevel@tonic-gate ib_guid_t SystemImageGUID; /* GUID associating this node */ 3197c478bd9Sstevel@tonic-gate /* with nodes controlled by */ 3207c478bd9Sstevel@tonic-gate /* common supervisory code */ 3217c478bd9Sstevel@tonic-gate ib_guid_t NodeGUID; /* GUID of the node itself */ 3227c478bd9Sstevel@tonic-gate ib_guid_t PortGUID; /* GUID of this port */ 3237c478bd9Sstevel@tonic-gate uint16_t PartitionCap; /* # of entries in part. tbl. */ 3247c478bd9Sstevel@tonic-gate uint16_t DeviceID; /* device ID info */ 3257c478bd9Sstevel@tonic-gate uint32_t Revision; /* device revision */ 3267c478bd9Sstevel@tonic-gate uint32_t VendorID :24; /* device vendor, per IEEE */ 3277c478bd9Sstevel@tonic-gate uint32_t LocalPortNum :8; /* link port # SMP came in on */ 3287c478bd9Sstevel@tonic-gate } sm_nodeinfo_t; 3297c478bd9Sstevel@tonic-gate #else 3307c478bd9Sstevel@tonic-gate #error One of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined 3317c478bd9Sstevel@tonic-gate #endif /* _BIT_FIELDS_HTOL */ 3327c478bd9Sstevel@tonic-gate 3337c478bd9Sstevel@tonic-gate /* Defines and Masks that go with NodeInfo */ 3347c478bd9Sstevel@tonic-gate #define SM_NODE_TYPE_CA 0x01 3357c478bd9Sstevel@tonic-gate #define SM_NODE_TYPE_SWITCH 0x02 3367c478bd9Sstevel@tonic-gate #define SM_NODE_TYPE_ROUTER 0x03 3377c478bd9Sstevel@tonic-gate 3387c478bd9Sstevel@tonic-gate /* SwitchInfo: Table 129 */ 3397c478bd9Sstevel@tonic-gate #if defined(_BIT_FIELDS_HTOL) 3407c478bd9Sstevel@tonic-gate typedef struct sm_switchinfo_s { 3417c478bd9Sstevel@tonic-gate uint16_t LinearFDBCap; /* max # of lin FDB entries */ 3427c478bd9Sstevel@tonic-gate uint16_t RandomFDBCap; /* max # of ran FDB entries */ 3437c478bd9Sstevel@tonic-gate uint16_t MulticastFDBCap; /* max # of mc FDB entries */ 3447c478bd9Sstevel@tonic-gate uint16_t LinearFDBTop; /* top of the linear FDB */ 3457c478bd9Sstevel@tonic-gate uint8_t DefaultPort; /* port when DLID not in FDB */ 3467c478bd9Sstevel@tonic-gate uint8_t DefaultMulticastPrimaryPort; /* mcast port when DLID */ 3477c478bd9Sstevel@tonic-gate /* not in FDB */ 3487c478bd9Sstevel@tonic-gate uint8_t DefaultMulticastNotPrimaryPort; /* mcast port when */ 3497c478bd9Sstevel@tonic-gate /* pkts from def port */ 3507c478bd9Sstevel@tonic-gate /* have DLID not in FDB */ 3517c478bd9Sstevel@tonic-gate uint8_t LifeTimeValue :5; /* time pkt can live in sw */ 3527c478bd9Sstevel@tonic-gate uint8_t PortStateChange :1; /* change in port state value */ 3537c478bd9Sstevel@tonic-gate uint8_t Reserved :2; 3547c478bd9Sstevel@tonic-gate uint16_t LIDsPerPort; /* max # of LID/LMCs per port */ 3557c478bd9Sstevel@tonic-gate uint16_t PartitionEnforcementCap; /* max entries in p. enf tbl */ 3567c478bd9Sstevel@tonic-gate uint8_t PartitionChecks :4; /* switch enforcement knobs */ 3577c478bd9Sstevel@tonic-gate uint8_t EnhancedPort0 :1; /* enhanced port 0 supported */ 3587c478bd9Sstevel@tonic-gate uint8_t Reserved2 :3; 3597c478bd9Sstevel@tonic-gate } sm_switchinfo_t; 3607c478bd9Sstevel@tonic-gate 3617c478bd9Sstevel@tonic-gate #elif defined(_BIT_FIELDS_LTOH) 3627c478bd9Sstevel@tonic-gate 3637c478bd9Sstevel@tonic-gate typedef struct sm_switchinfo_s { 3647c478bd9Sstevel@tonic-gate uint16_t LinearFDBCap; /* max # of lin FDB entries */ 3657c478bd9Sstevel@tonic-gate uint16_t RandomFDBCap; /* max # of ran FDB entries */ 3667c478bd9Sstevel@tonic-gate uint16_t MulticastFDBCap; /* max # of mc FDB entries */ 3677c478bd9Sstevel@tonic-gate uint16_t LinearFDBTop; /* top of the linear FDB */ 3687c478bd9Sstevel@tonic-gate uint8_t DefaultPort; /* port when DLID not in FDB */ 3697c478bd9Sstevel@tonic-gate uint8_t DefaultMulticastPrimaryPort; /* mcast port when DLID */ 3707c478bd9Sstevel@tonic-gate /* not in FDB */ 3717c478bd9Sstevel@tonic-gate uint8_t DefaultMulticastNotPrimaryPort; /* mcast port when */ 3727c478bd9Sstevel@tonic-gate /* pkts from def port */ 3737c478bd9Sstevel@tonic-gate /* have DLID not in FDB */ 3747c478bd9Sstevel@tonic-gate uint8_t Reserved :2; 3757c478bd9Sstevel@tonic-gate uint8_t PortStateChange :1; /* change in port state value */ 3767c478bd9Sstevel@tonic-gate uint8_t LifeTimeValue :5; /* time pkt can live in sw */ 3777c478bd9Sstevel@tonic-gate uint16_t LIDsPerPort; /* max # of LID/LMCs per port */ 3787c478bd9Sstevel@tonic-gate uint16_t PartitionEnforcementCap; /* max entries in p. enf tbl */ 3797c478bd9Sstevel@tonic-gate uint8_t Reserved2 :3; 3807c478bd9Sstevel@tonic-gate uint8_t EnhancedPort0 :1; /* enhanced port 0 supported */ 3817c478bd9Sstevel@tonic-gate uint8_t PartitionChecks :4; /* switch enforcement knobs */ 3827c478bd9Sstevel@tonic-gate } sm_switchinfo_t; 3837c478bd9Sstevel@tonic-gate #else 3847c478bd9Sstevel@tonic-gate #error One of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined 3857c478bd9Sstevel@tonic-gate #endif /* _BIT_FIELDS_HTOL */ 3867c478bd9Sstevel@tonic-gate 3877c478bd9Sstevel@tonic-gate /* Defines and Masks that go with SwitchInfo */ 3887c478bd9Sstevel@tonic-gate #define SM_PORT_STATE_CHANGE_CLEAR 0x1 3897c478bd9Sstevel@tonic-gate #define SM_SWITCH_PART_ENF_IN 0x8 3907c478bd9Sstevel@tonic-gate #define SM_SWITCH_PART_ENF_IN_MASK 0x8 3917c478bd9Sstevel@tonic-gate #define SM_SWITCH_PART_ENF_OUT 0x4 3927c478bd9Sstevel@tonic-gate #define SM_SWITCH_PART_ENF_OUT_MASK 0x4 3937c478bd9Sstevel@tonic-gate #define SM_SWITCH_FILTER_RAW_IN 0x2 3947c478bd9Sstevel@tonic-gate #define SM_SWITCH_FILTER_RAW_IN_MASK 0x2 3957c478bd9Sstevel@tonic-gate #define SM_SWITCH_FILTER_RAW_OUT 0x1 3967c478bd9Sstevel@tonic-gate #define SM_SWITCH_FILTER_RAW_OUT_MASK 0x1 3977c478bd9Sstevel@tonic-gate 3987c478bd9Sstevel@tonic-gate /* GUIDInfo: Table 130 */ 3997c478bd9Sstevel@tonic-gate typedef struct sm_guidinfo_s { 4007c478bd9Sstevel@tonic-gate ib_guid_t GUIDBlocks[8]; 4017c478bd9Sstevel@tonic-gate } sm_guidinfo_t; 4027c478bd9Sstevel@tonic-gate 4037c478bd9Sstevel@tonic-gate /* defines that go with guid info */ 4047c478bd9Sstevel@tonic-gate #define SM_GUIDINFO_BLOCK_MAX 31 4057c478bd9Sstevel@tonic-gate 4067c478bd9Sstevel@tonic-gate /* 4077c478bd9Sstevel@tonic-gate * PortInfo: Table 132 4087c478bd9Sstevel@tonic-gate * PortInfo is applicable to all ports of a node. 4097c478bd9Sstevel@tonic-gate */ 4107c478bd9Sstevel@tonic-gate #if defined(_BIT_FIELDS_HTOL) 4117c478bd9Sstevel@tonic-gate typedef struct sm_portinfo_s { 4127c478bd9Sstevel@tonic-gate uint64_t M_Key; /* M_key */ 4137c478bd9Sstevel@tonic-gate ib_sn_prefix_t GidPrefix; /* Gid prefix */ 4147c478bd9Sstevel@tonic-gate ib_lid_t LID; /* base LID of the port */ 4157c478bd9Sstevel@tonic-gate ib_lid_t MasterSMLID; /* LID of the master SM */ 4167c478bd9Sstevel@tonic-gate uint32_t CapabilityMask; /* Capability Mask */ 4177c478bd9Sstevel@tonic-gate uint16_t DiagCode; /* diag code */ 4187c478bd9Sstevel@tonic-gate uint16_t M_KeyLeasePeriod; /* M_key lease period */ 4197c478bd9Sstevel@tonic-gate uint8_t LocalPortNum; /* port which recvd the MAD */ 4207c478bd9Sstevel@tonic-gate uint8_t LinkWidthEnabled; /* link width(s) enabled */ 4217c478bd9Sstevel@tonic-gate uint8_t LinkWidthSupported; /* widths supported by port */ 4227c478bd9Sstevel@tonic-gate uint8_t LinkWidthActive; /* Currently active width */ 4237c478bd9Sstevel@tonic-gate uint8_t LinkSpeedSupported:4; /* link speed supported */ 4247c478bd9Sstevel@tonic-gate uint8_t PortState :4; /* port state */ 4257c478bd9Sstevel@tonic-gate uint8_t PortPhysicalState:4; /* port physical state */ 4267c478bd9Sstevel@tonic-gate uint8_t LinkDownDefaultState:4; /* see spec description */ 4277c478bd9Sstevel@tonic-gate uint8_t M_KeyProtectBits:2; /* M-key protection bits */ 4287c478bd9Sstevel@tonic-gate uint8_t Reserved :3; 4297c478bd9Sstevel@tonic-gate uint8_t LMC :3; /* LID mask count */ 4307c478bd9Sstevel@tonic-gate uint8_t LinkSpeedActive :4; /* current active link speed */ 4317c478bd9Sstevel@tonic-gate uint8_t LinkSpeedEnabled:4; /* enabled link speed */ 4327c478bd9Sstevel@tonic-gate uint8_t NeighborMTU :4; /* Active max MTU for port */ 4337c478bd9Sstevel@tonic-gate uint8_t MasterSMSL :4; /* admin SL of master SM */ 4347c478bd9Sstevel@tonic-gate uint8_t VLCap :4; /* virtual lanes supported */ 4357c478bd9Sstevel@tonic-gate uint8_t InitType :4; /* type of init requested */ 4367c478bd9Sstevel@tonic-gate uint8_t VLHighLimit; /* VL high pri limit */ 4377c478bd9Sstevel@tonic-gate uint8_t VLArbitrationHighCap; /* max high pri entries in */ 4387c478bd9Sstevel@tonic-gate /* VL arbitration table */ 4397c478bd9Sstevel@tonic-gate uint8_t VLArbitrationLowCap; /* max low pri entries */ 4407c478bd9Sstevel@tonic-gate uint8_t InitTypeReply :4; /* type of init performed */ 4417c478bd9Sstevel@tonic-gate uint8_t MTUCap :4; /* max MTU supported */ 4427c478bd9Sstevel@tonic-gate uint8_t VLStallCount :3; /* # pkts to enter stall st. */ 4437c478bd9Sstevel@tonic-gate uint8_t HOQLife :5; /* time pkt can live at HOQ */ 4447c478bd9Sstevel@tonic-gate uint8_t OperationalVLs :4; /* virtual lanes operational */ 4457c478bd9Sstevel@tonic-gate uint8_t PartitionChecks :4; /* port enforcement knbos */ 4467c478bd9Sstevel@tonic-gate uint16_t M_KeyViolations; /* count of M_key violations */ 4477c478bd9Sstevel@tonic-gate uint16_t P_KeyViolations; /* count of P_key violations */ 4487c478bd9Sstevel@tonic-gate uint16_t Q_KeyViolations; /* count of Q_key violations */ 4497c478bd9Sstevel@tonic-gate uint8_t GUIDCap; /* number of GUIDs supported */ 450*76c04273SRajkumar Sivaprakasam uint8_t ClientRereg :1; /* Client ReReg supported */ 451*76c04273SRajkumar Sivaprakasam uint8_t Reserved2 :2; 4527c478bd9Sstevel@tonic-gate uint8_t SubnetTimeOut :5; /* defines subnet prop. dely */ 4537c478bd9Sstevel@tonic-gate uint8_t Reserved3 :3; 4547c478bd9Sstevel@tonic-gate uint8_t RespTimeValue :5; /* defines resp time to SMPs */ 4557c478bd9Sstevel@tonic-gate uint8_t LocalPhyErrors :4; /* threshold for errors */ 4567c478bd9Sstevel@tonic-gate uint8_t OverrunErrors :4; /* threshold for errors */ 4577c478bd9Sstevel@tonic-gate } sm_portinfo_t; 4587c478bd9Sstevel@tonic-gate 4597c478bd9Sstevel@tonic-gate #elif defined(_BIT_FIELDS_LTOH) 4607c478bd9Sstevel@tonic-gate 4617c478bd9Sstevel@tonic-gate typedef struct sm_portinfo_s { 4627c478bd9Sstevel@tonic-gate uint64_t M_Key; /* M_key */ 4637c478bd9Sstevel@tonic-gate ib_sn_prefix_t GidPrefix; /* Gid prefix */ 4647c478bd9Sstevel@tonic-gate ib_lid_t LID; /* base LID of the port */ 4657c478bd9Sstevel@tonic-gate ib_lid_t MasterSMLID; /* LID of the master SM */ 4667c478bd9Sstevel@tonic-gate uint32_t CapabilityMask; /* Capability Mask */ 4677c478bd9Sstevel@tonic-gate uint16_t DiagCode; /* diag code */ 4687c478bd9Sstevel@tonic-gate uint16_t M_KeyLeasePeriod; /* M_key lease period */ 4697c478bd9Sstevel@tonic-gate uint8_t LocalPortNum; /* port which recvd the MAD */ 4707c478bd9Sstevel@tonic-gate uint8_t LinkWidthEnabled; /* link width(s) enabled */ 4717c478bd9Sstevel@tonic-gate uint8_t LinkWidthSupported; /* widths supported by port */ 4727c478bd9Sstevel@tonic-gate uint8_t LinkWidthActive; /* Currently active width */ 4737c478bd9Sstevel@tonic-gate uint8_t PortState :4; /* port state */ 4747c478bd9Sstevel@tonic-gate uint8_t LinkSpeedSupported:4; /* link speed supported */ 4757c478bd9Sstevel@tonic-gate uint8_t LinkDownDefaultState:4; /* see spec description */ 4767c478bd9Sstevel@tonic-gate uint8_t PortPhysicalState:4; /* port physical state */ 4777c478bd9Sstevel@tonic-gate uint8_t LMC :3; /* LID mask count */ 4787c478bd9Sstevel@tonic-gate uint8_t Reserved :3; 4797c478bd9Sstevel@tonic-gate uint8_t M_KeyProtectBits:2; /* M-key protection bits */ 4807c478bd9Sstevel@tonic-gate uint8_t LinkSpeedEnabled:4; /* enabled link speed */ 4817c478bd9Sstevel@tonic-gate uint8_t LinkSpeedActive :4; /* current active link speed */ 4827c478bd9Sstevel@tonic-gate uint8_t MasterSMSL :4; /* admin SL of master SM */ 4837c478bd9Sstevel@tonic-gate uint8_t NeighborMTU :4; /* Active max MTU for port */ 4847c478bd9Sstevel@tonic-gate uint8_t InitType :4; /* type of init requested */ 4857c478bd9Sstevel@tonic-gate uint8_t VLCap :4; /* virtual lanes supported */ 4867c478bd9Sstevel@tonic-gate uint8_t VLHighLimit; /* VL high pri limit */ 4877c478bd9Sstevel@tonic-gate uint8_t VLArbitrationHighCap; /* max high pri entries in */ 4887c478bd9Sstevel@tonic-gate /* VL arbitration table */ 4897c478bd9Sstevel@tonic-gate uint8_t VLArbitrationLowCap; /* max low pri entries */ 4907c478bd9Sstevel@tonic-gate uint8_t MTUCap :4; /* max MTU supported */ 4917c478bd9Sstevel@tonic-gate uint8_t InitTypeReply :4; /* type of init performed */ 4927c478bd9Sstevel@tonic-gate uint8_t HOQLife :5; /* time pkt can live at HOQ */ 4937c478bd9Sstevel@tonic-gate uint8_t VLStallCount :3; /* # pkts to enter stall st. */ 4947c478bd9Sstevel@tonic-gate uint8_t PartitionChecks :4; /* port enforcement knbos */ 4957c478bd9Sstevel@tonic-gate uint8_t OperationalVLs :4; /* virtual lanes operational */ 4967c478bd9Sstevel@tonic-gate uint16_t M_KeyViolations; /* count of M_key violations */ 4977c478bd9Sstevel@tonic-gate uint16_t P_KeyViolations; /* count of P_key violations */ 4987c478bd9Sstevel@tonic-gate uint16_t Q_KeyViolations; /* count of Q_key violations */ 4997c478bd9Sstevel@tonic-gate uint8_t GUIDCap; /* number of GUIDs supported */ 5007c478bd9Sstevel@tonic-gate uint8_t SubnetTimeOut :5; /* defines subnet prop. dely */ 501*76c04273SRajkumar Sivaprakasam uint8_t Reserved2 :2; 502*76c04273SRajkumar Sivaprakasam uint8_t ClientRereg :1; /* Client ReReg supported */ 5037c478bd9Sstevel@tonic-gate uint8_t RespTimeValue :5; /* defines resp time to SMPs */ 5047c478bd9Sstevel@tonic-gate uint8_t Reserved3 :3; 5057c478bd9Sstevel@tonic-gate uint8_t OverrunErrors :4; /* threshold for errors */ 5067c478bd9Sstevel@tonic-gate uint8_t LocalPhyErrors :4; /* threshold for errors */ 5077c478bd9Sstevel@tonic-gate } sm_portinfo_t; 5087c478bd9Sstevel@tonic-gate #else 5097c478bd9Sstevel@tonic-gate #error One of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined 5107c478bd9Sstevel@tonic-gate #endif /* _BIT_FIELDS_HTOL */ 5117c478bd9Sstevel@tonic-gate 5127c478bd9Sstevel@tonic-gate /* Defines and Masks that go with PortInfo */ 5137c478bd9Sstevel@tonic-gate #define SM_CAP_MASK_IS_SM 0x00000002 5147c478bd9Sstevel@tonic-gate #define SM_CAP_MASK_IS_NOTICE_SUPPD 0x00000004 5157c478bd9Sstevel@tonic-gate #define SM_CAP_MASK_IS_TRAP_SUPPD 0x00000008 5167c478bd9Sstevel@tonic-gate #define SM_CAP_MASK_IS_RESET_SUPPD 0x00000010 5177c478bd9Sstevel@tonic-gate #define SM_CAP_MASK_IS_APM_SUPPD 0x00000020 5187c478bd9Sstevel@tonic-gate #define SM_CAP_MASK_IS_SLMAPP_SUPPD 0x00000040 5197c478bd9Sstevel@tonic-gate #define SM_CAP_MASK_IS_NVRAM_MKEY 0x00000080 5207c478bd9Sstevel@tonic-gate #define SM_CAP_MASK_IS_NVRAM_PKEY 0x00000100 5217c478bd9Sstevel@tonic-gate #define SM_CAP_MASK_IS_LEDINFO_SUPPD 0x00000200 5227c478bd9Sstevel@tonic-gate #define SM_CAP_MASK_IS_SM_DISABLED 0x00000400 5237c478bd9Sstevel@tonic-gate #define SM_CAP_MASK_IS_SYSIMG_GUID_DISABLED 0x00000800 5247c478bd9Sstevel@tonic-gate #define SM_CAP_MASK_IS_PKEY_SW_TRAP_DISABLED 0x00001000 5257c478bd9Sstevel@tonic-gate #define SM_CAP_MASK_IS_CM_SUPPD 0x00010000 5267c478bd9Sstevel@tonic-gate #define SM_CAP_MASK_IS_SNMP_SUPPD 0x00020000 5277c478bd9Sstevel@tonic-gate #define SM_CAP_MASK_IS_DM_SUPPD 0x00080000 5287c478bd9Sstevel@tonic-gate #define SM_CAP_MASK_IS_VM_SUPPD 0x00100000 5297c478bd9Sstevel@tonic-gate #define SM_CAP_MASK_IS_DR_NOTICE_SUPPD 0x00200000 5307c478bd9Sstevel@tonic-gate #define SM_CAP_MASK_IS_CAP_MASK_NOTICE_SUPPD 0x00400000 5317c478bd9Sstevel@tonic-gate #define SM_CAP_MASK_IS_BOOT_MGMT_SUPPD 0x00800000 532*76c04273SRajkumar Sivaprakasam #define SM_CAP_MASK_IS_CLNT_REREG_SUPPD 0x02000000 5337c478bd9Sstevel@tonic-gate 5347c478bd9Sstevel@tonic-gate /* Standard Encoding of DiagCode Bits 3-0: Table 133 */ 5357c478bd9Sstevel@tonic-gate #define SM_DIAG_CODE_PORT_READY 0x0 5367c478bd9Sstevel@tonic-gate #define SM_DIAG_CODE_PERFORMING_SELF_TEST 0x1 5377c478bd9Sstevel@tonic-gate #define SM_DIAG_CODE_INITIALIZING 0x2 5387c478bd9Sstevel@tonic-gate #define SM_DIAG_CODE_SOFT_ERROR 0x3 5397c478bd9Sstevel@tonic-gate #define SM_DIAG_CODE_HARD_ERROR 0x4 5407c478bd9Sstevel@tonic-gate 5417c478bd9Sstevel@tonic-gate #define SM_LINK_WIDTH_ENABLED_NOP 0x00 5427c478bd9Sstevel@tonic-gate #define SM_LINK_WIDTH_ENABLED_1X 0x01 5437c478bd9Sstevel@tonic-gate #define SM_LINK_WIDTH_ENABLED_4X 0x02 5447c478bd9Sstevel@tonic-gate #define SM_LINK_WIDTH_ENABLED_1X_4X 0x03 5457c478bd9Sstevel@tonic-gate #define SM_LINK_WIDTH_ENABLED_12X 0x08 5467c478bd9Sstevel@tonic-gate #define SM_LINK_WIDTH_ENABLED_1X_12X 0x09 5477c478bd9Sstevel@tonic-gate #define SM_LINK_WIDTH_ENABLED_4X_12X 0x0A 5487c478bd9Sstevel@tonic-gate #define SM_LINK_WIDTH_ENABLED_1X_4X_12X 0x0B 5497c478bd9Sstevel@tonic-gate #define SM_LINK_WIDTH_ENABLED_SUPPORTED 0xFF 5507c478bd9Sstevel@tonic-gate 5517c478bd9Sstevel@tonic-gate #define SM_LINK_WIDTH_SUPP_1X 0x01 5527c478bd9Sstevel@tonic-gate #define SM_LINK_WIDTH_SUPP_1X_4X 0x03 5537c478bd9Sstevel@tonic-gate #define SM_LINK_WIDTH_SUPP_1X_4X_12X 0x0B 5547c478bd9Sstevel@tonic-gate 5557c478bd9Sstevel@tonic-gate #define SM_LINK_WIDTH_ACTIVE_1X 0x01 5567c478bd9Sstevel@tonic-gate #define SM_LINK_WIDTH_ACTIVE_4X 0x02 55750949b65Sagiri #define SM_LINK_WIDTH_ACTIVE_8X 0x04 5587c478bd9Sstevel@tonic-gate #define SM_LINK_WIDTH_ACTIVE_12X 0x08 5597c478bd9Sstevel@tonic-gate 5607c478bd9Sstevel@tonic-gate #define SM_LINK_SPEED_SUPP_2_5_GBPS 0x1 5617c478bd9Sstevel@tonic-gate 5627c478bd9Sstevel@tonic-gate #define SM_PORT_STATE_NOP 0x0 5637c478bd9Sstevel@tonic-gate #define SM_PORT_STATE_DOWN 0x1 5647c478bd9Sstevel@tonic-gate #define SM_PORT_STATE_INITIALIZE 0x2 5657c478bd9Sstevel@tonic-gate #define SM_PORT_STATE_ARMED 0x3 5667c478bd9Sstevel@tonic-gate #define SM_PORT_STATE_ACTIVE 0x4 5677c478bd9Sstevel@tonic-gate 5687c478bd9Sstevel@tonic-gate #define SM_PORT_PHYS_STATE_NOP 0x0 5697c478bd9Sstevel@tonic-gate #define SM_PORT_PHYS_STATE_SLEEP 0x1 5707c478bd9Sstevel@tonic-gate #define SM_PORT_PHYS_STATE_POLLING 0x2 5717c478bd9Sstevel@tonic-gate #define SM_PORT_PHYS_STATE_DISABLED 0x3 5727c478bd9Sstevel@tonic-gate #define SM_PORT_PHYS_STATE_TRAINING 0x4 5737c478bd9Sstevel@tonic-gate #define SM_PORT_PHYS_STATE_LINK_UP 0x5 5747c478bd9Sstevel@tonic-gate #define SM_PORT_PHYS_STATE_LINK_REC 0x6 5757c478bd9Sstevel@tonic-gate 5767c478bd9Sstevel@tonic-gate #define SM_LINK_DOWN_DEFAULT_NOP 0x0 5777c478bd9Sstevel@tonic-gate #define SM_LINK_DOWN_DEFAULT_SLEEP 0x1 5787c478bd9Sstevel@tonic-gate #define SM_LINK_DOWN_DEFAULT_POLLING 0x2 5797c478bd9Sstevel@tonic-gate 5807c478bd9Sstevel@tonic-gate /* MKey Protection Levels: Table 115 */ 5817c478bd9Sstevel@tonic-gate #define SM_MKEY_PROT_BITS_ALL_SUCCEED 0x0 5827c478bd9Sstevel@tonic-gate #define SM_MKEY_PROT_BITS_GETRESP_RESETS 0x1 5837c478bd9Sstevel@tonic-gate #define SM_MKEY_PROT_BITS_SET_FAIL 0x2 5847c478bd9Sstevel@tonic-gate #define SM_MKEY_PROT_BITS_SET_FAILX 0x3 5857c478bd9Sstevel@tonic-gate 5867c478bd9Sstevel@tonic-gate #define SM_LINK_SPEED_ACTIVE_2_5_GBPS 0x1 58750949b65Sagiri #define SM_LINK_SPEED_ACTIVE_5_GBPS 0x2 58850949b65Sagiri #define SM_LINK_SPEED_ACTIVE_10_GBPS 0x4 5897c478bd9Sstevel@tonic-gate 5907c478bd9Sstevel@tonic-gate #define SM_LINK_SPEED_ENABLED_NOP 0x0 5917c478bd9Sstevel@tonic-gate #define SM_LINK_SPEED_ENABLED_2_5_GBPS 0x1 5927c478bd9Sstevel@tonic-gate #define SM_LINK_SPEED_ENABLED_SUPP_VALUE 0xF 5937c478bd9Sstevel@tonic-gate 5947c478bd9Sstevel@tonic-gate #define SM_NEIGHBOR_MTU_256 0x1 5957c478bd9Sstevel@tonic-gate #define SM_NEIGHBOR_MTU_512 0x2 5967c478bd9Sstevel@tonic-gate #define SM_NEIGHBOR_MTU_1024 0x3 5977c478bd9Sstevel@tonic-gate #define SM_NEIGHBOR_MTU_2048 0x4 5987c478bd9Sstevel@tonic-gate #define SM_NEIGHBOR_MTU_4096 0x5 5997c478bd9Sstevel@tonic-gate 6007c478bd9Sstevel@tonic-gate #define SM_VL_CAP_VL0 0x1 6017c478bd9Sstevel@tonic-gate #define SM_VL_CAP_VL0_VL1 0x2 6027c478bd9Sstevel@tonic-gate #define SM_VL_CAP_VL0_VL3 0x3 6037c478bd9Sstevel@tonic-gate #define SM_VL_CAP_VL0_VL7 0x4 6047c478bd9Sstevel@tonic-gate #define SM_VL_CAP_VL0_VL14 0x5 6057c478bd9Sstevel@tonic-gate 6067c478bd9Sstevel@tonic-gate #define SM_INIT_TYPE_NO_LOAD 0x1 6077c478bd9Sstevel@tonic-gate #define SM_INIT_TYPE_PRESERVE_CONTENT 0x2 6087c478bd9Sstevel@tonic-gate #define SM_INIT_TYPE_PRESERVE_PRESENCE 0x4 6097c478bd9Sstevel@tonic-gate #define SM_INIT_TYPE_DO_NOT_RESUSCITATE 0x8 6107c478bd9Sstevel@tonic-gate 6117c478bd9Sstevel@tonic-gate #define SM_INIT_TYPE_REPLY_NO_LOAD_REPLY 0x1 6127c478bd9Sstevel@tonic-gate #define SM_INIT_TYPE_PRESERVE_CONTENT_REPLY 0x2 6137c478bd9Sstevel@tonic-gate #define SM_INIT_TYPE_PRESERVE_PRESENCE_REPLY 0x4 6147c478bd9Sstevel@tonic-gate 6157c478bd9Sstevel@tonic-gate #define SM_MTU_CAP_256 0x1 6167c478bd9Sstevel@tonic-gate #define SM_MTU_CAP_512 0x2 6177c478bd9Sstevel@tonic-gate #define SM_MTU_CAP_1024 0x3 6187c478bd9Sstevel@tonic-gate #define SM_MTU_CAP_2048 0x4 6197c478bd9Sstevel@tonic-gate #define SM_MTU_CAP_4096 0x5 6207c478bd9Sstevel@tonic-gate 6217c478bd9Sstevel@tonic-gate #define SM_HOQ_LIFE_INFINITY 19 /* from IB spec 18.2.5.4 */ 6227c478bd9Sstevel@tonic-gate 6237c478bd9Sstevel@tonic-gate #define SM_OPERATIONAL_VLS_NOP 0x0 6247c478bd9Sstevel@tonic-gate #define SM_OPERATIONAL_VLS_VL0 0x1 6257c478bd9Sstevel@tonic-gate #define SM_OPERATIONAL_VLS_VL0_VL1 0x2 6267c478bd9Sstevel@tonic-gate #define SM_OPERATIONAL_VLS_VL0_VL3 0x3 6277c478bd9Sstevel@tonic-gate #define SM_OPERATIONAL_VLS_VL0_VL7 0x4 6287c478bd9Sstevel@tonic-gate #define SM_OPERATIONAL_VLS_VLO_VL14 0x5 6297c478bd9Sstevel@tonic-gate 6307c478bd9Sstevel@tonic-gate #define SM_PART_ENF_IN_BOUND 0x8 6317c478bd9Sstevel@tonic-gate #define SM_PART_ENF_OUT_BOUND 0x4 6327c478bd9Sstevel@tonic-gate #define SM_FILTER_RAW_IN_BOUND 0x2 6337c478bd9Sstevel@tonic-gate #define SM_FILTER_RAW_OUT_BOUND 0x1 6347c478bd9Sstevel@tonic-gate 6357c478bd9Sstevel@tonic-gate /* P_Key Table: Table 134 */ 6367c478bd9Sstevel@tonic-gate typedef struct sm_pkey_table_s { 6377c478bd9Sstevel@tonic-gate uint16_t P_KeyTableBlocks[32]; /* List of 32 P_Key Block Elements */ 6387c478bd9Sstevel@tonic-gate } sm_pkey_table_t; 6397c478bd9Sstevel@tonic-gate 6407c478bd9Sstevel@tonic-gate /* P_Key Block Element: Table 135 */ 6417c478bd9Sstevel@tonic-gate #if defined(_BIT_FIELDS_HTOL) 6427c478bd9Sstevel@tonic-gate typedef struct sm_pkey_block_element_s { 6437c478bd9Sstevel@tonic-gate uint16_t MembershipType :1; /* 0 is limited; 1 is full type */ 6447c478bd9Sstevel@tonic-gate uint16_t P_KeyBase :15; /* base value of P_Key */ 6457c478bd9Sstevel@tonic-gate } sm_pkey_block_element_t; 6467c478bd9Sstevel@tonic-gate 6477c478bd9Sstevel@tonic-gate #elif defined(_BIT_FIELDS_LTOH) 6487c478bd9Sstevel@tonic-gate 6497c478bd9Sstevel@tonic-gate typedef struct sm_pkey_block_element_s { 6507c478bd9Sstevel@tonic-gate uint16_t P_KeyBase :15; /* base value of P_Key */ 6517c478bd9Sstevel@tonic-gate uint16_t MembershipType :1; /* 0 is limited; 1 is full type */ 6527c478bd9Sstevel@tonic-gate } sm_pkey_block_element_t; 6537c478bd9Sstevel@tonic-gate #else 6547c478bd9Sstevel@tonic-gate #error One of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined 6557c478bd9Sstevel@tonic-gate #endif /* _BIT_FIELDS_HTOL */ 6567c478bd9Sstevel@tonic-gate 6577c478bd9Sstevel@tonic-gate /* 6587c478bd9Sstevel@tonic-gate * SLtoVLMapping Table: Table 136 6597c478bd9Sstevel@tonic-gate * Each field specifies the VL onto which packets using that SL are dropped. 6607c478bd9Sstevel@tonic-gate */ 6617c478bd9Sstevel@tonic-gate #if defined(_BIT_FIELDS_HTOL) 6627c478bd9Sstevel@tonic-gate typedef struct sm_SLtoVL_mapping_table_s { 6637c478bd9Sstevel@tonic-gate uint8_t SL0toVL :4; 6647c478bd9Sstevel@tonic-gate uint8_t SL1toVL :4; 6657c478bd9Sstevel@tonic-gate uint8_t SL2toVL :4; 6667c478bd9Sstevel@tonic-gate uint8_t SL3toVL :4; 6677c478bd9Sstevel@tonic-gate uint8_t SL4toVL :4; 6687c478bd9Sstevel@tonic-gate uint8_t SL5toVL :4; 6697c478bd9Sstevel@tonic-gate uint8_t SL6toVL :4; 6707c478bd9Sstevel@tonic-gate uint8_t SL7toVL :4; 6717c478bd9Sstevel@tonic-gate uint8_t SL8toVL :4; 6727c478bd9Sstevel@tonic-gate uint8_t SL9toVL :4; 6737c478bd9Sstevel@tonic-gate uint8_t SL10toVL :4; 6747c478bd9Sstevel@tonic-gate uint8_t SL11toVL :4; 6757c478bd9Sstevel@tonic-gate uint8_t SL12toVL :4; 6767c478bd9Sstevel@tonic-gate uint8_t SL13toVL :4; 6777c478bd9Sstevel@tonic-gate uint8_t SL14toVL :4; 6787c478bd9Sstevel@tonic-gate uint8_t SL15toVL :4; 6797c478bd9Sstevel@tonic-gate } sm_SLtoVL_mapping_table_t; 6807c478bd9Sstevel@tonic-gate 6817c478bd9Sstevel@tonic-gate #elif defined(_BIT_FIELDS_LTOH) 6827c478bd9Sstevel@tonic-gate 6837c478bd9Sstevel@tonic-gate typedef struct sm_SLtoVL_mapping_table_s { 6847c478bd9Sstevel@tonic-gate uint8_t SL1toVL :4; 6857c478bd9Sstevel@tonic-gate uint8_t SL0toVL :4; 6867c478bd9Sstevel@tonic-gate uint8_t SL3toVL :4; 6877c478bd9Sstevel@tonic-gate uint8_t SL2toVL :4; 6887c478bd9Sstevel@tonic-gate uint8_t SL5toVL :4; 6897c478bd9Sstevel@tonic-gate uint8_t SL4toVL :4; 6907c478bd9Sstevel@tonic-gate uint8_t SL7toVL :4; 6917c478bd9Sstevel@tonic-gate uint8_t SL6toVL :4; 6927c478bd9Sstevel@tonic-gate uint8_t SL9toVL :4; 6937c478bd9Sstevel@tonic-gate uint8_t SL8toVL :4; 6947c478bd9Sstevel@tonic-gate uint8_t SL11toVL :4; 6957c478bd9Sstevel@tonic-gate uint8_t SL10toVL :4; 6967c478bd9Sstevel@tonic-gate uint8_t SL13toVL :4; 6977c478bd9Sstevel@tonic-gate uint8_t SL12toVL :4; 6987c478bd9Sstevel@tonic-gate uint8_t SL15toVL :4; 6997c478bd9Sstevel@tonic-gate uint8_t SL14toVL :4; 7007c478bd9Sstevel@tonic-gate } sm_SLtoVL_mapping_table_t; 7017c478bd9Sstevel@tonic-gate #else 7027c478bd9Sstevel@tonic-gate #error One of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined 7037c478bd9Sstevel@tonic-gate #endif /* _BIT_FIELDS_HTOL */ 7047c478bd9Sstevel@tonic-gate 7057c478bd9Sstevel@tonic-gate /* VL/Weight Block Element: Table 138 */ 7067c478bd9Sstevel@tonic-gate typedef struct sm_VL_weight_block_s { 7077c478bd9Sstevel@tonic-gate uint8_t Reserved :4; 7087c478bd9Sstevel@tonic-gate uint8_t VL :4; /* VL assoc. with this element */ 7097c478bd9Sstevel@tonic-gate uint8_t Weight; /* weight assoc. with this element */ 7107c478bd9Sstevel@tonic-gate } sm_VL_weight_block_t; 7117c478bd9Sstevel@tonic-gate 7127c478bd9Sstevel@tonic-gate /* VLArbitration Table: Table 137 */ 7137c478bd9Sstevel@tonic-gate typedef struct sm_VLarb_table_s { 7147c478bd9Sstevel@tonic-gate sm_VL_weight_block_t VLWeightPairs[32]; 7157c478bd9Sstevel@tonic-gate } sm_VLarb_table_t; 7167c478bd9Sstevel@tonic-gate 7177c478bd9Sstevel@tonic-gate /* Defines and masks that go with VLArbitrationTable & address modifier */ 7187c478bd9Sstevel@tonic-gate #define SM_LOW_PRI_VL_ARB_LOWER_32 0x1 7197c478bd9Sstevel@tonic-gate #define SM_LOW_PRI_VL_ARB_UPPER_32 0x2 7207c478bd9Sstevel@tonic-gate #define SM_HI_PRI_VL_ARB_LOWER_32 0x3 7217c478bd9Sstevel@tonic-gate #define SM_HI_PRI_VL_ARB_UPPER_32 0x4 7227c478bd9Sstevel@tonic-gate 7237c478bd9Sstevel@tonic-gate /* Defines that go with the linear forwarding table */ 7247c478bd9Sstevel@tonic-gate #define SM_LFT_BLOCK_MAX 767 7257c478bd9Sstevel@tonic-gate #define SM_LFT_PORTS_PER_BLOCK 64 7267c478bd9Sstevel@tonic-gate 7277c478bd9Sstevel@tonic-gate /* Linear Forwarding Table: Table 139 */ 7287c478bd9Sstevel@tonic-gate typedef struct sm_linear_forwarding_table_s { 7297c478bd9Sstevel@tonic-gate uint8_t PortBlocks[64]; 7307c478bd9Sstevel@tonic-gate } sm_linear_forwarding_table_t; 7317c478bd9Sstevel@tonic-gate 7327c478bd9Sstevel@tonic-gate /* LID/Port Block Element: Table 142 */ 7337c478bd9Sstevel@tonic-gate #if defined(_BIT_FIELDS_HTOL) 7347c478bd9Sstevel@tonic-gate typedef struct sm_lid_port_block_s { 7357c478bd9Sstevel@tonic-gate ib_lid_t LID; /* base LID */ 7367c478bd9Sstevel@tonic-gate uint8_t Valid :1; /* this LID/Port pair is valid */ 7377c478bd9Sstevel@tonic-gate uint8_t LMC :3; /* the LMC of this lid */ 7387c478bd9Sstevel@tonic-gate uint8_t Reserved :4; 7397c478bd9Sstevel@tonic-gate uint8_t Port; /* port to forward entries to */ 7407c478bd9Sstevel@tonic-gate } sm_lid_port_block_t; 7417c478bd9Sstevel@tonic-gate 7427c478bd9Sstevel@tonic-gate #elif defined(_BIT_FIELDS_LTOH) 7437c478bd9Sstevel@tonic-gate 7447c478bd9Sstevel@tonic-gate typedef struct sm_lid_port_block_s { 7457c478bd9Sstevel@tonic-gate ib_lid_t LID; /* base LID */ 7467c478bd9Sstevel@tonic-gate uint8_t Reserved :4; 7477c478bd9Sstevel@tonic-gate uint8_t LMC :3; /* the LMC of this lid */ 7487c478bd9Sstevel@tonic-gate uint8_t Valid :1; /* this LID/Port pair is valid */ 7497c478bd9Sstevel@tonic-gate uint8_t Port; /* port to forward entries to */ 7507c478bd9Sstevel@tonic-gate } sm_lid_port_block_t; 7517c478bd9Sstevel@tonic-gate #else 7527c478bd9Sstevel@tonic-gate #error One of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined 7537c478bd9Sstevel@tonic-gate #endif /* _BIT_FIELDS_HTOL */ 7547c478bd9Sstevel@tonic-gate 7557c478bd9Sstevel@tonic-gate /* Random Forwarding Table: Table 141 */ 7567c478bd9Sstevel@tonic-gate typedef struct sm_random_forwarding_table_s { 7577c478bd9Sstevel@tonic-gate sm_lid_port_block_t LIDPortBlocks[16]; 7587c478bd9Sstevel@tonic-gate } sm_random_forwarding_table_t; 7597c478bd9Sstevel@tonic-gate 7607c478bd9Sstevel@tonic-gate /* Multicast Forwarding Table: Table 143 */ 7617c478bd9Sstevel@tonic-gate typedef struct sm_multicast_forwarding_table_s { 7627c478bd9Sstevel@tonic-gate uint16_t PortMaskBlocks[32]; 7637c478bd9Sstevel@tonic-gate } sm_multicast_forwarding_table_t; 7647c478bd9Sstevel@tonic-gate 7657c478bd9Sstevel@tonic-gate /* 7667c478bd9Sstevel@tonic-gate * SMInfo: Table 145 7677c478bd9Sstevel@tonic-gate * SMInfo struct is applicable to all end ports hosting an SM 7687c478bd9Sstevel@tonic-gate */ 7697c478bd9Sstevel@tonic-gate #if defined(_BIT_FIELDS_HTOL) 7707c478bd9Sstevel@tonic-gate typedef struct sm_sminfo_s { 7717c478bd9Sstevel@tonic-gate ib_guid_t GUID; /* Port GUID hosting the SM */ 7727c478bd9Sstevel@tonic-gate uint64_t SM_Key; /* Key of the SM */ 7737c478bd9Sstevel@tonic-gate uint32_t ActCount; /* heartbeat counter */ 7747c478bd9Sstevel@tonic-gate uint8_t Priority :4; /* priority */ 7757c478bd9Sstevel@tonic-gate uint8_t SMState :4; /* SM's state */ 7767c478bd9Sstevel@tonic-gate } sm_sminfo_t; 7777c478bd9Sstevel@tonic-gate 7787c478bd9Sstevel@tonic-gate #elif defined(_BIT_FIELDS_LTOH) 7797c478bd9Sstevel@tonic-gate 7807c478bd9Sstevel@tonic-gate typedef struct sm_sminfo_s { 7817c478bd9Sstevel@tonic-gate ib_guid_t GUID; /* Port GUID hosting the SM */ 7827c478bd9Sstevel@tonic-gate uint64_t SM_Key; /* Key of the SM */ 7837c478bd9Sstevel@tonic-gate uint32_t ActCount; /* heartbeat counter */ 7847c478bd9Sstevel@tonic-gate uint8_t SMState :4; /* SM's state */ 7857c478bd9Sstevel@tonic-gate uint8_t Priority :4; /* priority */ 7867c478bd9Sstevel@tonic-gate } sm_sminfo_t; 7877c478bd9Sstevel@tonic-gate 7887c478bd9Sstevel@tonic-gate #else 7897c478bd9Sstevel@tonic-gate #error One of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined 7907c478bd9Sstevel@tonic-gate #endif /* _BIT_FIELDS_HTOL */ 7917c478bd9Sstevel@tonic-gate 7927c478bd9Sstevel@tonic-gate /* defines that go with the sminfo structure */ 7937c478bd9Sstevel@tonic-gate 7947c478bd9Sstevel@tonic-gate /* SMState Defines */ 7957c478bd9Sstevel@tonic-gate #define SM_SMSTATE_INACTIVE 0 7967c478bd9Sstevel@tonic-gate #define SM_SMSTATE_DISCOVERING 1 7977c478bd9Sstevel@tonic-gate #define SM_SMSTATE_STANDBY 2 7987c478bd9Sstevel@tonic-gate #define SM_SMSTATE_MASTER 3 7997c478bd9Sstevel@tonic-gate 8007c478bd9Sstevel@tonic-gate /* SMInfo Control Packets: Table 148 */ 8017c478bd9Sstevel@tonic-gate #define SM_SMINFO_AM_HANDOVER 1 8027c478bd9Sstevel@tonic-gate #define SM_SMINFO_AM_ACKNOWLEDGE 2 8037c478bd9Sstevel@tonic-gate #define SM_SMINFO_AM_DISABLE 3 8047c478bd9Sstevel@tonic-gate #define SM_SMINFO_AM_STANDBY 4 8057c478bd9Sstevel@tonic-gate #define SM_SMINFO_AM_DISCOVER 5 8067c478bd9Sstevel@tonic-gate 8077c478bd9Sstevel@tonic-gate /* attribute ID defines */ 8087c478bd9Sstevel@tonic-gate #define SM_NOTICE_ATTRID 0x02 8097c478bd9Sstevel@tonic-gate #define SM_NODEDESC_ATTRID 0x10 8107c478bd9Sstevel@tonic-gate #define SM_NODEINFO_ATTRID 0x11 8117c478bd9Sstevel@tonic-gate #define SM_SWITCHINFO_ATTRID 0x12 8127c478bd9Sstevel@tonic-gate #define SM_GUIDINFO_ATTRID 0x14 8137c478bd9Sstevel@tonic-gate #define SM_PORTINFO_ATTRID 0x15 8147c478bd9Sstevel@tonic-gate #define SM_PKEY_TABLE_ATTRID 0x16 8157c478bd9Sstevel@tonic-gate #define SM_SLTOVLTABLE_ATTRID 0x17 8167c478bd9Sstevel@tonic-gate #define SM_VLARBITRATION_ATTRID 0x18 8177c478bd9Sstevel@tonic-gate #define SM_LINEARFDB_ATTRID 0x19 8187c478bd9Sstevel@tonic-gate #define SM_RANDOMFDB_ATTRID 0x1A 8197c478bd9Sstevel@tonic-gate #define SM_MCASTFDB_ATTRID 0x1B 8207c478bd9Sstevel@tonic-gate #define SM_SMINFO_ATTRID 0x20 8217c478bd9Sstevel@tonic-gate #define SM_VENDORDIAG_ATTRID 0x30 8227c478bd9Sstevel@tonic-gate #define SM_LEDINFO_ATTRID 0x31 8237c478bd9Sstevel@tonic-gate 8247c478bd9Sstevel@tonic-gate /* VendorDiag: Table 146 */ 8257c478bd9Sstevel@tonic-gate typedef struct sm_vendor_diag_s { 8267c478bd9Sstevel@tonic-gate uint16_t NextIndex; /* next attr mod to get diag info */ 8277c478bd9Sstevel@tonic-gate uint8_t DiagData[62]; /* vendor specific diag info */ 8287c478bd9Sstevel@tonic-gate } sm_vendor_diag_t; 8297c478bd9Sstevel@tonic-gate 8307c478bd9Sstevel@tonic-gate /* LedInfo: Table 147 */ 8317c478bd9Sstevel@tonic-gate #if defined(_BIT_FIELDS_HTOL) 8327c478bd9Sstevel@tonic-gate typedef struct sm_ledinfo_s { 8337c478bd9Sstevel@tonic-gate uint32_t LedMask :1; /* 1 for LED on, 0 for off */ 8347c478bd9Sstevel@tonic-gate uint32_t Reserved :31; 8357c478bd9Sstevel@tonic-gate } sm_ledinfo_t; 8367c478bd9Sstevel@tonic-gate 8377c478bd9Sstevel@tonic-gate #elif defined(_BIT_FIELDS_LTOH) 8387c478bd9Sstevel@tonic-gate 8397c478bd9Sstevel@tonic-gate typedef struct sm_ledinfo_s { 8407c478bd9Sstevel@tonic-gate uint32_t Reserved :31; 8417c478bd9Sstevel@tonic-gate uint32_t LedMask :1; /* 1 for LED on, 0 for off */ 8427c478bd9Sstevel@tonic-gate } sm_ledinfo_t; 8437c478bd9Sstevel@tonic-gate 8447c478bd9Sstevel@tonic-gate #else 8457c478bd9Sstevel@tonic-gate #error One of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined 8467c478bd9Sstevel@tonic-gate #endif /* _BIT_FIELDS_HTOL */ 8477c478bd9Sstevel@tonic-gate 8487c478bd9Sstevel@tonic-gate /* LED Info Defines */ 8497c478bd9Sstevel@tonic-gate #define SM_LEDINFO_ON 0x1 8507c478bd9Sstevel@tonic-gate #define SM_LEDINFO_OFF 0x0 8517c478bd9Sstevel@tonic-gate 8527c478bd9Sstevel@tonic-gate #ifdef __cplusplus 8537c478bd9Sstevel@tonic-gate } 8547c478bd9Sstevel@tonic-gate #endif 8557c478bd9Sstevel@tonic-gate 8567c478bd9Sstevel@tonic-gate #endif /* _SYS_IB_MGT_SM_ATTR_H */ 857