components/open-fabrics/libibmad/patches/base.patch
changeset 1319 e0ba15fa5e97
parent 1216 bd892ba92960
child 1461 5ba0aa89a64a
equal deleted inserted replaced
1318:e26b2e3ea279 1319:e0ba15fa5e97
   563 +				 uint64_t guid, ib_portid_t * sm_id,
   563 +				 uint64_t guid, ib_portid_t * sm_id,
   564 +				 void *buf);
   564 +				 void *buf);
   565  
   565  
   566  /* resolve.c */
   566  /* resolve.c */
   567  MAD_EXPORT int ib_resolve_smlid(ib_portid_t * sm_id, int timeout) DEPRECATED;
   567  MAD_EXPORT int ib_resolve_smlid(ib_portid_t * sm_id, int timeout) DEPRECATED;
   568 @@ -1036,6 +1524,10 @@
   568 @@ -1021,6 +1509,7 @@
       
   569      mad_dump_linkwidth, mad_dump_linkwidthsup, mad_dump_linkwidthen,
       
   570      mad_dump_linkdowndefstate,
       
   571      mad_dump_linkspeed, mad_dump_linkspeedsup, mad_dump_linkspeeden,
       
   572 +    mad_dump_linkspeedext, mad_dump_linkspeedextsup, mad_dump_linkspeedexten,
       
   573      mad_dump_portstate, mad_dump_portstates,
       
   574      mad_dump_physportstate, mad_dump_portcapmask,
       
   575      mad_dump_mtu, mad_dump_vlcap, mad_dump_opervls,
       
   576 @@ -1029,7 +1518,21 @@
       
   577      mad_dump_switchinfo, mad_dump_perfcounters, mad_dump_perfcounters_ext,
       
   578      mad_dump_perfcounters_xmt_sl, mad_dump_perfcounters_rcv_sl,
       
   579      mad_dump_perfcounters_xmt_disc, mad_dump_perfcounters_rcv_err,
       
   580 -    mad_dump_portsamples_control;
       
   581 +    mad_dump_portsamples_control, mad_dump_port_ext_speeds_counters,
       
   582 +    mad_dump_perfcounters_port_op_rcv_counters, mad_dump_perfcounters_port_flow_ctl_counters,
       
   583 +    mad_dump_perfcounters_port_vl_op_packet, mad_dump_perfcounters_port_vl_op_data,
       
   584 +    mad_dump_perfcounters_port_vl_xmit_flow_ctl_update_errors, mad_dump_perfcounters_port_vl_xmit_wait_counters,
       
   585 +    mad_dump_perfcounters_sw_port_vl_congestion, mad_dump_perfcounters_rcv_con_ctrl,
       
   586 +    mad_dump_perfcounters_sl_rcv_fecn, mad_dump_perfcounters_sl_rcv_becn,
       
   587 +    mad_dump_perfcounters_xmit_con_ctrl, mad_dump_perfcounters_vl_xmit_time_cong,
       
   588 +    mad_dump_mlnx_ext_port_info, mad_dump_cc_congestioninfo, mad_dump_cc_congestionkeyinfo,
       
   589 +    mad_dump_cc_congestionlog, mad_dump_cc_congestionlogswitch,
       
   590 +    mad_dump_cc_congestionlogentryswitch, mad_dump_cc_congestionlogca,
       
   591 +    mad_dump_cc_congestionlogentryca, mad_dump_cc_switchcongestionsetting,
       
   592 +    mad_dump_cc_switchportcongestionsettingelement, mad_dump_cc_cacongestionsetting,
       
   593 +    mad_dump_cc_cacongestionentry, mad_dump_cc_congestioncontroltable,
       
   594 +    mad_dump_cc_congestioncontroltableentry, mad_dump_cc_timestamp,
       
   595 +    mad_dump_classportinfo, mad_dump_portsamples_result;
       
   596  
       
   597  MAD_EXPORT void mad_dump_fields(char *buf, int bufsz, void *val, int valsz,
       
   598  				int start, int end);
       
   599 @@ -1036,6 +1539,10 @@
   569  
   600  
   570  extern MAD_EXPORT int ibdebug;
   601  extern MAD_EXPORT int ibdebug;
   571  
   602  
   572 +#if !(defined(__SVR4) && defined(__sun))
   603 +#if !(defined(__SVR4) && defined(__sun))
   573 +#include <endian.h>
   604 +#include <endian.h>
   574 +#include <byteswap.h>
   605 +#include <byteswap.h>
   575 +
   606 +
   576  #if __BYTE_ORDER == __LITTLE_ENDIAN
   607  #if __BYTE_ORDER == __LITTLE_ENDIAN
   577  #ifndef ntohll
   608  #ifndef ntohll
   578  static inline uint64_t ntohll(uint64_t x)
   609  static inline uint64_t ntohll(uint64_t x)
   579 @@ -1063,6 +1555,9 @@
   610 @@ -1063,6 +1570,9 @@
   580  }
   611  }
   581  #endif
   612  #endif
   582  #endif				/* __BYTE_ORDER == __BIG_ENDIAN */
   613  #endif				/* __BYTE_ORDER == __BIG_ENDIAN */
   583 +#else
   614 +#else
   584 +#include <infiniband/ofa_solaris.h>
   615 +#include <infiniband/ofa_solaris.h>
   585 +#endif
   616 +#endif
   586  
   617  
   587  /* Misc. macros: */
   618  /* Misc. macros: */
   588  /** align value \a l to \a size (ceil) */
   619  /** align value \a l to \a size (ceil) */
   589 @@ -1069,14 +1564,14 @@
   620 @@ -1069,14 +1579,14 @@
   590  #define ALIGN(l, size) (((l) + ((size) - 1)) / (size) * (size))
   621  #define ALIGN(l, size) (((l) + ((size) - 1)) / (size) * (size))
   591  
   622  
   592  /** printf style warning MACRO, includes name of function and pid */
   623  /** printf style warning MACRO, includes name of function and pid */
   593 -#define IBWARN(fmt, ...) fprintf(stderr, "ibwarn: [%d] %s: " fmt "\n", getpid(), __func__, ## __VA_ARGS__)
   624 -#define IBWARN(fmt, ...) fprintf(stderr, "ibwarn: [%d] %s: " fmt "\n", getpid(), __func__, ## __VA_ARGS__)
   594 +#define IBWARN(fmt, ...) fprintf(stderr, "ibwarn: [%d] %s: " fmt "\n", (int)getpid(), __func__, ## __VA_ARGS__)
   625 +#define IBWARN(fmt, ...) fprintf(stderr, "ibwarn: [%d] %s: " fmt "\n", (int)getpid(), __func__, ## __VA_ARGS__)
   619  #include <arpa/inet.h>
   650  #include <arpa/inet.h>
   620  
   651  
   621 diff -r -u /tmp/libibmad-1.3.7/src/fields.c libibmad-1.3.7/src/fields.c
   652 diff -r -u /tmp/libibmad-1.3.7/src/fields.c libibmad-1.3.7/src/fields.c
   622 --- /tmp/libibmad-1.3.7/src/fields.c	Wed Feb 16 02:12:53 2011
   653 --- /tmp/libibmad-1.3.7/src/fields.c	Wed Feb 16 02:12:53 2011
   623 +++ libibmad-1.3.7/src/fields.c	Thu Feb 24 13:27:00 2011
   654 +++ libibmad-1.3.7/src/fields.c	Thu Feb 24 13:27:00 2011
   624 @@ -514,7 +514,7 @@
   655 @@ -452,21 +452,21 @@
       
   656  	/*
       
   657  	 * PortXmitDiscardDetails fields
       
   658  	 */
       
   659 -	{32, 16, "PortInactiveDiscards", mad_dump_uint},
       
   660 -	{48, 16, "PortNeighborMTUDiscards", mad_dump_uint},
       
   661 -	{64, 16, "PortSwLifetimeLimitDiscards", mad_dump_uint},
       
   662 -	{80, 16, "PortSwHOQLifetimeLimitDiscards", mad_dump_uint},
       
   663 +	{BITSOFFS(32, 16), "PortInactiveDiscards", mad_dump_uint},
       
   664 +	{BITSOFFS(48, 16), "PortNeighborMTUDiscards", mad_dump_uint},
       
   665 +	{BITSOFFS(64, 16), "PortSwLifetimeLimitDiscards", mad_dump_uint},
       
   666 +	{BITSOFFS(80, 16), "PortSwHOQLifetimeLimitDiscards", mad_dump_uint},
       
   667  	{0, 0},			/* IB_PC_XMT_DISC_LAST_F */
       
   668  
       
   669  	/*
       
   670  	 * PortRcvErrorDetails fields
       
   671  	 */
       
   672 -	{32, 16, "PortLocalPhysicalErrors", mad_dump_uint},
       
   673 -	{48, 16, "PortMalformedPktErrors", mad_dump_uint},
       
   674 -	{64, 16, "PortBufferOverrunErrors", mad_dump_uint},
       
   675 -	{80, 16, "PortDLIDMappingErrors", mad_dump_uint},
       
   676 -	{96, 16, "PortVLMappingErrors", mad_dump_uint},
       
   677 -	{112, 16, "PortLoopingErrors", mad_dump_uint},
       
   678 +	{BITSOFFS(32, 16), "PortLocalPhysicalErrors", mad_dump_uint},
       
   679 +	{BITSOFFS(48, 16), "PortMalformedPktErrors", mad_dump_uint},
       
   680 +	{BITSOFFS(64, 16), "PortBufferOverrunErrors", mad_dump_uint},
       
   681 +	{BITSOFFS(80, 16), "PortDLIDMappingErrors", mad_dump_uint},
       
   682 +	{BITSOFFS(96, 16), "PortVLMappingErrors", mad_dump_uint},
       
   683 +	{BITSOFFS(112, 16), "PortLoopingErrors", mad_dump_uint},
       
   684  	{0, 0},                 /* IB_PC_RCV_ERR_LAST_F */
       
   685  
       
   686  	/*
       
   687 @@ -485,25 +485,470 @@
       
   688  	{160, 64, "VendorMask", mad_dump_hex},
       
   689  	{224, 32, "SampleStart", mad_dump_uint},
       
   690  	{256, 32, "SampleInterval", mad_dump_uint},
       
   691 -	{288, 16, "Tag", mad_dump_hex},
       
   692 -	{304, 16, "CounterSelect0", mad_dump_hex},
       
   693 -	{320, 16, "CounterSelect1", mad_dump_hex},
       
   694 -	{336, 16, "CounterSelect2", mad_dump_hex},
       
   695 -	{352, 16, "CounterSelect3", mad_dump_hex},
       
   696 -	{368, 16, "CounterSelect4", mad_dump_hex},
       
   697 -	{384, 16, "CounterSelect5", mad_dump_hex},
       
   698 -	{400, 16, "CounterSelect6", mad_dump_hex},
       
   699 -	{416, 16, "CounterSelect7", mad_dump_hex},
       
   700 -	{432, 16, "CounterSelect8", mad_dump_hex},
       
   701 -	{448, 16, "CounterSelect9", mad_dump_hex},
       
   702 -	{464, 16, "CounterSelect10", mad_dump_hex},
       
   703 -	{480, 16, "CounterSelect11", mad_dump_hex},
       
   704 -	{496, 16, "CounterSelect12", mad_dump_hex},
       
   705 -	{512, 16, "CounterSelect13", mad_dump_hex},
       
   706 -	{528, 16, "CounterSelect14", mad_dump_hex},
       
   707 +	{BITSOFFS(288, 16), "Tag", mad_dump_hex},
       
   708 +	{BITSOFFS(304, 16), "CounterSelect0", mad_dump_hex},
       
   709 +	{BITSOFFS(320, 16), "CounterSelect1", mad_dump_hex},
       
   710 +	{BITSOFFS(336, 16), "CounterSelect2", mad_dump_hex},
       
   711 +	{BITSOFFS(352, 16), "CounterSelect3", mad_dump_hex},
       
   712 +	{BITSOFFS(368, 16), "CounterSelect4", mad_dump_hex},
       
   713 +	{BITSOFFS(384, 16), "CounterSelect5", mad_dump_hex},
       
   714 +	{BITSOFFS(400, 16), "CounterSelect6", mad_dump_hex},
       
   715 +	{BITSOFFS(416, 16), "CounterSelect7", mad_dump_hex},
       
   716 +	{BITSOFFS(432, 16), "CounterSelect8", mad_dump_hex},
       
   717 +	{BITSOFFS(448, 16), "CounterSelect9", mad_dump_hex},
       
   718 +	{BITSOFFS(464, 16), "CounterSelect10", mad_dump_hex},
       
   719 +	{BITSOFFS(480, 16), "CounterSelect11", mad_dump_hex},
       
   720 +	{BITSOFFS(496, 16), "CounterSelect12", mad_dump_hex},
       
   721 +	{BITSOFFS(512, 16), "CounterSelect13", mad_dump_hex},
       
   722 +	{BITSOFFS(528, 16), "CounterSelect14", mad_dump_hex},
       
   723  	{576, 64, "SamplesOnlyOptionMask", mad_dump_hex},
       
   724  	{0, 0},			/* IB_PSC_LAST_F */
       
   725  
       
   726 +	/* GUIDInfo fields */
       
   727 +	{0, 64, "GUID0", mad_dump_hex},
       
   728 +	{64, 64, "GUID1", mad_dump_hex},
       
   729 +	{128, 64, "GUID2", mad_dump_hex},
       
   730 +	{192, 64, "GUID3", mad_dump_hex},
       
   731 +	{256, 64, "GUID4", mad_dump_hex},
       
   732 +	{320, 64, "GUID5", mad_dump_hex},
       
   733 +	{384, 64, "GUID6", mad_dump_hex},
       
   734 +	{448, 64, "GUID7", mad_dump_hex},
       
   735 +
       
   736 +	/* GUID Info Record */
       
   737 +	{BITSOFFS(0, 16), "Lid", mad_dump_uint},
       
   738 +	{BITSOFFS(16, 8), "BlockNum", mad_dump_uint},
       
   739 +	{64, 64, "Guid0", mad_dump_hex},
       
   740 +	{128, 64, "Guid1", mad_dump_hex},
       
   741 +	{192, 64, "Guid2", mad_dump_hex},
       
   742 +	{256, 64, "Guid3", mad_dump_hex},
       
   743 +	{320, 64, "Guid4", mad_dump_hex},
       
   744 +	{384, 64, "Guid5", mad_dump_hex},
       
   745 +	{448, 64, "Guid6", mad_dump_hex},
       
   746 +	{512, 64, "Guid7", mad_dump_hex},
       
   747 +
       
   748 +	/*
       
   749 +	 * More PortInfo fields
       
   750 +	 */
       
   751 +	{BITSOFFS(480, 16), "CapabilityMask2", mad_dump_hex},
       
   752 +	{BITSOFFS(496, 4), "LinkSpeedExtActive", mad_dump_linkspeedext},
       
   753 +	{BITSOFFS(500, 4), "LinkSpeedExtSupported", mad_dump_linkspeedextsup},
       
   754 +	{BITSOFFS(507, 5), "LinkSpeedExtEnabled", mad_dump_linkspeedexten},
       
   755 +	{0, 0},			/* IB_PORT_LINK_SPEED_EXT_LAST_F */
       
   756 +
       
   757 +	/*
       
   758 +	 * PortExtendedSpeedsCounters fields
       
   759 +	 */
       
   760 +	{BITSOFFS(8, 8), "PortSelect", mad_dump_uint},
       
   761 +	{64, 64, "CounterSelect", mad_dump_hex},
       
   762 +	{BITSOFFS(128, 16), "SyncHeaderErrorCounter", mad_dump_uint},
       
   763 +	{BITSOFFS(144, 16), "UnknownBlockCounter", mad_dump_uint},
       
   764 +	{BITSOFFS(160, 16), "ErrorDetectionCounterLane0", mad_dump_uint},
       
   765 +	{BITSOFFS(176, 16), "ErrorDetectionCounterLane1", mad_dump_uint},
       
   766 +	{BITSOFFS(192, 16), "ErrorDetectionCounterLane2", mad_dump_uint},
       
   767 +	{BITSOFFS(208, 16), "ErrorDetectionCounterLane3", mad_dump_uint},
       
   768 +	{BITSOFFS(224, 16), "ErrorDetectionCounterLane4", mad_dump_uint},
       
   769 +	{BITSOFFS(240, 16), "ErrorDetectionCounterLane5", mad_dump_uint},
       
   770 +	{BITSOFFS(256, 16), "ErrorDetectionCounterLane6", mad_dump_uint},
       
   771 +	{BITSOFFS(272, 16), "ErrorDetectionCounterLane7", mad_dump_uint},
       
   772 +	{BITSOFFS(288, 16), "ErrorDetectionCounterLane8", mad_dump_uint},
       
   773 +	{BITSOFFS(304, 16), "ErrorDetectionCounterLane9", mad_dump_uint},
       
   774 +	{BITSOFFS(320, 16), "ErrorDetectionCounterLane10", mad_dump_uint},
       
   775 +	{BITSOFFS(336, 16), "ErrorDetectionCounterLane11", mad_dump_uint},
       
   776 +	{352, 32, "FECCorrectableBlockCtrLane0", mad_dump_uint},
       
   777 +	{384, 32, "FECCorrectableBlockCtrLane1", mad_dump_uint},
       
   778 +	{416, 32, "FECCorrectableBlockCtrLane2", mad_dump_uint},
       
   779 +	{448, 32, "FECCorrectableBlockCtrLane3", mad_dump_uint},
       
   780 +	{480, 32, "FECCorrectableBlockCtrLane4", mad_dump_uint},
       
   781 +	{512, 32, "FECCorrectableBlockCtrLane5", mad_dump_uint},
       
   782 +	{544, 32, "FECCorrectableBlockCtrLane6", mad_dump_uint},
       
   783 +	{576, 32, "FECCorrectableBlockCtrLane7", mad_dump_uint},
       
   784 +	{608, 32, "FECCorrectableBlockCtrLane8", mad_dump_uint},
       
   785 +	{640, 32, "FECCorrectableBlockCtrLane9", mad_dump_uint},
       
   786 +	{672, 32, "FECCorrectableBlockCtrLane10", mad_dump_uint},
       
   787 +	{704, 32, "FECCorrectableBlockCtrLane11", mad_dump_uint},
       
   788 +	{736, 32, "FECUncorrectableBlockCtrLane0", mad_dump_uint},
       
   789 +	{768, 32, "FECUncorrectableBlockCtrLane1", mad_dump_uint},
       
   790 +	{800, 32, "FECUncorrectableBlockCtrLane2", mad_dump_uint},
       
   791 +	{832, 32, "FECUncorrectableBlockCtrLane3", mad_dump_uint},
       
   792 +	{864, 32, "FECUncorrectableBlockCtrLane4", mad_dump_uint},
       
   793 +	{896, 32, "FECUncorrectableBlockCtrLane5", mad_dump_uint},
       
   794 +	{928, 32, "FECUncorrectableBlockCtrLane6", mad_dump_uint},
       
   795 +	{960, 32, "FECUncorrectableBlockCtrLane7", mad_dump_uint},
       
   796 +	{992, 32, "FECUncorrectableBlockCtrLane8", mad_dump_uint},
       
   797 +	{1024, 32, "FECUncorrectableBlockCtrLane9", mad_dump_uint},
       
   798 +	{1056, 32, "FECUncorrectableBlockCtrLane10", mad_dump_uint},
       
   799 +	{1088, 32, "FECUncorrectableBlockCtrLane11", mad_dump_uint},
       
   800 +	{0, 0},			/* IB_PESC_LAST_F */
       
   801 +
       
   802 +	/*
       
   803 +	 * PortOpRcvCounters fields
       
   804 +	 */
       
   805 +	{32, 32, "PortOpRcvPkts", mad_dump_uint},
       
   806 +	{64, 32, "PortOpRcvData", mad_dump_uint},
       
   807 +	{0, 0},			/* IB_PC_PORT_OP_RCV_COUNTERS_LAST_F */
       
   808 +
       
   809 +	/*
       
   810 +	 * PortFlowCtlCounters fields
       
   811 +	 */
       
   812 +	{32, 32, "PortXmitFlowPkts", mad_dump_uint},
       
   813 +	{64, 32, "PortRcvFlowPkts", mad_dump_uint},
       
   814 +	{0, 0},			/* IB_PC_PORT_FLOW_CTL_COUNTERS_LAST_F */
       
   815 +
       
   816 +	/*
       
   817 +	 * PortVLOpPackets fields
       
   818 +	 */
       
   819 +	{BITSOFFS(32, 16), "PortVLOpPackets0", mad_dump_uint},
       
   820 +	{BITSOFFS(48, 16), "PortVLOpPackets1", mad_dump_uint},
       
   821 +	{BITSOFFS(64, 16), "PortVLOpPackets2", mad_dump_uint},
       
   822 +	{BITSOFFS(80, 16), "PortVLOpPackets3", mad_dump_uint},
       
   823 +	{BITSOFFS(96, 16), "PortVLOpPackets4", mad_dump_uint},
       
   824 +	{BITSOFFS(112, 16), "PortVLOpPackets5", mad_dump_uint},
       
   825 +	{BITSOFFS(128, 16), "PortVLOpPackets6", mad_dump_uint},
       
   826 +	{BITSOFFS(144, 16), "PortVLOpPackets7", mad_dump_uint},
       
   827 +	{BITSOFFS(160, 16), "PortVLOpPackets8", mad_dump_uint},
       
   828 +	{BITSOFFS(176, 16), "PortVLOpPackets9", mad_dump_uint},
       
   829 +	{BITSOFFS(192, 16), "PortVLOpPackets10", mad_dump_uint},
       
   830 +	{BITSOFFS(208, 16), "PortVLOpPackets11", mad_dump_uint},
       
   831 +	{BITSOFFS(224, 16), "PortVLOpPackets12", mad_dump_uint},
       
   832 +	{BITSOFFS(240, 16), "PortVLOpPackets13", mad_dump_uint},
       
   833 +	{BITSOFFS(256, 16), "PortVLOpPackets14", mad_dump_uint},
       
   834 +	{BITSOFFS(272, 16), "PortVLOpPackets15", mad_dump_uint},
       
   835 +	{0, 0},			/* IB_PC_PORT_VL_OP_PACKETS_LAST_F */
       
   836 +
       
   837 +	/*
       
   838 +	 * PortVLOpData fields
       
   839 +	 */
       
   840 +	{32, 32, "PortVLOpData0", mad_dump_uint},
       
   841 +	{64, 32, "PortVLOpData1", mad_dump_uint},
       
   842 +	{96, 32, "PortVLOpData2", mad_dump_uint},
       
   843 +	{128, 32, "PortVLOpData3", mad_dump_uint},
       
   844 +	{160, 32, "PortVLOpData4", mad_dump_uint},
       
   845 +	{192, 32, "PortVLOpData5", mad_dump_uint},
       
   846 +	{224, 32, "PortVLOpData6", mad_dump_uint},
       
   847 +	{256, 32, "PortVLOpData7", mad_dump_uint},
       
   848 +	{288, 32, "PortVLOpData8", mad_dump_uint},
       
   849 +	{320, 32, "PortVLOpData9", mad_dump_uint},
       
   850 +	{352, 32, "PortVLOpData10", mad_dump_uint},
       
   851 +	{384, 32, "PortVLOpData11", mad_dump_uint},
       
   852 +	{416, 32, "PortVLOpData12", mad_dump_uint},
       
   853 +	{448, 32, "PortVLOpData13", mad_dump_uint},
       
   854 +	{480, 32, "PortVLOpData14", mad_dump_uint},
       
   855 +	{512, 32, "PortVLOpData15", mad_dump_uint},
       
   856 +	{0, 0},			/* IB_PC_PORT_VL_OP_DATA_LAST_F */
       
   857 +
       
   858 +	/*
       
   859 +	 * PortVLXmitFlowCtlUpdateErrors fields
       
   860 +	 */
       
   861 +	{BITSOFFS(32, 2), "PortVLXmitFlowCtlUpdateErrors0", mad_dump_uint},
       
   862 +	{BITSOFFS(34, 2), "PortVLXmitFlowCtlUpdateErrors1", mad_dump_uint},
       
   863 +	{BITSOFFS(36, 2), "PortVLXmitFlowCtlUpdateErrors2", mad_dump_uint},
       
   864 +	{BITSOFFS(38, 2), "PortVLXmitFlowCtlUpdateErrors3", mad_dump_uint},
       
   865 +	{BITSOFFS(40, 2), "PortVLXmitFlowCtlUpdateErrors4", mad_dump_uint},
       
   866 +	{BITSOFFS(42, 2), "PortVLXmitFlowCtlUpdateErrors5", mad_dump_uint},
       
   867 +	{BITSOFFS(44, 2), "PortVLXmitFlowCtlUpdateErrors6", mad_dump_uint},
       
   868 +	{BITSOFFS(46, 2), "PortVLXmitFlowCtlUpdateErrors7", mad_dump_uint},
       
   869 +	{BITSOFFS(48, 2), "PortVLXmitFlowCtlUpdateErrors8", mad_dump_uint},
       
   870 +	{BITSOFFS(50, 2), "PortVLXmitFlowCtlUpdateErrors9", mad_dump_uint},
       
   871 +	{BITSOFFS(52, 2), "PortVLXmitFlowCtlUpdateErrors10", mad_dump_uint},
       
   872 +	{BITSOFFS(54, 2), "PortVLXmitFlowCtlUpdateErrors11", mad_dump_uint},
       
   873 +	{BITSOFFS(56, 2), "PortVLXmitFlowCtlUpdateErrors12", mad_dump_uint},
       
   874 +	{BITSOFFS(58, 2), "PortVLXmitFlowCtlUpdateErrors13", mad_dump_uint},
       
   875 +	{BITSOFFS(60, 2), "PortVLXmitFlowCtlUpdateErrors14", mad_dump_uint},
       
   876 +	{BITSOFFS(62, 2), "PortVLXmitFlowCtlUpdateErrors15", mad_dump_uint},
       
   877 +	{0, 0},			/* IB_PC_PORT_VL_XMIT_FLOW_CTL_UPDATE_ERRORS_LAST_F */
       
   878 +
       
   879 +	/*
       
   880 +	 * PortVLXmitWaitCounters fields
       
   881 +	 */
       
   882 +	{BITSOFFS(32, 16), "PortVLXmitWait0", mad_dump_uint},
       
   883 +	{BITSOFFS(48, 16), "PortVLXmitWait1", mad_dump_uint},
       
   884 +	{BITSOFFS(64, 16), "PortVLXmitWait2", mad_dump_uint},
       
   885 +	{BITSOFFS(80, 16), "PortVLXmitWait3", mad_dump_uint},
       
   886 +	{BITSOFFS(96, 16), "PortVLXmitWait4", mad_dump_uint},
       
   887 +	{BITSOFFS(112, 16), "PortVLXmitWait5", mad_dump_uint},
       
   888 +	{BITSOFFS(128, 16), "PortVLXmitWait6", mad_dump_uint},
       
   889 +	{BITSOFFS(144, 16), "PortVLXmitWait7", mad_dump_uint},
       
   890 +	{BITSOFFS(160, 16), "PortVLXmitWait8", mad_dump_uint},
       
   891 +	{BITSOFFS(176, 16), "PortVLXmitWait9", mad_dump_uint},
       
   892 +	{BITSOFFS(192, 16), "PortVLXmitWait10", mad_dump_uint},
       
   893 +	{BITSOFFS(208, 16), "PortVLXmitWait11", mad_dump_uint},
       
   894 +	{BITSOFFS(224, 16), "PortVLXmitWait12", mad_dump_uint},
       
   895 +	{BITSOFFS(240, 16), "PortVLXmitWait13", mad_dump_uint},
       
   896 +	{BITSOFFS(256, 16), "PortVLXmitWait14", mad_dump_uint},
       
   897 +	{BITSOFFS(272, 16), "PortVLXmitWait15", mad_dump_uint},
       
   898 +	{0, 0},			/* IB_PC_PORT_VL_XMIT_WAIT_COUNTERS_LAST_F */
       
   899 +
       
   900 +	/*
       
   901 +	 * SwPortVLCongestion fields
       
   902 +	 */
       
   903 +	{BITSOFFS(32, 16), "SWPortVLCongestion0", mad_dump_uint},
       
   904 +	{BITSOFFS(48, 16), "SWPortVLCongestion1", mad_dump_uint},
       
   905 +	{BITSOFFS(64, 16), "SWPortVLCongestion2", mad_dump_uint},
       
   906 +	{BITSOFFS(80, 16), "SWPortVLCongestion3", mad_dump_uint},
       
   907 +	{BITSOFFS(96, 16), "SWPortVLCongestion4", mad_dump_uint},
       
   908 +	{BITSOFFS(112, 16), "SWPortVLCongestion5", mad_dump_uint},
       
   909 +	{BITSOFFS(128, 16), "SWPortVLCongestion6", mad_dump_uint},
       
   910 +	{BITSOFFS(144, 16), "SWPortVLCongestion7", mad_dump_uint},
       
   911 +	{BITSOFFS(160, 16), "SWPortVLCongestion8", mad_dump_uint},
       
   912 +	{BITSOFFS(176, 16), "SWPortVLCongestion9", mad_dump_uint},
       
   913 +	{BITSOFFS(192, 16), "SWPortVLCongestion10", mad_dump_uint},
       
   914 +	{BITSOFFS(208, 16), "SWPortVLCongestion11", mad_dump_uint},
       
   915 +	{BITSOFFS(224, 16), "SWPortVLCongestion12", mad_dump_uint},
       
   916 +	{BITSOFFS(240, 16), "SWPortVLCongestion13", mad_dump_uint},
       
   917 +	{BITSOFFS(256, 16), "SWPortVLCongestion14", mad_dump_uint},
       
   918 +	{BITSOFFS(272, 16), "SWPortVLCongestion15", mad_dump_uint},
       
   919 +	{0, 0},			/* IB_PC_SW_PORT_VL_CONGESTION_LAST_F */
       
   920 +
       
   921 +	/*
       
   922 +	 * PortRcvConCtrl fields
       
   923 +	 */
       
   924 +	{32, 32, "PortPktRcvFECN", mad_dump_uint},
       
   925 +	{64, 32, "PortPktRcvBECN", mad_dump_uint},
       
   926 +	{0, 0},			/* IB_PC_RCV_CON_CTRL_LAST_F */
       
   927 +
       
   928 +	/*
       
   929 +	 * PortSLRcvFECN fields
       
   930 +	 */
       
   931 +	{32, 32, "PortSLRcvFECN0", mad_dump_uint},
       
   932 +	{64, 32, "PortSLRcvFECN1", mad_dump_uint},
       
   933 +	{96, 32, "PortSLRcvFECN2", mad_dump_uint},
       
   934 +	{128, 32, "PortSLRcvFECN3", mad_dump_uint},
       
   935 +	{160, 32, "PortSLRcvFECN4", mad_dump_uint},
       
   936 +	{192, 32, "PortSLRcvFECN5", mad_dump_uint},
       
   937 +	{224, 32, "PortSLRcvFECN6", mad_dump_uint},
       
   938 +	{256, 32, "PortSLRcvFECN7", mad_dump_uint},
       
   939 +	{288, 32, "PortSLRcvFECN8", mad_dump_uint},
       
   940 +	{320, 32, "PortSLRcvFECN9", mad_dump_uint},
       
   941 +	{352, 32, "PortSLRcvFECN10", mad_dump_uint},
       
   942 +	{384, 32, "PortSLRcvFECN11", mad_dump_uint},
       
   943 +	{416, 32, "PortSLRcvFECN12", mad_dump_uint},
       
   944 +	{448, 32, "PortSLRcvFECN13", mad_dump_uint},
       
   945 +	{480, 32, "PortSLRcvFECN14", mad_dump_uint},
       
   946 +	{512, 32, "PortSLRcvFECN15", mad_dump_uint},
       
   947 +	{0, 0},			/* IB_PC_SL_RCV_FECN_LAST_F */
       
   948 +
       
   949 +	/*
       
   950 +	 * PortSLRcvBECN fields
       
   951 +	 */
       
   952 +	{32, 32, "PortSLRcvBECN0", mad_dump_uint},
       
   953 +	{64, 32, "PortSLRcvBECN1", mad_dump_uint},
       
   954 +	{96, 32, "PortSLRcvBECN2", mad_dump_uint},
       
   955 +	{128, 32, "PortSLRcvBECN3", mad_dump_uint},
       
   956 +	{160, 32, "PortSLRcvBECN4", mad_dump_uint},
       
   957 +	{192, 32, "PortSLRcvBECN5", mad_dump_uint},
       
   958 +	{224, 32, "PortSLRcvBECN6", mad_dump_uint},
       
   959 +	{256, 32, "PortSLRcvBECN7", mad_dump_uint},
       
   960 +	{288, 32, "PortSLRcvBECN8", mad_dump_uint},
       
   961 +	{320, 32, "PortSLRcvBECN9", mad_dump_uint},
       
   962 +	{352, 32, "PortSLRcvBECN10", mad_dump_uint},
       
   963 +	{384, 32, "PortSLRcvBECN11", mad_dump_uint},
       
   964 +	{416, 32, "PortSLRcvBECN12", mad_dump_uint},
       
   965 +	{448, 32, "PortSLRcvBECN13", mad_dump_uint},
       
   966 +	{480, 32, "PortSLRcvBECN14", mad_dump_uint},
       
   967 +	{512, 32, "PortSLRcvBECN15", mad_dump_uint},
       
   968 +	{0, 0},			/* IB_PC_SL_RCV_BECN_LAST_F */
       
   969 +
       
   970 +	/*
       
   971 +	 * PortXmitConCtrl fields
       
   972 +	 */
       
   973 +	{32, 32, "PortXmitTimeCong", mad_dump_uint},
       
   974 +	{0, 0},			/* IB_PC_XMIT_CON_CTRL_LAST_F */
       
   975 +
       
   976 +	/*
       
   977 +	 * PortVLXmitTimeCong fields
       
   978 +	 */
       
   979 +	{32, 32, "PortVLXmitTimeCong0", mad_dump_uint},
       
   980 +	{64, 32, "PortVLXmitTimeCong1", mad_dump_uint},
       
   981 +	{96, 32, "PortVLXmitTimeCong2", mad_dump_uint},
       
   982 +	{128, 32, "PortVLXmitTimeCong3", mad_dump_uint},
       
   983 +	{160, 32, "PortVLXmitTimeCong4", mad_dump_uint},
       
   984 +	{192, 32, "PortVLXmitTimeCong5", mad_dump_uint},
       
   985 +	{224, 32, "PortVLXmitTimeCong6", mad_dump_uint},
       
   986 +	{256, 32, "PortVLXmitTimeCong7", mad_dump_uint},
       
   987 +	{288, 32, "PortVLXmitTimeCong8", mad_dump_uint},
       
   988 +	{320, 32, "PortVLXmitTimeCong9", mad_dump_uint},
       
   989 +	{352, 32, "PortVLXmitTimeCong10", mad_dump_uint},
       
   990 +	{384, 32, "PortVLXmitTimeCong11", mad_dump_uint},
       
   991 +	{416, 32, "PortVLXmitTimeCong12", mad_dump_uint},
       
   992 +	{448, 32, "PortVLXmitTimeCong13", mad_dump_uint},
       
   993 +	{480, 32, "PortVLXmitTimeCong14", mad_dump_uint},
       
   994 +	{0, 0},			/* IB_PC_VL_XMIT_TIME_CONG_LAST_F */
       
   995 +
       
   996 +	/*
       
   997 +	 * Mellanox ExtendedPortInfo fields
       
   998 +	 */
       
   999 +	{BITSOFFS(24, 8), "StateChangeEnable", mad_dump_hex},
       
  1000 +	{BITSOFFS(56, 8), "LinkSpeedSupported", mad_dump_hex},
       
  1001 +	{BITSOFFS(88, 8), "LinkSpeedEnabled", mad_dump_hex},
       
  1002 +	{BITSOFFS(120, 8), "LinkSpeedActive", mad_dump_hex},
       
  1003 +	{0, 0},			/* IB_MLNX_EXT_PORT_LAST_F */
       
  1004 +
       
  1005 +	/*
       
  1006 +	 * Congestion Control Mad fields
       
  1007 +	 * bytes 24-31 of congestion control mad
       
  1008 +	 */
       
  1009 +	{192, 64, "CC_Key", mad_dump_hex},	/* IB_CC_CCKEY_F */
       
  1010 +
       
  1011 +	/*
       
  1012 +	 * CongestionInfo fields
       
  1013 +	 */
       
  1014 +	{BITSOFFS(0, 16), "CongestionInfo", mad_dump_hex},
       
  1015 +	{BITSOFFS(16, 8), "ControlTableCap", mad_dump_uint},
       
  1016 +	{0, 0},			/* IB_CC_CONGESTION_INFO_LAST_F */
       
  1017 +
       
  1018 +	/*
       
  1019 +	 * CongestionKeyInfo fields
       
  1020 +	 */
       
  1021 +	{0, 64, "CC_Key", mad_dump_hex},
       
  1022 +	{BITSOFFS(64, 1), "CC_KeyProtectBit", mad_dump_uint},
       
  1023 +	{BITSOFFS(80, 16), "CC_KeyLeasePeriod", mad_dump_uint},
       
  1024 +	{BITSOFFS(96, 16), "CC_KeyViolations", mad_dump_uint},
       
  1025 +	{0, 0},			/* IB_CC_CONGESTION_KEY_INFO_LAST_F */
       
  1026 +
       
  1027 +	/*
       
  1028 +	 * CongestionLog (common) fields
       
  1029 +	 */
       
  1030 +	{BITSOFFS(0, 8), "LogType", mad_dump_uint},
       
  1031 +	{BITSOFFS(8, 8), "CongestionFlags", mad_dump_hex},
       
  1032 +	{0, 0},			/* IB_CC_CONGESTION_LOG_LAST_F */
       
  1033 +
       
  1034 +	/*
       
  1035 +	 * CongestionLog (Switch) fields
       
  1036 +	 */
       
  1037 +	{BITSOFFS(16, 16), "LogEventsCounter", mad_dump_uint},
       
  1038 +	{32, 32, "CurrentTimeStamp", mad_dump_uint},
       
  1039 +	{64, 256, "PortMap", mad_dump_array},
       
  1040 +	{0, 0},			/* IB_CC_CONGESTION_LOG_SWITCH_LAST_F */
       
  1041 +
       
  1042 +	/*
       
  1043 +	 * CongestionLogEvent (Switch) fields
       
  1044 +	 */
       
  1045 +	{BITSOFFS(0, 16), "SLID", mad_dump_uint},
       
  1046 +	{BITSOFFS(16, 16), "DLID", mad_dump_uint},
       
  1047 +	{BITSOFFS(32, 4), "SL", mad_dump_uint},
       
  1048 +	{64, 32, "Timestamp", mad_dump_uint},
       
  1049 +	{0, 0},			/* IB_CC_CONGESTION_LOG_ENTRY_SWITCH_LAST_F */
       
  1050 +
       
  1051 +	/*
       
  1052 +	 * CongestionLog (CA) fields
       
  1053 +	 */
       
  1054 +	{BITSOFFS(16, 16), "ThresholdEventCounter", mad_dump_uint},
       
  1055 +	{BITSOFFS(32, 16), "ThresholdCongestionEventMap", mad_dump_hex},
       
  1056 +	/* XXX: Q3/2010 errata lists offset 48, but that means field is not
       
  1057 +	 * world aligned.  Assume will be aligned to offset 64 later.
       
  1058 +	 */
       
  1059 +	{BITSOFFS(64, 32), "CurrentTimeStamp", mad_dump_uint},
       
  1060 +	{0, 0},			/* IB_CC_CONGESTION_LOG_CA_LAST_F */
       
  1061 +
       
  1062 +	/*
       
  1063 +	 * CongestionLogEvent (CA) fields
       
  1064 +	 */
       
  1065 +	{BITSOFFS(0, 24), "Local_QP_CN_Entry", mad_dump_uint},
       
  1066 +	{BITSOFFS(24, 4), "SL_CN_Entry", mad_dump_uint},
       
  1067 +	{BITSOFFS(28, 4), "Service_Type_CN_Entry", mad_dump_hex},
       
  1068 +	{BITSOFFS(32, 24), "Remote_QP_Number_CN_Entry", mad_dump_uint},
       
  1069 +	{BITSOFFS(64, 16), "Local_LID_CN", mad_dump_uint},
       
  1070 +	{BITSOFFS(80, 16), "Remote_LID_CN_Entry", mad_dump_uint},
       
  1071 +	{BITSOFFS(96, 32), "Timestamp_CN_Entry", mad_dump_uint},
       
  1072 +	{0, 0},			/* IB_CC_CONGESTION_LOG_ENTRY_CA_LAST_F */
       
  1073 +
       
  1074 +	/*
       
  1075 +	 * SwitchCongestionSetting fields
       
  1076 +	 */
       
  1077 +	{0, 32, "Control_Map", mad_dump_hex},
       
  1078 +	{32, 256, "Victim_Mask", mad_dump_array},
       
  1079 +	{288, 256, "Credit_Mask", mad_dump_array},
       
  1080 +	{BITSOFFS(544, 4), "Threshold", mad_dump_uint},
       
  1081 +	{BITSOFFS(552, 8), "Packet_Size", mad_dump_uint},
       
  1082 +	{BITSOFFS(560, 4), "CS_Threshold", mad_dump_uint},
       
  1083 +	{BITSOFFS(576, 16), "CS_ReturnDelay", mad_dump_hex}, /* TODO: CCT dump */
       
  1084 +	{BITSOFFS(592, 16), "Marking_Rate", mad_dump_uint},
       
  1085 +	{0, 0},			/* IB_CC_SWITCH_CONGESTION_SETTING_LAST_F */
       
  1086 +
       
  1087 +	/*
       
  1088 +	 * SwitchPortCongestionSettingElement fields
       
  1089 +	 */
       
  1090 +	{BITSOFFS(0, 1), "Valid", mad_dump_uint},
       
  1091 +	{BITSOFFS(1, 1), "Control_Type", mad_dump_uint},
       
  1092 +	{BITSOFFS(4, 4), "Threshold", mad_dump_hex},
       
  1093 +	{BITSOFFS(8, 8), "Packet_Size", mad_dump_uint},
       
  1094 +	{BITSOFFS(16, 16), "Cong_Parm_Marking_Rate", mad_dump_uint},
       
  1095 +	{0, 0},			/* IB_CC_SWITCH_PORT_CONGESTION_SETTING_ELEMENT_LAST_F */
       
  1096 +
       
  1097 +	/*
       
  1098 +	 * CACongestionSetting fields
       
  1099 +	 */
       
  1100 +	{BITSOFFS(0, 16), "Port_Control", mad_dump_hex},
       
  1101 +	{BITSOFFS(16, 16), "Control_Map", mad_dump_hex},
       
  1102 +	{0, 0},			/* IB_CC_CA_CONGESTION_SETTING_LAST_F */
       
  1103 +
       
  1104 +	/*
       
  1105 +	 * CACongestionEntry fields
       
  1106 +	 */
       
  1107 +	{BITSOFFS(0, 16), "CCTI_Timer", mad_dump_uint},
       
  1108 +	{BITSOFFS(16, 8), "CCTI_Increase", mad_dump_uint},
       
  1109 +	{BITSOFFS(24, 8), "Trigger_Threshold", mad_dump_uint},
       
  1110 +	{BITSOFFS(32, 8), "CCTI_Min", mad_dump_uint},
       
  1111 +	{0, 0},			/* IB_CC_CA_CONGESTION_SETTING_ENTRY_LAST_F */
       
  1112 +
       
  1113 +	/*
       
  1114 +	 * CongestionControlTable fields
       
  1115 +	 */
       
  1116 +	{BITSOFFS(0, 16), "CCTI_Limit", mad_dump_uint},
       
  1117 +	{0, 0},			/* IB_CC_CONGESTION_CONTROL_TABLE_LAST_F */
       
  1118 +
       
  1119 +	/*
       
  1120 +	 * CongestionControlTableEntry fields
       
  1121 +	 */
       
  1122 +	{BITSOFFS(0, 2), "CCT_Shift", mad_dump_uint},
       
  1123 +	{BITSOFFS(2, 14), "CCT_Multiplier", mad_dump_uint},
       
  1124 +	{0, 0},			/* IB_CC_CONGESTION_CONTROL_TABLE_ENTRY_LAST_F */
       
  1125 +
       
  1126 +	/*
       
  1127 +	 * Timestamp fields
       
  1128 +	 */
       
  1129 +	{0, 32, "Timestamp", mad_dump_uint},
       
  1130 +	{0, 0}, /* IB_CC_TIMESTAMP_LAST_F */
       
  1131 +
       
  1132 +	/* Node Record */
       
  1133 +	{BITSOFFS(0, 16), "Lid", mad_dump_uint},
       
  1134 +	{BITSOFFS(32, 8), "BaseVers", mad_dump_uint},
       
  1135 +	{BITSOFFS(40, 8), "ClassVers", mad_dump_uint},
       
  1136 +	{BITSOFFS(48, 8), "NodeType", mad_dump_node_type},
       
  1137 +	{BITSOFFS(56, 8), "NumPorts", mad_dump_uint},
       
  1138 +	{64, 64, "SystemGuid", mad_dump_hex},
       
  1139 +	{128, 64, "Guid", mad_dump_hex},
       
  1140 +	{192, 64, "PortGuid", mad_dump_hex},
       
  1141 +	{BITSOFFS(256, 16), "PartCap", mad_dump_uint},
       
  1142 +	{BITSOFFS(272, 16), "DevId", mad_dump_hex},
       
  1143 +	{288, 32, "Revision", mad_dump_hex},
       
  1144 +	{BITSOFFS(320, 8), "LocalPort", mad_dump_uint},
       
  1145 +	{BITSOFFS(328, 24), "VendorId", mad_dump_hex},
       
  1146 +	{352, 64 * 8, "NodeDesc", mad_dump_string},
       
  1147 +	{0, 0}, /* IB_SA_NR_LAST_F */
       
  1148 +
       
  1149 +	/*
       
  1150 +	 * PortSamplesResult fields
       
  1151 +	 */
       
  1152 +	{BITSOFFS(0, 16), "Tag", mad_dump_hex},
       
  1153 +	{BITSOFFS(30, 2), "SampleStatus", mad_dump_hex},
       
  1154 +	{32, 32, "Counter0", mad_dump_uint},
       
  1155 +	{64, 32, "Counter1", mad_dump_uint},
       
  1156 +	{96, 32, "Counter2", mad_dump_uint},
       
  1157 +	{128, 32, "Counter3", mad_dump_uint},
       
  1158 +	{160, 32, "Counter4", mad_dump_uint},
       
  1159 +	{192, 32, "Counter5", mad_dump_uint},
       
  1160 +	{224, 32, "Counter6", mad_dump_uint},
       
  1161 +	{256, 32, "Counter7", mad_dump_uint},
       
  1162 +	{288, 32, "Counter8", mad_dump_uint},
       
  1163 +	{320, 32, "Counter9", mad_dump_uint},
       
  1164 +	{352, 32, "Counter10", mad_dump_uint},
       
  1165 +	{384, 32, "Counter11", mad_dump_uint},
       
  1166 +	{416, 32, "Counter12", mad_dump_uint},
       
  1167 +	{448, 32, "Counter13", mad_dump_uint},
       
  1168 +	{480, 32, "Counter14", mad_dump_uint},
       
  1169 +	{0, 0},			/* IB_PSR_LAST_F */
       
  1170 +
       
  1171  	{0, 0}			/* IB_FIELD_LAST_ */
       
  1172  
       
  1173  };
       
  1174 @@ -514,7 +959,7 @@
   625  	uint64_t nval;
  1175  	uint64_t nval;
   626  
  1176  
   627  	nval = htonll(val);
  1177  	nval = htonll(val);
   628 -	memcpy((char *)buf + base_offs + f->bitoffs / 8, &nval,
  1178 -	memcpy((char *)buf + base_offs + f->bitoffs / 8, &nval,
   629 +	memcpy( (void*)((char *)buf + base_offs + f->bitoffs / 8), (void *)&nval,
  1179 +	memcpy( (void*)((char *)buf + base_offs + f->bitoffs / 8), (void *)&nval,
   630  	       sizeof(uint64_t));
  1180  	       sizeof(uint64_t));
   631  }
  1181  }
   632  
  1182  
   633 @@ -521,7 +521,7 @@
  1183 @@ -521,7 +966,7 @@
   634  static uint64_t _get_field64(void *buf, int base_offs, const ib_field_t * f)
  1184  static uint64_t _get_field64(void *buf, int base_offs, const ib_field_t * f)
   635  {
  1185  {
   636  	uint64_t val;
  1186  	uint64_t val;
   637 -	memcpy(&val, ((char *)buf + base_offs + f->bitoffs / 8),
  1187 -	memcpy(&val, ((char *)buf + base_offs + f->bitoffs / 8),
   638 +	memcpy( (void *)&val, (void *)((char *)buf + base_offs + f->bitoffs / 8),
  1188 +	memcpy( (void *)&val, (void *)((char *)buf + base_offs + f->bitoffs / 8),
   712  	mad_decode_field(nodeinfo, IB_NODE_PORT_GUID_F, &selfguid);
  1262  	mad_decode_field(nodeinfo, IB_NODE_PORT_GUID_F, &selfguid);
   713  	mad_set_field64(selfgid, 0, IB_GID_PREFIX_F, IB_DEFAULT_SUBN_PREFIX);
  1263  	mad_set_field64(selfgid, 0, IB_GID_PREFIX_F, IB_DEFAULT_SUBN_PREFIX);
   714  	mad_set_field64(selfgid, 0, IB_GID_GUID_F, selfguid);
  1264  	mad_set_field64(selfgid, 0, IB_GID_GUID_F, selfguid);
   715 diff -r -u /tmp/libibmad-1.3.7/src/dump.c libibmad-1.3.7/src/dump.c
  1265 diff -r -u /tmp/libibmad-1.3.7/src/dump.c libibmad-1.3.7/src/dump.c
   716 --- /tmp/libibmad-1.3.7/src/dump.c	Wed Feb 16 02:12:53 2011
  1266 --- /tmp/libibmad-1.3.7/src/dump.c	Wed Feb 16 02:12:53 2011
   717 +++ libibmad-1.3.7/src/dump.c	Thu Feb 24 11:27:11 2011
  1267 +++ libibmad-1.3.7/src/dump.c	Mon May 27 17:23:19 2013
   718 @@ -46,12 +46,24 @@
  1268 @@ -46,12 +46,24 @@
   719  
  1269  
   720  void mad_dump_int(char *buf, int bufsz, void *val, int valsz)
  1270  void mad_dump_int(char *buf, int bufsz, void *val, int valsz)
   721  {
  1271  {
   722 +	/*
  1272 +	/*
   826 +#endif /* _BIG_ENDIAN */
  1376 +#endif /* _BIG_ENDIAN */
   827 +		snprintf(buf, bufsz, "%04x", *(uint16_t *) val & 0xffff);
  1377 +		snprintf(buf, bufsz, "%04x", *(uint16_t *) val & 0xffff);
   828  		break;
  1378  		break;
   829  	case 3:
  1379  	case 3:
   830  		snprintf(buf, bufsz, "%06x", *(uint32_t *) val & 0xffffff);
  1380  		snprintf(buf, bufsz, "%06x", *(uint32_t *) val & 0xffffff);
       
  1381 @@ -308,6 +357,21 @@
       
  1382  	dump_linkspeed(buf, bufsz, speed);
       
  1383  }
       
  1384  
       
  1385 +void mad_dump_linkspeedext(char *buf, int bufsz, void *val, int valsz)
       
  1386 +{
       
  1387 +	return;
       
  1388 +}
       
  1389 +
       
  1390 +void mad_dump_linkspeedextsup(char *buf, int bufsz, void *val, int valsz)
       
  1391 +{
       
  1392 +	return;
       
  1393 +}
       
  1394 +
       
  1395 +void mad_dump_linkspeedexten(char *buf, int bufsz, void *val, int valsz)
       
  1396 +{
       
  1397 +	return;
       
  1398 +}
       
  1399 +
       
  1400  void mad_dump_portstate(char *buf, int bufsz, void *val, int valsz)
       
  1401  {
       
  1402  	int state = *(int *)val;
       
  1403 @@ -760,6 +824,158 @@
       
  1404  	_dump_fields(buf, bufsz, val, IB_PSC_OPCODE_F, IB_PSC_LAST_F);
       
  1405  }
       
  1406  
       
  1407 +void mad_dump_portsamples_result(char *buf, int bufsz, void *val, int valsz)
       
  1408 +{
       
  1409 +
       
  1410 +	return;
       
  1411 +}
       
  1412 +
       
  1413 +void mad_dump_port_ext_speeds_counters(char *buf, int bufsz, void *val, int valsz)
       
  1414 +{
       
  1415 +	return;
       
  1416 +}
       
  1417 +
       
  1418 +void mad_dump_perfcounters_port_op_rcv_counters(char *buf, int bufsz, void *val, int valsz)
       
  1419 +{
       
  1420 +	return;
       
  1421 +}
       
  1422 +
       
  1423 +void mad_dump_perfcounters_port_flow_ctl_counters(char *buf, int bufsz, void *val, int valsz)
       
  1424 +{
       
  1425 +	return;
       
  1426 +}
       
  1427 +
       
  1428 +void mad_dump_perfcounters_port_vl_op_packet(char *buf, int bufsz, void *val, int valsz)
       
  1429 +{
       
  1430 +	return;
       
  1431 +}
       
  1432 +
       
  1433 +void mad_dump_perfcounters_port_vl_op_data(char *buf, int bufsz, void *val, int valsz)
       
  1434 +{
       
  1435 +	return;
       
  1436 +}
       
  1437 +
       
  1438 +void mad_dump_perfcounters_port_vl_xmit_flow_ctl_update_errors(char *buf, int bufsz, void *val, int valsz)
       
  1439 +{
       
  1440 +	return;
       
  1441 +}
       
  1442 +
       
  1443 +void mad_dump_perfcounters_port_vl_xmit_wait_counters(char *buf, int bufsz, void *val, int valsz)
       
  1444 +{
       
  1445 +	return;
       
  1446 +}
       
  1447 +
       
  1448 +void mad_dump_perfcounters_sw_port_vl_congestion(char *buf, int bufsz, void *val, int valsz)
       
  1449 +{
       
  1450 +	return;
       
  1451 +}
       
  1452 +
       
  1453 +
       
  1454 +void mad_dump_perfcounters_rcv_con_ctrl(char *buf, int bufsz, void *val, int valsz)
       
  1455 +{
       
  1456 +	return;
       
  1457 +}
       
  1458 +
       
  1459 +void mad_dump_perfcounters_sl_rcv_fecn(char *buf, int bufsz, void *val, int valsz)
       
  1460 +{
       
  1461 +	return;
       
  1462 +}
       
  1463 +
       
  1464 +void mad_dump_perfcounters_sl_rcv_becn(char *buf, int bufsz, void *val, int valsz)
       
  1465 +{
       
  1466 +	return;
       
  1467 +}
       
  1468 +
       
  1469 +void mad_dump_perfcounters_xmit_con_ctrl(char *buf, int bufsz, void *val, int valsz)
       
  1470 +{
       
  1471 +	return;
       
  1472 +}
       
  1473 +
       
  1474 +void mad_dump_perfcounters_vl_xmit_time_cong(char *buf, int bufsz, void *val, int valsz)
       
  1475 +{
       
  1476 +	return;
       
  1477 +}
       
  1478 +
       
  1479 +void mad_dump_mlnx_ext_port_info(char *buf, int bufsz, void *val, int valsz)
       
  1480 +{
       
  1481 +	return;
       
  1482 +}
       
  1483 +
       
  1484 +void mad_dump_cc_congestioninfo(char *buf, int bufsz, void *val, int valsz)
       
  1485 +{
       
  1486 +	return;
       
  1487 +}
       
  1488 +
       
  1489 +void mad_dump_cc_congestionkeyinfo(char *buf, int bufsz, void *val, int valsz)
       
  1490 +{
       
  1491 +	return;
       
  1492 +}
       
  1493 +
       
  1494 +void mad_dump_cc_congestionlog(char *buf, int bufsz, void *val, int valsz)
       
  1495 +{
       
  1496 +	return;
       
  1497 +}
       
  1498 +
       
  1499 +void mad_dump_cc_congestionlogswitch(char *buf, int bufsz, void *val, int valsz)
       
  1500 +{
       
  1501 +	return;
       
  1502 +}
       
  1503 +
       
  1504 +void mad_dump_cc_congestionlogentryswitch(char *buf, int bufsz, void *val, int valsz)
       
  1505 +{
       
  1506 +	return;
       
  1507 +}
       
  1508 +
       
  1509 +void mad_dump_cc_congestionlogca(char *buf, int bufsz, void *val, int valsz)
       
  1510 +{
       
  1511 +	return;
       
  1512 +}
       
  1513 +
       
  1514 +void mad_dump_cc_congestionlogentryca(char *buf, int bufsz, void *val, int valsz)
       
  1515 +{
       
  1516 +	return;
       
  1517 +}
       
  1518 +
       
  1519 +void mad_dump_cc_switchcongestionsetting(char *buf, int bufsz, void *val, int valsz)
       
  1520 +{
       
  1521 +	return;
       
  1522 +}
       
  1523 +
       
  1524 +void mad_dump_cc_switchportcongestionsettingelement(char *buf, int bufsz, void *val, int valsz)
       
  1525 +{
       
  1526 +	return;
       
  1527 +}
       
  1528 +
       
  1529 +void mad_dump_cc_cacongestionsetting(char *buf, int bufsz, void *val, int valsz)
       
  1530 +{
       
  1531 +	return;
       
  1532 +}
       
  1533 +
       
  1534 +void mad_dump_cc_cacongestionentry(char *buf, int bufsz, void *val, int valsz)
       
  1535 +{
       
  1536 +	return;
       
  1537 +}
       
  1538 +
       
  1539 +void mad_dump_cc_congestioncontroltable(char *buf, int bufsz, void *val, int valsz)
       
  1540 +{
       
  1541 +	return;
       
  1542 +}
       
  1543 +
       
  1544 +void mad_dump_cc_congestioncontroltableentry(char *buf, int bufsz, void *val, int valsz)
       
  1545 +{
       
  1546 +	return;
       
  1547 +}
       
  1548 +
       
  1549 +void mad_dump_cc_timestamp(char *buf, int bufsz, void *val, int valsz)
       
  1550 +{
       
  1551 +	return;
       
  1552 +}
       
  1553 +
       
  1554 +void mad_dump_classportinfo(char *buf, int bufsz, void *val, int valsz)
       
  1555 +{
       
  1556 +	return;
       
  1557 +}
       
  1558 +
       
  1559  void xdump(FILE * file, char *msg, void *p, int size)
       
  1560  {
       
  1561  #define HEX(x)  ((x) < 10 ? '0' + (x) : 'a' + ((x) -10))
   831 diff -r -u /tmp/libibmad-1.3.7/src/sa.c libibmad-1.3.7/src/sa.c
  1562 diff -r -u /tmp/libibmad-1.3.7/src/sa.c libibmad-1.3.7/src/sa.c
   832 --- /tmp/libibmad-1.3.7/src/sa.c	Wed Feb 16 02:12:53 2011
  1563 --- /tmp/libibmad-1.3.7/src/sa.c	Wed Feb 16 02:12:53 2011
   833 +++ libibmad-1.3.7/src/sa.c	Mon Oct  1 01:32:21 2012
  1564 +++ libibmad-1.3.7/src/sa.c	Mon Oct  1 01:32:21 2012
   834 @@ -38,6 +38,7 @@
  1565 @@ -38,6 +38,7 @@
   835  #include <stdio.h>
  1566  #include <stdio.h>
   896 +
  1627 +
   897 +	return 0;
  1628 +	return 0;
   898  }
  1629  }
   899 diff -r -u /tmp/libibmad-1.3.7/src/libibmad.map libibmad-1.3.7/src/libibmad.map
  1630 diff -r -u /tmp/libibmad-1.3.7/src/libibmad.map libibmad-1.3.7/src/libibmad.map
   900 --- /tmp/libibmad-1.3.7/src/libibmad.map	Wed Feb 16 02:12:53 2011
  1631 --- /tmp/libibmad-1.3.7/src/libibmad.map	Wed Feb 16 02:12:53 2011
   901 +++ libibmad-1.3.7/src/libibmad.map	Thu Mar  7 10:27:47 2013
  1632 +++ libibmad-1.3.7/src/libibmad.map	Thu Apr  4 12:02:51 2013
   902 @@ -102,6 +102,7 @@
  1633 @@ -102,6 +102,7 @@
   903  		ib_vendor_call_via;
  1634  		ib_vendor_call_via;
   904  		smp_query_via;
  1635  		smp_query_via;
   905  		smp_set_via;
  1636  		smp_set_via;
   906 +		ib_node_query_via;
  1637 +		ib_node_query_via;
   945  
  1676  
   946  	if (num_classes >= MAX_CLASS)
  1677  	if (num_classes >= MAX_CLASS)
   947  		IBPANIC("too many classes %d requested", num_classes);
  1678  		IBPANIC("too many classes %d requested", num_classes);
   948 diff -r -u /tmp/libibmad-1.3.7/src/serv.c libibmad-1.3.7/src/serv.c
  1679 diff -r -u /tmp/libibmad-1.3.7/src/serv.c libibmad-1.3.7/src/serv.c
   949 --- /tmp/libibmad-1.3.7/src/serv.c	Wed Feb 16 02:12:53 2011
  1680 --- /tmp/libibmad-1.3.7/src/serv.c	Wed Feb 16 02:12:53 2011
   950 +++ libibmad-1.3.7/src/serv.c	Thu Feb 24 11:27:14 2011
  1681 +++ libibmad-1.3.7/src/serv.c	Tue Mar  5 13:18:51 2013
   951 @@ -38,6 +38,7 @@
  1682 @@ -38,6 +38,7 @@
   952  #include <stdio.h>
  1683  #include <stdio.h>
   953  #include <stdlib.h>
  1684  #include <stdlib.h>
   954  #include <string.h>
  1685  #include <string.h>
   955 +#include <errno.h>
  1686 +#include <errno.h>