[ofa-general] Re: [PATCH] iw cm conn sent destroy

Steve Wise swise at opengridcomputing.com
Thu Jul 3 13:44:17 PDT 2008


Pete Wyckoff wrote:
> sean.hefty at intel.com wrote on Thu, 03 Jul 2008 13:03 -0700:
>   
>>> That makes sense.  I couldn't find anyway to get that bit
>>> IWCM_F_CONNECT_WAIT cleared (without massive layering violations).
>>> Is there anything like rdma_give_up_on_the_connect() that works
>>> on the client side?  Am I expected just to wait for the transport
>>> layer to time out the connect?  I could imagine a Ctrl-C situation
>>> where immediate client-side cancellation is desired.
>>>       
>> From the perspective of the rdma_cm interface, rdma_destroy_id() is
>> intended to provide this functionality.
>>     
>
> That is a sensible approach.  The implementation in iwcm.c just
> passively waits for a connection to time out before allowing
> rdma_destroy_id() to complete.  Maybe I should look at adding a case
> in cma_cancel_operation() for CMA_CONNECT that calls into a
> device-specific function that can actively quit the connection.
>
> Or should this be a special case in iwcm's destroy_cm_id()?  Where
> a CONN_SENT state will bypass the check on IWCM_F_CONNECT_WAIT, and
> call into a device function that tries to cancel the connection
> attepmt first?
>
> 		-- Pete
>   

If we define a method that every iwarp provider supports to cancel a 
connect attempt, then we can do away with the IWCM_F_CONNECT_WAIT bit 
altogether and always cancel the operation instead.  For cxgb3, the 
connect request to the HW really cannot be canceled.  So the driver 
would have to keep its endpoint struct around until the HW finally posts 
the connect attempt results, but mark the endpoint as "no cm_id 
attached".  The if the connection succeeds, the driver will immediately 
reset it I guess...

Steve.




More information about the general mailing list