Andrzej Szeszo
2013-06-04 453bf5a3004107204e1858532a38b3e703e32995
components/open-fabrics/libibmad/patches/base.patch
@@ -565,7 +565,38 @@
 
 /* resolve.c */
 MAD_EXPORT int ib_resolve_smlid(ib_portid_t * sm_id, int timeout) DEPRECATED;
@@ -1036,6 +1524,10 @@
@@ -1021,6 +1509,7 @@
     mad_dump_linkwidth, mad_dump_linkwidthsup, mad_dump_linkwidthen,
     mad_dump_linkdowndefstate,
     mad_dump_linkspeed, mad_dump_linkspeedsup, mad_dump_linkspeeden,
+    mad_dump_linkspeedext, mad_dump_linkspeedextsup, mad_dump_linkspeedexten,
     mad_dump_portstate, mad_dump_portstates,
     mad_dump_physportstate, mad_dump_portcapmask,
     mad_dump_mtu, mad_dump_vlcap, mad_dump_opervls,
@@ -1029,7 +1518,21 @@
     mad_dump_switchinfo, mad_dump_perfcounters, mad_dump_perfcounters_ext,
     mad_dump_perfcounters_xmt_sl, mad_dump_perfcounters_rcv_sl,
     mad_dump_perfcounters_xmt_disc, mad_dump_perfcounters_rcv_err,
-    mad_dump_portsamples_control;
+    mad_dump_portsamples_control, mad_dump_port_ext_speeds_counters,
+    mad_dump_perfcounters_port_op_rcv_counters, mad_dump_perfcounters_port_flow_ctl_counters,
+    mad_dump_perfcounters_port_vl_op_packet, mad_dump_perfcounters_port_vl_op_data,
+    mad_dump_perfcounters_port_vl_xmit_flow_ctl_update_errors, mad_dump_perfcounters_port_vl_xmit_wait_counters,
+    mad_dump_perfcounters_sw_port_vl_congestion, mad_dump_perfcounters_rcv_con_ctrl,
+    mad_dump_perfcounters_sl_rcv_fecn, mad_dump_perfcounters_sl_rcv_becn,
+    mad_dump_perfcounters_xmit_con_ctrl, mad_dump_perfcounters_vl_xmit_time_cong,
+    mad_dump_mlnx_ext_port_info, mad_dump_cc_congestioninfo, mad_dump_cc_congestionkeyinfo,
+    mad_dump_cc_congestionlog, mad_dump_cc_congestionlogswitch,
+    mad_dump_cc_congestionlogentryswitch, mad_dump_cc_congestionlogca,
+    mad_dump_cc_congestionlogentryca, mad_dump_cc_switchcongestionsetting,
+    mad_dump_cc_switchportcongestionsettingelement, mad_dump_cc_cacongestionsetting,
+    mad_dump_cc_cacongestionentry, mad_dump_cc_congestioncontroltable,
+    mad_dump_cc_congestioncontroltableentry, mad_dump_cc_timestamp,
+    mad_dump_classportinfo, mad_dump_portsamples_result;
 MAD_EXPORT void mad_dump_fields(char *buf, int bufsz, void *val, int valsz,
             int start, int end);
@@ -1036,6 +1539,10 @@
 
 extern MAD_EXPORT int ibdebug;
 
@@ -576,7 +607,7 @@
 #if __BYTE_ORDER == __LITTLE_ENDIAN
 #ifndef ntohll
 static inline uint64_t ntohll(uint64_t x)
@@ -1063,6 +1555,9 @@
@@ -1063,6 +1570,9 @@
 }
 #endif
 #endif            /* __BYTE_ORDER == __BIG_ENDIAN */
@@ -586,7 +617,7 @@
 
 /* Misc. macros: */
 /** align value \a l to \a size (ceil) */
@@ -1069,14 +1564,14 @@
@@ -1069,14 +1579,14 @@
 #define ALIGN(l, size) (((l) + ((size) - 1)) / (size) * (size))
 
 /** printf style warning MACRO, includes name of function and pid */
@@ -621,7 +652,526 @@
diff -r -u /tmp/libibmad-1.3.7/src/fields.c libibmad-1.3.7/src/fields.c
--- /tmp/libibmad-1.3.7/src/fields.c   Wed Feb 16 02:12:53 2011
+++ libibmad-1.3.7/src/fields.c   Thu Feb 24 13:27:00 2011
@@ -514,7 +514,7 @@
@@ -452,21 +452,21 @@
    /*
     * PortXmitDiscardDetails fields
     */
-   {32, 16, "PortInactiveDiscards", mad_dump_uint},
-   {48, 16, "PortNeighborMTUDiscards", mad_dump_uint},
-   {64, 16, "PortSwLifetimeLimitDiscards", mad_dump_uint},
-   {80, 16, "PortSwHOQLifetimeLimitDiscards", mad_dump_uint},
+   {BITSOFFS(32, 16), "PortInactiveDiscards", mad_dump_uint},
+   {BITSOFFS(48, 16), "PortNeighborMTUDiscards", mad_dump_uint},
+   {BITSOFFS(64, 16), "PortSwLifetimeLimitDiscards", mad_dump_uint},
+   {BITSOFFS(80, 16), "PortSwHOQLifetimeLimitDiscards", mad_dump_uint},
    {0, 0},         /* IB_PC_XMT_DISC_LAST_F */
    /*
     * PortRcvErrorDetails fields
     */
