[openib-general] CM callbacks

Sean Hefty mshefty at ichips.intel.com
Mon Jan 29 10:22:13 PST 2007


Eric Barton wrote:
> Is the following possible?
> 
> 1. I listen for connection requests.
> 
> 2. RDMA_CM_EVENT_CONNECT_REQUEST is delivered, I rdma_accept() successfully and
>    return from the callback.
> 
> 3. RDMA_CM_EVENT_DISCONNECTED is delivered.
> 
> Am I wrong to assume I can only get RDMA_CM_EVENT_DISCONNECTED after I've seen
> RDMA_CM_EVENT_ESTABLISHED?  I thought I'd get one of the other callbacks
> (e.g. RDMA_CM_EVENT_CONNECT_ERROR) if something went wrong before the
> ESTABLISHED callback.

This is possible.  To see why, we need to follow the IB CM protocol:

client		server
		listen
connect
send REQ
		recv REQ -> causes CONNECT_REQUEST
		accept
		send REP
recv REP
send RTU
		RTU wanders away and gets lost
ESTABLISHED
disconnect
send DREQ
		recv DREQ - DISCONNECTED event

 From the viewpoint of the client a connection was established, and data could 
have been transferred over the connection.

- Sean




More information about the general mailing list