[ofw] ipoib patch - add support for another series of Mellanox guids.

Hal Rosenstock hrosenstock at xsigo.com
Sun Jun 29 17:18:18 PDT 2008


On Sun, 2008-06-29 at 15:49 +0300, Tzachi Dar wrote:
> Index: Q:/openib/trunk/ulp/ipoib/kernel/ipoib_xfr_mgr.h
> ===================================================================
> --- Q:/openib/trunk/ulp/ipoib/kernel/ipoib_xfr_mgr.h (revision 1301)
> +++ Q:/openib/trunk/ulp/ipoib/kernel/ipoib_xfr_mgr.h (working copy)
> @@ -207,21 +207,24 @@
>  {
>   const uint8_t *p_guid = (const uint8_t*)&port_guid;
>   uint32_t  low24;
> + net16_t   guid_middle;
>  
>   /* Port guid is in network byte order.  OUI is in lower 3 bytes. */
>   ASSERT( p_guid[0] == 0x00 && p_guid[1] == 0x02 && p_guid[2] ==
> 0xc9 );
>  
> - if( (port_guid & CL_HTON64( 0x000000ffff000000 )) !=
> -  CL_HTON64(0x0000000200000000))
> - {
> + guid_middle = (net16_t)((port_guid & CL_HTON64
> ( 0x000000ffff000000 )) >>24);
> +
> + if (guid_middle == 2) {
> +   p_mac_addr->addr[2] = 0xc9;
> + } else if (guid_middle == 3) {
> +   p_mac_addr->addr[2] = 0xca;

Am I understanding this correctly ? Does Mellanox now "own" OUI 0x2ca ?

-- Hal

> + } else {
>    return IB_INVALID_GUID;
>   }
> -
>   low24 = ((uint32_t)cl_ntoh64( port_guid ) & 0x00FFFFFF);
>  
>   p_mac_addr->addr[0] = p_guid[0];
>   p_mac_addr->addr[1] = p_guid[1];
> - p_mac_addr->addr[2] = p_guid[2];
>   p_mac_addr->addr[3] = (uint8_t)(low24 >> 16);
>   p_mac_addr->addr[4] = (uint8_t)(low24 >> 8);
>   p_mac_addr->addr[5] = (uint8_t)low24;
> 
> _______________________________________________
> ofw mailing list
> ofw at lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw




More information about the ofw mailing list