-   {32, 16, "PortLocalPhysicalErrors", mad_dump_uint},
-   {48, 16, "PortMalformedPktErrors", mad_dump_uint},
-   {64, 16, "PortBufferOverrunErrors", mad_dump_uint},
-   {80, 16, "PortDLIDMappingErrors", mad_dump_uint},
-   {96, 16, "PortVLMappingErrors", mad_dump_uint},
-   {112, 16, "PortLoopingErrors", mad_dump_uint},
+   {BITSOFFS(32, 16), "PortLocalPhysicalErrors", mad_dump_uint},
+   {BITSOFFS(48, 16), "PortMalformedPktErrors", mad_dump_uint},
+   {BITSOFFS(64, 16), "PortBufferOverrunErrors", mad_dump_uint},
+   {BITSOFFS(80, 16), "PortDLIDMappingErrors", mad_dump_uint},
+   {BITSOFFS(96, 16), "PortVLMappingErrors", mad_dump_uint},
+   {BITSOFFS(112, 16), "PortLoopingErrors", mad_dump_uint},
    {0, 0},                 /* IB_PC_RCV_ERR_LAST_F */
    /*
@@ -485,25 +485,470 @@
    {160, 64, "VendorMask", mad_dump_hex},
    {224, 32, "SampleStart", mad_dump_uint},
    {256, 32, "SampleInterval", mad_dump_uint},
-   {288, 16, "Tag", mad_dump_hex},
-   {304, 16, "CounterSelect0", mad_dump_hex},
-   {320, 16, "CounterSelect1", mad_dump_hex},
-   {336, 16, "CounterSelect2", mad_dump_hex},
-   {352, 16, "CounterSelect3", mad_dump_hex},
-   {368, 16, "CounterSelect4", mad_dump_hex},
-   {384, 16, "CounterSelect5", mad_dump_hex},
-   {400, 16, "CounterSelect6", mad_dump_hex},
-   {416, 16, "CounterSelect7", mad_dump_hex},
-   {432, 16, "CounterSelect8", mad_dump_hex},
-   {448, 16, "CounterSelect9", mad_dump_hex},
-   {464, 16, "CounterSelect10", mad_dump_hex},
-   {480, 16, "CounterSelect11", mad_dump_hex},
-   {496, 16, "CounterSelect12", mad_dump_hex},
-   {512, 16, "CounterSelect13", mad_dump_hex},
-   {528, 16, "CounterSelect14", mad_dump_hex},
+   {BITSOFFS(288, 16), "Tag", mad_dump_hex},
+   {BITSOFFS(304, 16), "CounterSelect0", mad_dump_hex},
+   {BITSOFFS(320, 16), "CounterSelect1", mad_dump_hex},
+   {BITSOFFS(336, 16), "CounterSelect2", mad_dump_hex},
+   {BITSOFFS(352, 16), "CounterSelect3", mad_dump_hex},
+   {BITSOFFS(368, 16), "CounterSelect4", mad_dump_hex},
+   {BITSOFFS(384, 16), "CounterSelect5", mad_dump_hex},
+   {BITSOFFS(400, 16), "CounterSelect6", mad_dump_hex},
+   {BITSOFFS(416, 16), "CounterSelect7", mad_dump_hex},
+   {BITSOFFS(432, 16), "CounterSelect8", mad_dump_hex},
+   {BITSOFFS(448, 16), "CounterSelect9", mad_dump_hex},
+   {BITSOFFS(464, 16), "CounterSelect10", mad_dump_hex},
+   {BITSOFFS(480, 16), "CounterSelect11", mad_dump_hex},
+   {BITSOFFS(496, 16), "CounterSelect12", mad_dump_hex},
+   {BITSOFFS(512, 16), "CounterSelect13", mad_dump_hex},
+   {BITSOFFS(528, 16), "CounterSelect14", mad_dump_hex},
    {576, 64, "SamplesOnlyOptionMask", mad_dump_hex},
    {0, 0},         /* IB_PSC_LAST_F */
