<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=US-ASCII">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2654.45">
<TITLE>RE: [openib-general] Incorrect endian in GUID comparison/SM master selection</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2>Thanks Brian</FONT>
</P>
<P><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> Per the IBA spec, the selection of a master SM is determined by the</FONT>
<BR><FONT SIZE=2>> GUID (lowest wins). When OpenSM does its comparison, it does not adjust</FONT>
<BR><FONT SIZE=2>> for the endian of the host. For our x86 systems, this means the</FONT>
<BR><FONT SIZE=2>> comparison is based on the byte-swapped value of the GUID. It looks</FONT>
<BR><FONT SIZE=2>> like the patch below is in order. Is that correct?</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> --- osm_sminfo_rcv.c 3 Feb 2005 19:33:39 -0000 1.2.2.3</FONT>
<BR><FONT SIZE=2>> +++ osm_sminfo_rcv.c 16 Feb 2005 23:13:39 -0000</FONT>
<BR><FONT SIZE=2>> @@ -173,7 +173,8 @@ __osm_sminfo_rcv_remote_sm_is_higher (</FONT>
<BR><FONT SIZE=2>> if( ib_sminfo_get_priority( p_remote_sm ) ==</FONT>
<BR><FONT SIZE=2>> p_rcv->p_subn->opt.sm_priority )</FONT>
<BR><FONT SIZE=2>> {</FONT>
<BR><FONT SIZE=2>> - if( p_remote_sm->guid < p_rcv->p_subn->sm_port_guid )</FONT>
<BR><FONT SIZE=2>> + if( cl_ntoh64( p_remote_sm->guid ) <</FONT>
<BR><FONT SIZE=2>> + cl_ntoh64( p_rcv->p_subn->sm_port_guid ) )</FONT>
<BR><FONT SIZE=2>> {</FONT>
<BR><FONT SIZE=2>> return( TRUE );</FONT>
<BR><FONT SIZE=2>> }</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> _______________________________________________</FONT>
<BR><FONT SIZE=2>> openib-general mailing list</FONT>
<BR><FONT SIZE=2>> openib-general@openib.org</FONT>
<BR><FONT SIZE=2>> <A HREF="http://openib.org/mailman/listinfo/openib-general" TARGET="_blank">http://openib.org/mailman/listinfo/openib-general</A></FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> To unsubscribe, please visit <A HREF="http://openib.org/mailman/listinfo/openib-general" TARGET="_blank">http://openib.org/mailman/listinfo/openib-general</A></FONT>
</P>
</BODY>
</HTML>