[openib-general] Incorrect endian in GUID comparison/SM maste r selection

Eitan Zahavi eitan at mellanox.co.il
Wed Feb 16 22:04:11 PST 2005


Thanks Brian

> 
> Per the IBA spec, the selection of a master SM is determined by the
> GUID (lowest wins).  When OpenSM does its comparison, it does not adjust
> for the endian of the host.  For our x86 systems, this means the
> comparison is based on the byte-swapped value of the GUID.  It looks
> like the patch below is in order.  Is that correct?
> 
> --- osm_sminfo_rcv.c    3 Feb 2005 19:33:39 -0000       1.2.2.3
> +++ osm_sminfo_rcv.c    16 Feb 2005 23:13:39 -0000
> @@ -173,7 +173,8 @@ __osm_sminfo_rcv_remote_sm_is_higher (
>      if( ib_sminfo_get_priority( p_remote_sm ) ==
>          p_rcv->p_subn->opt.sm_priority )
>      {
> -      if( p_remote_sm->guid < p_rcv->p_subn->sm_port_guid )
> +      if( cl_ntoh64( p_remote_sm->guid ) <
> +          cl_ntoh64( p_rcv->p_subn->sm_port_guid ) )
>        {
>          return( TRUE );
>        }
> 
> 
> 
> _______________________________________________
> openib-general mailing list
> openib-general at openib.org
> http://openib.org/mailman/listinfo/openib-general
> 
> To unsubscribe, please visit
http://openib.org/mailman/listinfo/openib-general
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20050217/9f294420/attachment.html>


More information about the general mailing list