[ofw] [PATCH] Make WSD use new IBAT library
Fab Tillier
ftillier at windows.microsoft.com
Wed Jul 2 12:52:02 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?
Making IBAT::Resolve synchronous would move the loop/sleep into it, which removes the option for the caller to process it asynchronously (or do something else in between calls).
The pending case doesn't happen often, except in very busy fabrics because IPoIB does a PR query to send the unicast response to an ARP request.
I think making IPoIB not do PR queries would help here, I'm going to test that theory.
-Fab
More information about the ofw
mailing list