[ofa-general] missed cq event

Philip Frey1 PHF at zurich.ibm.com
Mon Jun 9 00:23:39 PDT 2008


> > what is the correct way to get completions from the CQ without missing 

> > any?
> > I am currently using two separate CQs for the SQ and for the RQ.
> > In pseudocode I do about the following to wait for a completion:
> >
> > ibv_get_cq_event(channel, &dst_cq, &ctx);        //blocking wait for 
> > CQ event
> > <-- EVENT -->
> > ibv_req_notify_cq(dst_cq, 0);                        // request event 
> > for next completion
> > ibv_poll_cq(dest_cq, 1, wc);                        // get the WC from 

> > the CQ
> > ibv_ack_cq_events(dst_cq, 1);                        // ack the event
> >

< snip >

> 
> you need to poll the cq until it is empty instead of just polling once.
> 
> 
> get_cq_event()
> req_notify_cq()
> do {
>     ne = poll_cq();
> } while (ne != 0);
> ack_cq_event()

But what if I am just interested in the next work completion? Wouldn't 
this mean
that I have to build a queue in my application, that can hold completions 
in which
I am not yet interested? It sounds like a replication of the completion 
queue to me.
I was more looking for a way to do the 'single poll' on the completion 
without copying
anything into another queue.

Many thanks,
 Philip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20080609/1dbd1765/attachment.html>


More information about the general mailing list