+   /* GUIDInfo fields */
+   {0, 64, "GUID0", mad_dump_hex},
+   {64, 64, "GUID1", mad_dump_hex},
+   {128, 64, "GUID2", mad_dump_hex},
+   {192, 64, "GUID3", mad_dump_hex},
+   {256, 64, "GUID4", mad_dump_hex},
+   {320, 64, "GUID5", mad_dump_hex},
+   {384, 64, "GUID6", mad_dump_hex},
+   {448, 64, "GUID7", mad_dump_hex},
+
+   /* GUID Info Record */
+   {BITSOFFS(0, 16), "Lid", mad_dump_uint},
+   {BITSOFFS(16, 8), "BlockNum", mad_dump_uint},
+   {64, 64, "Guid0", mad_dump_hex},
+   {128, 64, "Guid1", mad_dump_hex},
+   {192, 64, "Guid2", mad_dump_hex},
+   {256, 64, "Guid3", mad_dump_hex},
+   {320, 64, "Guid4", mad_dump_hex},
+   {384, 64, "Guid5", mad_dump_hex},
+   {448, 64, "Guid6", mad_dump_hex},
+   {512, 64, "Guid7", mad_dump_hex},
+
+   /*
+    * More PortInfo fields
+    */
+   {BITSOFFS(480, 16), "CapabilityMask2", mad_dump_hex},
+   {BITSOFFS(496, 4), "LinkSpeedExtActive", mad_dump_linkspeedext},
+   {BITSOFFS(500, 4), "LinkSpeedExtSupported", mad_dump_linkspeedextsup},
+   {BITSOFFS(507, 5), "LinkSpeedExtEnabled", mad_dump_linkspeedexten},
+   {0, 0},         /* IB_PORT_LINK_SPEED_EXT_LAST_F */
+
+   /*
+    * PortExtendedSpeedsCounters fields
+    */
+   {BITSOFFS(8, 8), "PortSelect", mad_dump_uint},
+   {64, 64, "CounterSelect", mad_dump_hex},
+   {BITSOFFS(128, 16), "SyncHeaderErrorCounter", mad_dump_uint},
+   {BITSOFFS(144, 16), "UnknownBlockCounter", mad_dump_uint},
+   {BITSOFFS(160, 16), "ErrorDetectionCounterLane0", mad_dump_uint},
+   {BITSOFFS(176, 16), "ErrorDetectionCounterLane1", mad_dump_uint},
+   {BITSOFFS(192, 16), "ErrorDetectionCounterLane2", mad_dump_uint},
+   {BITSOFFS(208, 16), "ErrorDetectionCounterLane3", mad_dump_uint},
+   {BITSOFFS(224, 16), "ErrorDetectionCounterLane4", mad_dump_uint},
+   {BITSOFFS(240, 16), "ErrorDetectionCounterLane5", mad_dump_uint},
+   {BITSOFFS(256, 16), "ErrorDetectionCounterLane6", mad_dump_uint},
+   {BITSOFFS(272, 16), "ErrorDetectionCounterLane7", mad_dump_uint},
+   {BITSOFFS(288, 16), "ErrorDetectionCounterLane8", mad_dump_uint},
+   {BITSOFFS(304, 16), "ErrorDetectionCounterLane9", mad_dump_uint},
+   {BITSOFFS(320, 16), "ErrorDetectionCounterLane10", mad_dump_uint},
+   {BITSOFFS(336, 16), "ErrorDetectionCounterLane11", mad_dump_uint},
+   {352, 32, "FECCorrectableBlockCtrLane0", mad_dump_uint},
+   {384, 32, "FECCorrectableBlockCtrLane1", mad_dump_uint},
+   {416, 32, "FECCorrectableBlockCtrLane2", mad_dump_uint},
+   {448, 32, "FECCorrectableBlockCtrLane3", mad_dump_uint},
+   {480, 32, "FECCorrectableBlockCtrLane4", mad_dump_uint},
+   {512, 32, "FECCorrectableBlockCtrLane5", mad_dump_uint},
+   {544, 32, "FECCorrectableBlockCtrLane6", mad_dump_uint},
+   {576, 32, "FECCorrectableBlockCtrLane7", mad_dump_uint},
+   {608, 32, "FECCorrectableBlockCtrLane8", mad_dump_uint},
+   {640, 32, "FECCorrectableBlockCtrLane9", mad_dump_uint},
+   {672, 32, "FECCorrectableBlockCtrLane10", mad_dump_uint},
+   {704, 32, "FECCorrectableBlockCtrLane11", mad_dump_uint},
+   {736, 32, "FECUncorrectableBlockCtrLane0", mad_dump_uint},
+   {768, 32, "FECUncorrectableBlockCtrLane1", mad_dump_uint},
+   {800, 32, "FECUncorrectableBlockCtrLane2", mad_dump_uint},
+   {832, 32, "FECUncorrectableBlockCtrLane3", mad_dump_uint},
+   {864, 32, "FECUncorrectableBlockCtrLane4", mad_dump_uint},
+   {896, 32, "FECUncorrectableBlockCtrLane5", mad_dump_uint},
+   {928, 32, "FECUncorrectableBlockCtrLane6", mad_dump_uint},
+   {960, 32, "FECUncorrectableBlockCtrLane7", mad_dump_uint},
+   {992, 32, "FECUncorrectableBlockCtrLane8", mad_dump_uint},
+   {1024, 32, "FECUncorrectableBlockCtrLane9", mad_dump_uint},
+   {1056, 32, "FECUncorrectableBlockCtrLane10", mad_dump_uint},
+   {1088, 32, "FECUncorrectableBlockCtrLane11", mad_dump_uint},
+   {0, 0},         /* IB_PESC_LAST_F */
+
+   /*
+    * PortOpRcvCounters fields
+    */
+   {32, 32, "PortOpRcvPkts", mad_dump_uint},
+   {64, 32, "PortOpRcvData", mad_dump_uint},
+   {0, 0},         /* IB_PC_PORT_OP_RCV_COUNTERS_LAST_F */
+
+   /*
+    * PortFlowCtlCounters fields
+    */
+   {32, 32, "PortXmitFlowPkts", mad_dump_uint},
+   {64, 32, "PortRcvFlowPkts", mad_dump_uint},
+   {0, 0},         /* IB_PC_PORT_FLOW_CTL_COUNTERS_LAST_F */
+
+   /*
+    * PortVLOpPackets fields
+    */
+   {BITSOFFS(32, 16), "PortVLOpPackets0", mad_dump_uint},
+   {BITSOFFS(48, 16), "PortVLOpPackets1", mad_dump_uint},
+   {BITSOFFS(64, 16), "PortVLOpPackets2", mad_dump_uint},
+   {BITSOFFS(80, 16), "PortVLOpPackets3", mad_dump_uint},
+   {BITSOFFS(96, 16), "PortVLOpPackets4", mad_dump_uint},
+   {BITSOFFS(112, 16), "PortVLOpPackets5", mad_dump_uint},
+   {BITSOFFS(128, 16), "PortVLOpPackets6", mad_dump_uint},
+   {BITSOFFS(144, 16), "PortVLOpPackets7", mad_dump_uint},
+   {BITSOFFS(160, 16), "PortVLOpPackets8", mad_dump_uint},
+   {BITSOFFS(176, 16), "PortVLOpPackets9", mad_dump_uint},
+   {BITSOFFS(192, 16), "PortVLOpPackets10", mad_dump_uint},
+   {BITSOFFS(208, 16), "PortVLOpPackets11", mad_dump_uint},
+   {BITSOFFS(224, 16), "PortVLOpPackets12", mad_dump_uint},
+   {BITSOFFS(240, 16), "PortVLOpPackets13", mad_dump_uint},
+   {BITSOFFS(256, 16), "PortVLOpPackets14", mad_dump_uint},
+   {BITSOFFS(272, 16), "PortVLOpPackets15", mad_dump_uint},
+   {0, 0},         /* IB_PC_PORT_VL_OP_PACKETS_LAST_F */
+
+   /*
+    * PortVLOpData fields
+    */
+   {32, 32, "PortVLOpData0", mad_dump_uint},
+   {64, 32, "PortVLOpData1", mad_dump_uint},
+   {96, 32, "PortVLOpData2", mad_dump_uint},
+   {128, 32, "PortVLOpData3", mad_dump_uint},
+   {160, 32, "PortVLOpData4", mad_dump_uint},
+   {192, 32, "PortVLOpData5", mad_dump_uint},
+   {224, 32, "PortVLOpData6", mad_dump_uint},
+   {256, 32, "PortVLOpData7", mad_dump_uint},
+   {288, 32, "PortVLOpData8", mad_dump_uint},
+   {320, 32, "PortVLOpData9", mad_dump_uint},
+   {352, 32, "PortVLOpData10", mad_dump_uint},
+   {384, 32, "PortVLOpData11", mad_dump_uint},
+   {416, 32, "PortVLOpData12", mad_dump_uint},
+   {448, 32, "PortVLOpData13", mad_dump_uint},
+   {480, 32, "PortVLOpData14", mad_dump_uint},
+   {512, 32, "PortVLOpData15", mad_dump_uint},
+   {0, 0},         /* IB_PC_PORT_VL_OP_DATA_LAST_F */
+
+   /*
+    * PortVLXmitFlowCtlUpdateErrors fields
+    */
+   {BITSOFFS(32, 2), "PortVLXmitFlowCtlUpdateErrors0", mad_dump_uint},
+   {BITSOFFS(34, 2), "PortVLXmitFlowCtlUpdateErrors1", mad_dump_uint},
+   {BITSOFFS(36, 2), "PortVLXmitFlowCtlUpdateErrors2", mad_dump_uint},
+   {BITSOFFS(38, 2), "PortVLXmitFlowCtlUpdateErrors3", mad_dump_uint},
+   {BITSOFFS(40, 2), "PortVLXmitFlowCtlUpdateErrors4", mad_dump_uint},
+   {BITSOFFS(42, 2), "PortVLXmitFlowCtlUpdateErrors5", mad_dump_uint},
+   {BITSOFFS(44, 2), "PortVLXmitFlowCtlUpdateErrors6", mad_dump_uint},
+   {BITSOFFS(46, 2), "PortVLXmitFlowCtlUpdateErrors7", mad_dump_uint},
+   {BITSOFFS(48, 2), "PortVLXmitFlowCtlUpdateErrors8", mad_dump_uint},
+   {BITSOFFS(50, 2), "PortVLXmitFlowCtlUpdateErrors9", mad_dump_uint},
+   {BITSOFFS(52, 2), "PortVLXmitFlowCtlUpdateErrors10", mad_dump_uint},
+   {BITSOFFS(54, 2), "PortVLXmitFlowCtlUpdateErrors11", mad_dump_uint},
+   {BITSOFFS(56, 2), "PortVLXmitFlowCtlUpdateErrors12", mad_dump_uint},
+   {BITSOFFS(58, 2), "PortVLXmitFlowCtlUpdateErrors13", mad_dump_uint},
+   {BITSOFFS(60, 2), "PortVLXmitFlowCtlUpdateErrors14", mad_dump_uint},
+   {BITSOFFS(62, 2), "PortVLXmitFlowCtlUpdateErrors15", mad_dump_uint},
+   {0, 0},         /* IB_PC_PORT_VL_XMIT_FLOW_CTL_UPDATE_ERRORS_LAST_F */
+
+   /*
+    * PortVLXmitWaitCounters fields
+    */
+   {BITSOFFS(32, 16), "PortVLXmitWait0", mad_dump_uint},
+   {BITSOFFS(48, 16), "PortVLXmitWait1", mad_dump_uint},
+   {BITSOFFS(64, 16), "PortVLXmitWait2", mad_dump_uint},
+   {BITSOFFS(80, 16), "PortVLXmitWait3", mad_dump_uint},
+   {BITSOFFS(96, 16), "PortVLXmitWait4", mad_dump_uint},
+   {BITSOFFS(112, 16), "PortVLXmitWait5", mad_dump_uint},
+   {BITSOFFS(128, 16), "PortVLXmitWait6", mad_dump_uint},
+   {BITSOFFS(144, 16), "PortVLXmitWait7", mad_dump_uint},
+   {BITSOFFS(160, 16), "PortVLXmitWait8", mad_dump_uint},
+   {BITSOFFS(176, 16), "PortVLXmitWait9", mad_dump_uint},
+   {BITSOFFS(192, 16), "PortVLXmitWait10", mad_dump_uint},
+   {BITSOFFS(208, 16), "PortVLXmitWait11", mad_dump_uint},
+   {BITSOFFS(224, 16), "PortVLXmitWait12", mad_dump_uint},
+   {BITSOFFS(240, 16), "PortVLXmitWait13", mad_dump_uint},
+   {BITSOFFS(256, 16), "PortVLXmitWait14", mad_dump_uint},
+   {BITSOFFS(272, 16), "PortVLXmitWait15", mad_dump_uint},
+   {0, 0},         /* IB_PC_PORT_VL_XMIT_WAIT_COUNTERS_LAST_F */
+
+   /*
+    * SwPortVLCongestion fields
+    */
+   {BITSOFFS(32, 16), "SWPortVLCongestion0", mad_dump_uint},
+   {BITSOFFS(48, 16), "SWPortVLCongestion1", mad_dump_uint},
+   {BITSOFFS(64, 16), "SWPortVLCongestion2", mad_dump_uint},
+   {BITSOFFS(80, 16), "SWPortVLCongestion3", mad_dump_uint},
+   {BITSOFFS(96, 16), "SWPortVLCongestion4", mad_dump_uint},
+   {BITSOFFS(112, 16), "SWPortVLCongestion5", mad_dump_uint},
+   {BITSOFFS(128, 16), "SWPortVLCongestion6", mad_dump_uint},
+   {BITSOFFS(144, 16), "SWPortVLCongestion7", mad_dump_uint},
+   {BITSOFFS(160, 16), "SWPortVLCongestion8", mad_dump_uint},
+   {BITSOFFS(176, 16), "SWPortVLCongestion9", mad_dump_uint},
+   {BITSOFFS(192, 16), "SWPortVLCongestion10", mad_dump_uint},
+   {BITSOFFS(208, 16), "SWPortVLCongestion11", mad_dump_uint},
+   {BITSOFFS(224, 16), "SWPortVLCongestion12", mad_dump_uint},
+   {BITSOFFS(240, 16), "SWPortVLCongestion13", mad_dump_uint},
+   {BITSOFFS(256, 16), "SWPortVLCongestion14", mad_dump_uint},
+   {BITSOFFS(272, 16), "SWPortVLCongestion15", mad_dump_uint},
+   {0, 0},         /* IB_PC_SW_PORT_VL_CONGESTION_LAST_F */
+
+   /*
+    * PortRcvConCtrl fields
+    */
+   {32, 32, "PortPktRcvFECN", mad_dump_uint},
+   {64, 32, "PortPktRcvBECN", mad_dump_uint},
+   {0, 0},         /* IB_PC_RCV_CON_CTRL_LAST_F */
+
+   /*
+    * PortSLRcvFECN fields
+    */
+   {32, 32, "PortSLRcvFECN0", mad_dump_uint},
+   {64, 32, "PortSLRcvFECN1", mad_dump_uint},
+   {96, 32, "PortSLRcvFECN2", mad_dump_uint},
+   {128, 32, "PortSLRcvFECN3", mad_dump_uint},
+   {160, 32, "PortSLRcvFECN4", mad_dump_uint},
+   {192, 32, "PortSLRcvFECN5", mad_dump_uint},
+   {224, 32, "PortSLRcvFECN6", mad_dump_uint},
+   {256, 32, "PortSLRcvFECN7", mad_dump_uint},
+   {288, 32, "PortSLRcvFECN8", mad_dump_uint},
+   {320, 32, "PortSLRcvFECN9", mad_dump_uint},
+   {352, 32, "PortSLRcvFECN10", mad_dump_uint},
+   {384, 32, "PortSLRcvFECN11", mad_dump_uint},
+   {416, 32, "PortSLRcvFECN12", mad_dump_uint},
+   {448, 32, "PortSLRcvFECN13", mad_dump_uint},
+   {480, 32, "PortSLRcvFECN14", mad_dump_uint},
+   {512, 32, "PortSLRcvFECN15", mad_dump_uint},
+   {0, 0},         /* IB_PC_SL_RCV_FECN_LAST_F */
+
+   /*
+    * PortSLRcvBECN fields
+    */
+   {32, 32, "PortSLRcvBECN0", mad_dump_uint},
+   {64, 32, "PortSLRcvBECN1", mad_dump_uint},
+   {96, 32, "PortSLRcvBECN2", mad_dump_uint},
+   {128, 32, "PortSLRcvBECN3", mad_dump_uint},
+   {160, 32, "PortSLRcvBECN4", mad_dump_uint},
+   {192, 32, "PortSLRcvBECN5", mad_dump_uint},
+   {224, 32, "PortSLRcvBECN6", mad_dump_uint},
+   {256, 32, "PortSLRcvBECN7", mad_dump_uint},
+   {288, 32, "PortSLRcvBECN8", mad_dump_uint},
+   {320, 32, "PortSLRcvBECN9", mad_dump_uint},
+   {352, 32, "PortSLRcvBECN10", mad_dump_uint},
+   {384, 32, "PortSLRcvBECN11", mad_dump_uint},
+   {416, 32, "PortSLRcvBECN12", mad_dump_uint},
+   {448, 32, "PortSLRcvBECN13", mad_dump_uint},
+   {480, 32, "PortSLRcvBECN14", mad_dump_uint},
+   {512, 32, "PortSLRcvBECN15", mad_dump_uint},
+   {0, 0},         /* IB_PC_SL_RCV_BECN_LAST_F */
+
+   /*
+    * PortXmitConCtrl fields
+    */
+   {32, 32, "PortXmitTimeCong", mad_dump_uint},
+   {0, 0},         /* IB_PC_XMIT_CON_CTRL_LAST_F */
+
+   /*
+    * PortVLXmitTimeCong fields
+    */
+   {32, 32, "PortVLXmitTimeCong0", mad_dump_uint},
+   {64, 32, "PortVLXmitTimeCong1", mad_dump_uint},
+   {96, 32, "PortVLXmitTimeCong2", mad_dump_uint},
+   {128, 32, "PortVLXmitTimeCong3", mad_dump_uint},
+   {160, 32, "PortVLXmitTimeCong4", mad_dump_uint},
+   {192, 32, "PortVLXmitTimeCong5", mad_dump_uint},
+   {224, 32, "PortVLXmitTimeCong6", mad_dump_uint},
+   {256, 32, "PortVLXmitTimeCong7", mad_dump_uint},
+   {288, 32, "PortVLXmitTimeCong8", mad_dump_uint},
+   {320, 32, "PortVLXmitTimeCong9", mad_dump_uint},
+   {352, 32, "PortVLXmitTimeCong10", mad_dump_uint},
+   {384, 32, "PortVLXmitTimeCong11", mad_dump_uint},
+   {416, 32, "PortVLXmitTimeCong12", mad_dump_uint},
+   {448, 32, "PortVLXmitTimeCong13", mad_dump_uint},
+   {480, 32, "PortVLXmitTimeCong14", mad_dump_uint},
+   {0, 0},         /* IB_PC_VL_XMIT_TIME_CONG_LAST_F */
+
+   /*
+    * Mellanox ExtendedPortInfo fields
+    */
+   {BITSOFFS(24, 8), "StateChangeEnable", mad_dump_hex},
+   {BITSOFFS(56, 8), "LinkSpeedSupported", mad_dump_hex},
+   {BITSOFFS(88, 8), "LinkSpeedEnabled", mad_dump_hex},
+   {BITSOFFS(120, 8), "LinkSpeedActive", mad_dump_hex},
+   {0, 0},         /* IB_MLNX_EXT_PORT_LAST_F */
+
+   /*
+    * Congestion Control Mad fields
+    * bytes 24-31 of congestion control mad
+    */
+   {192, 64, "CC_Key", mad_dump_hex},   /* IB_CC_CCKEY_F */
+
+   /*
+    * CongestionInfo fields
+    */
+   {BITSOFFS(0, 16), "CongestionInfo", mad_dump_hex},
+   {BITSOFFS(16, 8), "ControlTableCap", mad_dump_uint},
+   {0, 0},         /* IB_CC_CONGESTION_INFO_LAST_F */
+
+   /*
+    * CongestionKeyInfo fields
+    */
+   {0, 64, "CC_Key", mad_dump_hex},
+   {BITSOFFS(64, 1), "CC_KeyProtectBit", mad_dump_uint},
+   {BITSOFFS(80, 16), "CC_KeyLeasePeriod", mad_dump_uint},
+   {BITSOFFS(96, 16), "CC_KeyViolations", mad_dump_uint},
+   {0, 0},         /* IB_CC_CONGESTION_KEY_INFO_LAST_F */
+
+   /*
+    * CongestionLog (common) fields
+    */
+   {BITSOFFS(0, 8), "LogType", mad_dump_uint},
+   {BITSOFFS(8, 8), "CongestionFlags", mad_dump_hex},
+   {0, 0},         /* IB_CC_CONGESTION_LOG_LAST_F */
+
+   /*
+    * CongestionLog (Switch) fields
+    */
+   {BITSOFFS(16, 16), "LogEventsCounter", mad_dump_uint},
+   {32, 32, "CurrentTimeStamp", mad_dump_uint},
+   {64, 256, "PortMap", mad_dump_array},
+   {0, 0},         /* IB_CC_CONGESTION_LOG_SWITCH_LAST_F */
+
+   /*
+    * CongestionLogEvent (Switch) fields
+    */
+   {BITSOFFS(0, 16), "SLID", mad_dump_uint},
+   {BITSOFFS(16, 16), "DLID", mad_dump_uint},
+   {BITSOFFS(32, 4), "SL", mad_dump_uint},
+   {64, 32, "Timestamp", mad_dump_uint},
+   {0, 0},         /* IB_CC_CONGESTION_LOG_ENTRY_SWITCH_LAST_F */
+
+   /*
+    * CongestionLog (CA) fields
+    */
+   {BITSOFFS(16, 16), "ThresholdEventCounter", mad_dump_uint},
+   {BITSOFFS(32, 16), "ThresholdCongestionEventMap", mad_dump_hex},
+   /* XXX: Q3/2010 errata lists offset 48, but that means field is not
+    * world aligned.  Assume will be aligned to offset 64 later.
+    */
+   {BITSOFFS(64, 32), "CurrentTimeStamp", mad_dump_uint},
+   {0, 0},         /* IB_CC_CONGESTION_LOG_CA_LAST_F */
+
+   /*
+    * CongestionLogEvent (CA) fields
+    */
+   {BITSOFFS(0, 24), "Local_QP_CN_Entry", mad_dump_uint},
+   {BITSOFFS(24, 4), "SL_CN_Entry", mad_dump_uint},
+   {BITSOFFS(28, 4), "Service_Type_CN_Entry", mad_dump_hex},
+   {BITSOFFS(32, 24), "Remote_QP_Number_CN_Entry", mad_dump_uint},
+   {BITSOFFS(64, 16), "Local_LID_CN", mad_dump_uint},
+   {BITSOFFS(80, 16), "Remote_LID_CN_Entry", mad_dump_uint},
+   {BITSOFFS(96, 32), "Timestamp_CN_Entry", mad_dump_uint},
+   {0, 0},         /* IB_CC_CONGESTION_LOG_ENTRY_CA_LAST_F */
+
+   /*
+    * SwitchCongestionSetting fields
+    */
+   {0, 32, "Control_Map", mad_dump_hex},
+   {32, 256, "Victim_Mask", mad_dump_array},
+   {288, 256, "Credit_Mask", mad_dump_array},
+   {BITSOFFS(544, 4), "Threshold", mad_dump_uint},
+   {BITSOFFS(552, 8), "Packet_Size", mad_dump_uint},
+   {BITSOFFS(560, 4), "CS_Threshold", mad_dump_uint},
+   {BITSOFFS(576, 16), "CS_ReturnDelay", mad_dump_hex}, /* TODO: CCT dump */
+   {BITSOFFS(592, 16), "Marking_Rate", mad_dump_uint},
+   {0, 0},         /* IB_CC_SWITCH_CONGESTION_SETTING_LAST_F */
+
+   /*
+    * SwitchPortCongestionSettingElement fields
+    */
+   {BITSOFFS(0, 1), "Valid", mad_dump_uint},
+   {BITSOFFS(1, 1), "Control_Type", mad_dump_uint},
+   {BITSOFFS(4, 4), "Threshold", mad_dump_hex},
+   {BITSOFFS(8, 8), "Packet_Size", mad_dump_uint},
+   {BITSOFFS(16, 16), "Cong_Parm_Marking_Rate", mad_dump_uint},
+   {0, 0},         /* IB_CC_SWITCH_PORT_CONGESTION_SETTING_ELEMENT_LAST_F */
+
+   /*
+    * CACongestionSetting fields
+    */
+   {BITSOFFS(0, 16), "Port_Control", mad_dump_hex},
+   {BITSOFFS(16, 16), "Control_Map", mad_dump_hex},
+   {0, 0},         /* IB_CC_CA_CONGESTION_SETTING_LAST_F */
+
+   /*
+    * CACongestionEntry fields
+    */
+   {BITSOFFS(0, 16), "CCTI_Timer", mad_dump_uint},
+   {BITSOFFS(16, 8), "CCTI_Increase", mad_dump_uint},
+   {BITSOFFS(24, 8), "Trigger_Threshold", mad_dump_uint},
+   {BITSOFFS(32, 8), "CCTI_Min", mad_dump_uint},
+   {0, 0},         /* IB_CC_CA_CONGESTION_SETTING_ENTRY_LAST_F */
+
+   /*
+    * CongestionControlTable fields
+    */
+   {BITSOFFS(0, 16), "CCTI_Limit", mad_dump_uint},
+   {0, 0},         /* IB_CC_CONGESTION_CONTROL_TABLE_LAST_F */
+
+   /*
+    * CongestionControlTableEntry fields
+    */
+   {BITSOFFS(0, 2), "CCT_Shift", mad_dump_uint},
+   {BITSOFFS(2, 14), "CCT_Multiplier", mad_dump_uint},
+   {0, 0},         /* IB_CC_CONGESTION_CONTROL_TABLE_ENTRY_LAST_F */
+
+   /*
+    * Timestamp fields
+    */
+   {0, 32, "Timestamp", mad_dump_uint},
+   {0, 0}, /* IB_CC_TIMESTAMP_LAST_F */
+
+   /* Node Record */
+   {BITSOFFS(0, 16), "Lid", mad_dump_uint},
+   {BITSOFFS(32, 8), "BaseVers", mad_dump_uint},
+   {BITSOFFS(40, 8), "ClassVers", mad_dump_uint},
+   {BITSOFFS(48, 8), "NodeType", mad_dump_node_type},
+   {BITSOFFS(56, 8), "NumPorts", mad_dump_uint},
+   {64, 64, "SystemGuid", mad_dump_hex},
+   {128, 64, "Guid", mad_dump_hex},
+   {192, 64, "PortGuid", mad_dump_hex},
+   {BITSOFFS(256, 16), "PartCap", mad_dump_uint},
+   {BITSOFFS(272, 16), "DevId", mad_dump_hex},
+   {288, 32, "Revision", mad_dump_hex},
+   {BITSOFFS(320, 8), "LocalPort", mad_dump_uint},
+   {BITSOFFS(328, 24), "VendorId", mad_dump_hex},
+   {352, 64 * 8, "NodeDesc", mad_dump_string},
+   {0, 0}, /* IB_SA_NR_LAST_F */
+
+   /*
+    * PortSamplesResult fields
+    */
+   {BITSOFFS(0, 16), "Tag", mad_dump_hex},
+   {BITSOFFS(30, 2), "SampleStatus", mad_dump_hex},
+   {32, 32, "Counter0", mad_dump_uint},
+   {64, 32, "Counter1", mad_dump_uint},
+   {96, 32, "Counter2", mad_dump_uint},
+   {128, 32, "Counter3", mad_dump_uint},
+   {160, 32, "Counter4", mad_dump_uint},
+   {192, 32, "Counter5", mad_dump_uint},
+   {224, 32, "Counter6", mad_dump_uint},
+   {256, 32, "Counter7", mad_dump_uint},
+   {288, 32, "Counter8", mad_dump_uint},
+   {320, 32, "Counter9", mad_dump_uint},
+   {352, 32, "Counter10", mad_dump_uint},
+   {384, 32, "Counter11", mad_dump_uint},
+   {416, 32, "Counter12", mad_dump_uint},
+   {448, 32, "Counter13", mad_dump_uint},
+   {480, 32, "Counter14", mad_dump_uint},
+   {0, 0},         /* IB_PSR_LAST_F */
+
    {0, 0}         /* IB_FIELD_LAST_ */
 };
