Creating a thread is no problem. I notice that the queue data structures have pthread mutex locks and condition variables predefined; what is this for? Could I simply use pthread's synchronization primitives against these constructs? If so, are they already initialized during queue creation, or will I have to do that manually?

Getting back to ibv_get_cq_event(), what is it then that triggers a completion event?

And finally, with regard to ibv_req_notify_cq(), just what does the second parameter mean? The example programme passes a 0 value for solicited_only; this is in a section that is relying on events. I'm totally confused by what is meant regarding "only solicited for notification."

Thanks again,
Chris

On Mar 23, 2006, at 4:44 AM, Michael S. Tsirkin wrote:

Quoting r. Christopher C. Aycock <[EMAIL PROTECTED]>:
For example, is there any way to have IBverbs invoke a callback
function when an item arrives on the completion queue? The IBA spec
mentions a "Completion Event Handler"; is this what I'm looking for?
If so, how do I use it in IBverbs?

No. This would require creating a thread behind the scenes and Roland
didn't want to do that. You can create a thread yourself and
call ibv_get_cq_event from there.

One function I'm kind of confused with is ibv_req_notify_cq(). Is the
second parameter simply a true / false value? This isn't very obvious
since the rc_pingpong.c example file passes a 0 value when it
requests CQ notification.

Yes.

Another confusing one is ibv_get_cq_event(). Am I correct in assuming
that this is a blocking function? That's the impression I get from
the example codes and from the fact that struct ibv_comp_channel
appears to merely consist of a file descriptor. My impression is that
it "wakes up" when an element appears on the CQ,

No, when a completion event is triggered. A single event might
signal multiple completions.

but that it requires
the use of ibv_poll_cq() to actually obtain that element. Is this
correct?

Yes.

--
Michael S. Tsirkin
Staff Engineer, Mellanox Technologies


_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

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

Reply via email to