[openib-general] [PATCH] [MINOR] OpenSM/osm_helper: Add support for dump of SAInformInfoRecord
Hal Rosenstock
halr at voltaire.com
Mon Jul 3 10:04:47 PDT 2006
OpenSM/osm_helper: Add support for dump of SAInformInfoRecord
Signed-off-by: Hal Rosenstock <halr at voltaire.com>
Index: include/opensm/osm_helper.h
===================================================================
--- include/opensm/osm_helper.h (revision 8343)
+++ include/opensm/osm_helper.h (working copy)
@@ -265,6 +265,12 @@ osm_dump_inform_info(
IN const osm_log_level_t log_level );
void
+osm_dump_inform_info_record(
+ IN osm_log_t* const p_log,
+ IN const ib_inform_info_record_t* const p_iir,
+ IN const osm_log_level_t log_level );
+
+void
osm_dump_pkey_block(
IN osm_log_t* const p_log,
IN uint64_t port_guid,
Index: opensm/osm_helper.c
===================================================================
--- opensm/osm_helper.c (revision 8343)
+++ opensm/osm_helper.c (working copy)
@@ -1254,6 +1254,101 @@ osm_dump_inform_info(
/**********************************************************************
**********************************************************************/
void
+osm_dump_inform_info_record(
+ IN osm_log_t* const p_log,
+ IN const ib_inform_info_record_t* const p_iir,
+ IN const osm_log_level_t log_level )
+{
+ uint32_t qpn;
+ uint8_t resp_time_val;
+
+ ib_inform_info_get_qpn_resp_time(p_iir->inform_info.g_or_v.generic.qpn_resp_time_val,
+ &qpn, &resp_time_val);
+
+ if( osm_log_is_active( p_log, log_level ) )
+ {
+
+ ib_inform_info_get_qpn_resp_time(p_iir->inform_info.g_or_v.generic.qpn_resp_time_val,
+ &qpn, &resp_time_val);
+
+ if (p_iir->inform_info.is_generic)
+ {
+ osm_log( p_log, log_level,
+ "InformInfo Record dump:\n"
+ "\t\t\t\tRID\n"
+ "\t\t\t\tSubscriberGID...........0x%016" PRIx64 " : "
+ "0x%016" PRIx64 "\n"
+ "\t\t\t\tSubscriberEnum..........0x%X\n"
+ "\t\t\t\tInformInfo dump:\n"
+ "\t\t\t\tgid.....................0x%016" PRIx64 ",%016" PRIx64 "\n"
+ "\t\t\t\tlid_range_begin.........0x%X\n"
+ "\t\t\t\tlid_range_end...........0x%X\n"
+ "\t\t\t\tis_generic..............0x%X\n"
+ "\t\t\t\tsubscribe...............0x%X\n"
+ "\t\t\t\ttrap_type...............0x%X\n"
+ "\t\t\t\ttrap_num................%u\n"
+ "\t\t\t\tqpn.....................0x%06X\n"
+ "\t\t\t\tresp_time_val...........0x%X\n"
+ "\t\t\t\tnode_type...............0x%06X\n"
+ "",
+ cl_ntoh64( p_iir->subscriber_gid.unicast.prefix ),
+ cl_ntoh64( p_iir->subscriber_gid.unicast.interface_id ),
+ cl_ntoh16( p_iir->subscriber_enum ),
+ cl_ntoh64( p_iir->inform_info.gid.unicast.prefix ),
+ cl_ntoh64( p_iir->inform_info.gid.unicast.interface_id ),
+ cl_ntoh16( p_iir->inform_info.lid_range_begin ),
+ cl_ntoh16( p_iir->inform_info.lid_range_end ),
+ p_iir->inform_info.is_generic,
+ p_iir->inform_info.subscribe,
+ cl_ntoh16( p_iir->inform_info.trap_type ),
+ cl_ntoh16( p_iir->inform_info.g_or_v.generic.trap_num ),
+ cl_ntoh32(qpn),
+ resp_time_val,
+ cl_ntoh32(ib_inform_info_get_node_type( &p_iir->inform_info ))
+ );
+ }
+ else
+ {
+ osm_log( p_log, log_level,
+ "InformInfo Record dump:\n"
+ "\t\t\t\tInformInfo dump:\n"
+ "\t\t\t\tRID\n"
+ "\t\t\t\tSubscriberGID...........0x%016" PRIx64 " : "
+ "0x%016" PRIx64 "\n"
+ "\t\t\t\tSubscriberEnum..........0x%X\n"
+ "\t\t\t\tgid.....................0x%016" PRIx64 ",%016" PRIx64 "\n"
+ "\t\t\t\tlid_range_begin.........0x%X\n"
+ "\t\t\t\tlid_range_end...........0x%X\n"
+ "\t\t\t\tis_generic..............0x%X\n"
+ "\t\t\t\tsubscribe...............0x%X\n"
+ "\t\t\t\ttrap_type...............0x%X\n"
+ "\t\t\t\tdev_id..................0x%X\n"
+ "\t\t\t\tqpn.....................0x%06X\n"
+ "\t\t\t\tresp_time_val...........0x%X\n"
+ "\t\t\t\tvendor_id...............0x%06X\n"
+ "",
+ cl_ntoh64( p_iir->subscriber_gid.unicast.prefix ),
+ cl_ntoh64( p_iir->subscriber_gid.unicast.interface_id ),
+ cl_ntoh16( p_iir->subscriber_enum ),
+ cl_ntoh64( p_iir->inform_info.gid.unicast.prefix ),
+ cl_ntoh64( p_iir->inform_info.gid.unicast.interface_id ),
+ cl_ntoh16( p_iir->inform_info.lid_range_begin ),
+ cl_ntoh16( p_iir->inform_info.lid_range_end ),
+ p_iir->inform_info.is_generic,
+ p_iir->inform_info.subscribe,
+ cl_ntoh16( p_iir->inform_info.trap_type ),
+ cl_ntoh16( p_iir->inform_info.g_or_v.vend.dev_id ),
+ cl_ntoh32(qpn),
+ resp_time_val,
+ cl_ntoh32(ib_inform_info_get_node_type( &p_iir->inform_info ))
+ );
+ }
+ }
+}
+
+/**********************************************************************
+ **********************************************************************/
+void
osm_dump_link_record(
IN osm_log_t* const p_log,
IN const ib_link_record_t* const p_lr,
More information about the general
mailing list