[openib-general] RE: [PATCH] OpenSM/osm_helper.c: In osm_dump_smp_dr_path, display DRLIDs only if DR SMP

Eitan Zahavi eitan at mellanox.co.il
Thu Dec 29 00:46:06 PST 2005


Hi Hal,

This is fine nit.

Eitan Zahavi
Design Technology Director
Mellanox Technologies LTD
Tel:+972-4-9097208
Fax:+972-4-9593245
P.O. Box 586 Yokneam 20692 ISRAEL


> -----Original Message-----
> From: Hal Rosenstock [mailto:halr at voltaire.com]
> Sent: Wednesday, December 28, 2005 10:54 PM
> To: Yael Kalka; Eitan Zahavi
> Cc: openib-general at openib.org
> Subject: [PATCH] OpenSM/osm_helper.c: In osm_dump_smp_dr_path, display
> DRLIDs only if DR SMP
> 
> 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