[openib-general] is wc valid if ib_poll_cq() returns zero
Rimmer, Todd
trimmer at silverstorm.com
Fri Jul 14 10:20:47 PDT 2006
> From: Sean Hefty
> somenath wrote:
> > 2. why is the io completion routine called when ib_poll_cq() returns
> > zero? does this kind of notification contain any information?
> > is there some error happening here? what are some possible problem
> areas?
> > any wild guess...?
>
> Can you clarify what's happening? Are you calling ib_poll_cq() from
your
> ib_comp_handler() and not finding a completion?
Be aware that an IB completion handler should be coded as:
while poll_cq returns a completion
process completion
rearm CQ
while poll_cq returns a completion
process completion
Per the IBTA spec, rearm CQ is not required to generate an event for
completions already on the CQ, just for newly arriving ones (Mellanox
HCAs will generate a completion event if any CQEs remain on the CQ).
Due to various race situations between the HCA and the software/ULP,
there are some valid cases where a completion event could occur after
poll_cq has already processed the completion.
Todd Rimmer
More information about the general
mailing list