[ewg] Re: RFCv2: SRC API

Michael S. Tsirkin mst at dev.mellanox.co.il
Mon Aug 6 09:16:39 PDT 2007


> Quoting Tang, Changqing <changquing.tang at hp.com>:
> Subject: RE: RFCv2: SRC API
> 
>  
> 
> > > OK, I was wrong before, here is my question.
> > > 
> > > if remote node n has j2, j3, and j4, and j2 is the job to 
> > create qp2 
> > > and make connection with qp1 in j1.
> > > if j2 is done before j3 and j4, then we can not let j2 to 
> > destroy qp2, 
> > > because j3 and j4 are still communicating with j1. Since j2 
> > owns qp2, 
> > > j2 need to be the last job to cleanup.
> > > 
> > > Am I right ?
> > 
> > Correct. Is this clear from the text, or is some kind of 
> > additional clarification necessary?
> 
> It is not clear at the first read, so please add one sentence to clarify
> it.

Would something like this help?

Cleanup:
When job j1 does not need to communicate to any jobs on node n,
it disconnects qp1 from qp2, and asks j2 to destroy qp2.
+
+Note: both qp1 and qp2 must exist for the communication to take place.
+Thus, j2 should not destroy qp2 (and in particular, should not exit)
+until j1 has completed communication with node n and
+has asked j2 to disconnect.


> if j2 is the last job to cleanup, how can it know all other jobs on the
> same node has called 
> ibv_close_src_domain(), and it is time for itself to cleanup ?
> 
> Is this something upto application to do ?

No, this is handled automatically.
Have you seen this text?
 * ibv_close_src_domain - close an SRC domain
 * If this is the last reference, destroys the domain.
 
So, each job has a reference to the domain.
Once the last reference is gone, the domain is destroyed.


-- 
MST



More information about the ewg mailing list