Philip Frey1 wrote:

> > 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.

You can process each polled CQE individually inside the loop, yes? How is that different from getting notified of each CQE insertion and processing it then?


_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to