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), |