[ofa-general] Re: OSM_DEFAULT_SM_KEY byte order

Hal Rosenstock hrosenstock at xsigo.com
Thu May 22 07:52:41 PDT 2008


Sasha,

On Thu, 2008-05-22 at 17:09 +0300, Sasha Khapyorsky wrote:
> Hi,
> 
> I noticed that OSM_DEFAULT_SM_KEY macro is defined and used in host byte
> order, this means it has different values on LE and BE machines (as
> result we could see some osmtest failures between x86 and G5). The fix
> could be trivial:

> diff --git a/opensm/include/opensm/osm_base.h b/opensm/include/opensm/osm_base.h
> index 62d472e..7cc2757 100644
> --- a/opensm/include/opensm/osm_base.h
> +++ b/opensm/include/opensm/osm_base.h
> @@ -117,7 +117,7 @@ BEGIN_C_DECLS
>  *
>  * SYNOPSIS
>  */
> -#define OSM_DEFAULT_SM_KEY 1
> +#define OSM_DEFAULT_SM_KEY CL_HTON64(1)
>  /********/
>  /****s* OpenSM: Base/OSM_DEFAULT_LMC
>  * NAME
> 
> 
> , but sort of backward compatibility (currently I know that
> OSM_DEFAULT_SM_KEY is used with 'osmtest' and 'saquery') could be lost.
> Is this so important? Ideas?

IMO yes, I think this breaks both backward compatibility and what was
actually observed from some other SMs during interop testing.

I agree it needs fixing but I think the proper thing is probably more
like:

#define OSM_DEFAULT_SM_KEY CL_HTON64(0x0100000000000000);

-- Hal

> Sasha




More information about the general mailing list