@@ -514,7 +959,7 @@
    uint64_t nval;
 
    nval = htonll(val);
@@ -630,7 +1180,7 @@
           sizeof(uint64_t));
 }
 
@@ -521,7 +521,7 @@
@@ -521,7 +966,7 @@
 static uint64_t _get_field64(void *buf, int base_offs, const ib_field_t * f)
 {
    uint64_t val;
@@ -714,7 +1264,7 @@
    mad_set_field64(selfgid, 0, IB_GID_GUID_F, selfguid);
diff -r -u /tmp/libibmad-1.3.7/src/dump.c libibmad-1.3.7/src/dump.c
--- /tmp/libibmad-1.3.7/src/dump.c   Wed Feb 16 02:12:53 2011
+++ libibmad-1.3.7/src/dump.c   Thu Feb 24 11:27:11 2011
+++ libibmad-1.3.7/src/dump.c   Mon May 27 17:23:19 2013
@@ -46,12 +46,24 @@
 
 void mad_dump_int(char *buf, int bufsz, void *val, int valsz)
@@ -828,6 +1378,187 @@
       break;
    case 3:
       snprintf(buf, bufsz, "%06x", *(uint32_t *) val & 0xffffff);
@@ -308,6 +357,21 @@
    dump_linkspeed(buf, bufsz, speed);
 }
