[openib-general] [PATCH] OpenSM/osm_helper.c: In osm_dump_smp_dr_path, display DR LIDs only if DR SMP
Hal Rosenstock
halr at voltaire.com
Wed Dec 28 12:54:07 PST 2005
OpenSM/osm_helper.c: In osm_dump_smp_dr_path, display DR LIDs only if DR
SMP
Signed-off-by: Hal Rosenstock <halr at voltaire.com>
Index: osm_helper.c
===================================================================
--- osm_helper.c (revision 4645)
+++ osm_helper.c (working copy)
@@ -1457,9 +1457,7 @@ osm_dump_dr_smp(
"\t\t\t\tattr_id.................0x%X (%s)\n"
"\t\t\t\tresv....................0x%X\n"
"\t\t\t\tattr_mod................0x%X\n"
- "\t\t\t\tm_key...................0x%016" PRIx64 "\n"
- "\t\t\t\tdr_slid.................0x%X\n"
- "\t\t\t\tdr_dlid.................0x%X\n",
+ "\t\t\t\tm_key...................0x%016" PRIx64 "\n",
p_smp->hop_ptr,
p_smp->hop_count,
cl_ntoh64(p_smp->trans_id),
@@ -1467,14 +1465,20 @@ osm_dump_dr_smp(
ib_get_sm_attr_str( p_smp->attr_id ),
cl_ntoh16(p_smp->resv),
cl_ntoh32(p_smp->attr_mod),
- cl_ntoh64(p_smp->m_key),
- cl_ntoh16(p_smp->dr_slid),
- cl_ntoh16(p_smp->dr_dlid)
+ cl_ntoh64(p_smp->m_key)
);
strcat( buf, line );
if (p_smp->mgmt_class == IB_MCLASS_SUBN_DIR)
{
+ sprintf( line,
+ "\t\t\t\tdr_slid.................0x%X\n"
+ "\t\t\t\tdr_dlid.................0x%X\n",
+ cl_ntoh16(p_smp->dr_slid),
+ cl_ntoh16(p_smp->dr_dlid)
+ );
+ strcat( buf, line );
+
strcat( buf, "\n\t\t\t\tInitial path: " );
for( i = 0; i <= p_smp->hop_count; i++ )
@@ -1652,7 +1656,7 @@ osm_dump_smp_dr_path(
if( osm_log_is_active( p_log, log_level) )
{
- sprintf( buf, "Received a SMP on a %u hop path:"
+ sprintf( buf, "Received SMP on a %u hop path:"
"\n\t\t\t\tInitial path = ", p_smp->hop_count );
for( i = 0; i <= p_smp->hop_count; i++ )
More information about the general
mailing list