[openib-general] in need of a simple ulp
Sean Hefty
sean.hefty at intel.com
Fri May 20 21:23:58 PDT 2005
>> In this case you won't know what's on a cqe until you poll the
>> completion.
>
>The cmpost test only poll's on the completion on the client side. I'll
>change it to run ib_poll_cq() on the server also. Now I'm so confused
>I'm not sure why I wanted this in the first place though :)
Both the server and client sides should call the internal routine
poll_cqs(), which will remove the CQ entries.
>Another thing I've noticed is that I can't seem to get comp_handler() or
>event_handler() to run. You pass them into ib_create_cq(), but perhaps
>this isn't an implemented feature or some other things must be set for
>this to work.
Cmpost is brain-dead in this respect. The event_handler would be for things
like asynchronous errors, which cmpost doesn't care about.
The comp_handler is useful for most apps, but you need to arm the CQ for
events by calling ib_req_notify_cq() or ib_req_ncomp_notif() first. Once a
completion occurs, its comp_handler would be invoked, where an app would
typically call ib_poll_cq() - ib_req_notify_cq() - ib_poll_cq(). The second
poll operation is needed to avoid a race condition where a completion could
occur after the last poll, but before the CQ can be rearmed.
- Sean
More information about the general
mailing list