[openib-general] is wc valid if ib_poll_cq() returns zero

Sean Hefty mshefty at ichips.intel.com
Fri Jul 14 11:17:50 PDT 2006


somenath wrote:
> just to make sure I conveyed the exact thing I meant, if I change
> the above code as follows:
> 
> while (ib_poll_cq(cq, 1, &wc) > 0) {
>      process completion();
> }
> rearm CQ;
> 
> then I just get notification once, and don't get any futher
> notifications...so I assume rearm CQ should be done even if
> ib_poll_cq() returns zero.

Hmm... what HCA cards and svn version are you using?  Mellanox cards generate 
new events if any completions remain on the CQ.  So, if ib_poll_cq() isn't 
finding any completions, then another event should be generated.  If 
ib_poll_cq() is returning a completion, then it sounds like there's a bug with 
ib_poll_cq() returning the wrong number of completions.

- Sean




More information about the general mailing list