+void mad_dump_linkspeedext(char *buf, int bufsz, void *val, int valsz)
+{
+   return;
+}
+
+void mad_dump_linkspeedextsup(char *buf, int bufsz, void *val, int valsz)
+{
+   return;
+}
+
+void mad_dump_linkspeedexten(char *buf, int bufsz, void *val, int valsz)
+{
+   return;
+}
+
 void mad_dump_portstate(char *buf, int bufsz, void *val, int valsz)
 {
    int state = *(int *)val;
@@ -760,6 +824,158 @@
    _dump_fields(buf, bufsz, val, IB_PSC_OPCODE_F, IB_PSC_LAST_F);
 }
+void mad_dump_portsamples_result(char *buf, int bufsz, void *val, int valsz)
+{
+
+   return;
+}
+
+void mad_dump_port_ext_speeds_counters(char *buf, int bufsz, void *val, int valsz)
+{
+   return;
+}
+
+void mad_dump_perfcounters_port_op_rcv_counters(char *buf, int bufsz, void *val, int valsz)
+{
+   return;
+}
+
+void mad_dump_perfcounters_port_flow_ctl_counters(char *buf, int bufsz, void *val, int valsz)
+{
+   return;
+}
+
+void mad_dump_perfcounters_port_vl_op_packet(char *buf, int bufsz, void *val, int valsz)
+{
+   return;
+}
+
+void mad_dump_perfcounters_port_vl_op_data(char *buf, int bufsz, void *val, int valsz)
+{
+   return;
+}
+
+void mad_dump_perfcounters_port_vl_xmit_flow_ctl_update_errors(char *buf, int bufsz, void *val, int valsz)
+{
+   return;
+}
+
+void mad_dump_perfcounters_port_vl_xmit_wait_counters(char *buf, int bufsz, void *val, int valsz)
+{
+   return;
+}
+
+void mad_dump_perfcounters_sw_port_vl_congestion(char *buf, int bufsz, void *val, int valsz)
+{
+   return;
+}
+
+
+void mad_dump_perfcounters_rcv_con_ctrl(char *buf, int bufsz, void *val, int valsz)
+{
+   return;
+}
+
+void mad_dump_perfcounters_sl_rcv_fecn(char *buf, int bufsz, void *val, int valsz)
+{
+   return;
+}
+
+void mad_dump_perfcounters_sl_rcv_becn(char *buf, int bufsz, void *val, int valsz)
+{
+   return;
+}
+
+void mad_dump_perfcounters_xmit_con_ctrl(char *buf, int bufsz, void *val, int valsz)
+{
+   return;
+}
+
+void mad_dump_perfcounters_vl_xmit_time_cong(char *buf, int bufsz, void *val, int valsz)
+{
+   return;
+}
+
+void mad_dump_mlnx_ext_port_info(char *buf, int bufsz, void *val, int valsz)
+{
+   return;
+}
+
+void mad_dump_cc_congestioninfo(char *buf, int bufsz, void *val, int valsz)
+{
+   return;
+}
+
+void mad_dump_cc_congestionkeyinfo(char *buf, int bufsz, void *val, int valsz)
+{
+   return;
+}
+
+void mad_dump_cc_congestionlog(char *buf, int bufsz, void *val, int valsz)
+{
+   return;
+}
+
+void mad_dump_cc_congestionlogswitch(char *buf, int bufsz, void *val, int valsz)
+{
+   return;
+}
+
+void mad_dump_cc_congestionlogentryswitch(char *buf, int bufsz, void *val, int valsz)
+{
+   return;
+}
+
+void mad_dump_cc_congestionlogca(char *buf, int bufsz, void *val, int valsz)
+{
+   return;
+}
+
+void mad_dump_cc_congestionlogentryca(char *buf, int bufsz, void *val, int valsz)
+{
+   return;
+}
+
+void mad_dump_cc_switchcongestionsetting(char *buf, int bufsz, void *val, int valsz)
+{
+   return;
+}
+
+void mad_dump_cc_switchportcongestionsettingelement(char *buf, int bufsz, void *val, int valsz)
+{
+   return;
+}
+
+void mad_dump_cc_cacongestionsetting(char *buf, int bufsz, void *val, int valsz)
+{
+   return;
+}
+
+void mad_dump_cc_cacongestionentry(char *buf, int bufsz, void *val, int valsz)
+{
+   return;
+}
+
+void mad_dump_cc_congestioncontroltable(char *buf, int bufsz, void *val, int valsz)
+{
+   return;
+}
+
+void mad_dump_cc_congestioncontroltableentry(char *buf, int bufsz, void *val, int valsz)
+{
+   return;
+}
+
+void mad_dump_cc_timestamp(char *buf, int bufsz, void *val, int valsz)
+{
+   return;
+}
+
+void mad_dump_classportinfo(char *buf, int bufsz, void *val, int valsz)
+{
+   return;
+}
+
 void xdump(FILE * file, char *msg, void *p, int size)
 {
 #define HEX(x)  ((x) < 10 ? '0' + (x) : 'a' + ((x) -10))
diff -r -u /tmp/libibmad-1.3.7/src/sa.c libibmad-1.3.7/src/sa.c
--- /tmp/libibmad-1.3.7/src/sa.c   Wed Feb 16 02:12:53 2011
+++ libibmad-1.3.7/src/sa.c   Mon Oct  1 01:32:21 2012
@@ -898,7 +1629,7 @@
 }
diff -r -u /tmp/libibmad-1.3.7/src/libibmad.map libibmad-1.3.7/src/libibmad.map
--- /tmp/libibmad-1.3.7/src/libibmad.map   Wed Feb 16 02:12:53 2011
+++ libibmad-1.3.7/src/libibmad.map   Thu Mar  7 10:27:47 2013
+++ libibmad-1.3.7/src/libibmad.map   Thu Apr  4 12:02:51 2013
@@ -102,6 +102,7 @@
       ib_vendor_call_via;
       smp_query_via;
@@ -947,7 +1678,7 @@
       IBPANIC("too many classes %d requested", num_classes);
diff -r -u /tmp/libibmad-1.3.7/src/serv.c libibmad-1.3.7/src/serv.c
--- /tmp/libibmad-1.3.7/src/serv.c   Wed Feb 16 02:12:53 2011
+++ libibmad-1.3.7/src/serv.c   Thu Feb 24 11:27:14 2011
+++ libibmad-1.3.7/src/serv.c   Tue Mar  5 13:18:51 2013
@@ -38,6 +38,7 @@
 #include <stdio.h>
 #include <stdlib.h>