[ofw] [PATCH] Make WSD use new IBAT library

Sean Hefty sean.hefty at intel.com
Wed Jul 2 12:48:01 PDT 2008


>+       for(;;)
>        {
>-               IBSP_ERROR( ("ib_query failed (%d)\n", status) );
>-               goto error;
>-       }
>+               hr = IbatResolve(
>+                       p_src_addr,
>+                       p_dest_addr,
>+                       (IN6_ADDR*)&gids.src_gid,
>+                       (IN6_ADDR*)&gids.dest_gid,
>+                       &pkey
>+                       );
>
>-       if( query_context.status != IB_SUCCESS )
>-       {
>-               IBSP_PRINT(TRACE_LEVEL_INFORMATION, IBSP_DBG_HW,
>-                       ("query success, but no GUID for IP address %x (query
>status %d)\n",
>-                       ip_addr, query_context.status) );
>-               goto error;
>-       }
>+               if( hr != E_PENDING )
>+                       break;
>
>-       *port_guid = query_context.guid;
>+                       Sleep( 100 );
>+       }

There's got to be a better solution here than spinning in a loop sleeping.  Can
ibat move to an async interface?  Or at least make ibatresolve() synchronous?

- Sean




More information about the ofw mailing list