[openib-general] [PATCH] libibmad: Support MFT and Notice/Trap fields

Hal Rosenstock halr at voltaire.com
Mon Jul 10 14:32:46 PDT 2006


libibmad: Support MFT and Notice/Trap fields

Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
Signed-off-by: Hal Rosenstock <halr at voltaire.com>

Index: include/infiniband/mad.h
===================================================================
--- include/infiniband/mad.h	(revision 8361)
+++ include/infiniband/mad.h	(working copy)
@@ -152,6 +152,12 @@ enum GSI_ATTR_ID {
 	IB_GSI_ATTR_LAST,
 };
 
+enum TRAP_NUM_ID {
+	IB_TRAP_128,
+
+	IB_TRAP_LAST
+};
+
 #define IB_VENDOR_OPENIB_PING_CLASS	(IB_VENDOR_RANGE2_START_CLASS + 2)
 #define IB_VENDOR_OPENIB_SYSSTAT_CLASS	(IB_VENDOR_RANGE2_START_CLASS + 3)
 #define IB_OPENIB_OUI			(0x001405)
@@ -363,11 +369,28 @@ enum MAD_FIELDS {
 	IB_LINEAR_FORW_TBL_F,
 
 	/*
+	 * SwitchMulticastForwardingTable fields:
+	 */
+	IB_MULTICAST_FORW_TBL_F,
+
+	/*
 	 * NodeDescription fields:
 	 */
 	IB_NODE_DESC_F,
 
 	/*
+	 * Notice/Trap fields
+	 */
+	IB_NOTICE_IS_GENERIC_F,
+	IB_NOTICE_TYPE_F,
+	IB_NOTICE_PRODUCER_F,
+	IB_NOTICE_TRAP_NUMBER_F,
+	IB_NOTICE_ISSUER_LID_F,
+	IB_NOTICE_TOGGLE_F,
+	IB_NOTICE_COUNT_F,
+	IB_NOTICE_DATA_LID_F,
+
+	/*
 	 * GS Performance
 	 */
 	IB_PC_FIRST_F,
Index: src/fields.c
===================================================================
--- src/fields.c	(revision 8361)
+++ src/fields.c	(working copy)
@@ -203,6 +203,23 @@ ib_field_t ib_mad_f [] = {
 	[IB_LINEAR_FORW_TBL_F]		{0, 512, "LinearForwTbl", mad_dump_array},
 
 	/*
+	 * SwitchMulticastForwardingTable fields:
+	 */
+	[IB_MULTICAST_FORW_TBL_F]		{0, 512, "MulticastForwTbl", mad_dump_array},
+
+	/*
+	 * Notice/Trap fields
+	 */
+	[IB_NOTICE_IS_GENERIC_F]  	{BITSOFFS(0,1), "NoticeIsGeneric", mad_dump_uint},
+	[IB_NOTICE_TYPE_F]        	{BITSOFFS(1,7), "NoticeType", mad_dump_uint},
+	[IB_NOTICE_PRODUCER_F]    	{BITSOFFS(8,24), "NoticeProducerType", mad_dump_node_type},
+	[IB_NOTICE_TRAP_NUMBER_F] 	{BITSOFFS(32,16), "NoticeTrapNumber", mad_dump_uint},
+	[IB_NOTICE_ISSUER_LID_F]  	{BITSOFFS(48,16), "NoticeIssuerLID", mad_dump_uint},
+	[IB_NOTICE_TOGGLE_F]      	{BITSOFFS(64,1), "NoticeToggle", mad_dump_uint},
+	[IB_NOTICE_COUNT_F]       	{BITSOFFS(65,15), "NoticeCount", mad_dump_uint},
+	[IB_NOTICE_DATA_LID_F]    	{BITSOFFS(80,16), "NoticeDataLID", mad_dump_uint},
+
+	/*
 	 * NodeDescription fields:
 	 */
 	[IB_NODE_DESC_F]		{0, 64*8, "NodeDesc", mad_dump_string},







More information about the general mailing list