[openib-general] is wc valid if ib_poll_cq() returns zero
somenath
somenath at veritas.com
Fri Jul 14 10:39:04 PDT 2006
Rimmer, Todd wrote:
>>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
>
>
that's what I am doing, to be more specific:
rearm CQ;
while (ib_poll_cq(cq, 1, &wc) > 0) {
process completion();
}
is that what you meant?
>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.
>
>
in my case, poll_cq() always returns 0, so I never get a valid wc entry...
>Todd Rimmer
>
>
More information about the general
mailing list