[openib-general] Re: uverbs API

Libor Michalek libor at topspin.com
Wed Apr 20 13:32:44 PDT 2005


On Wed, Apr 20, 2005 at 11:35:31AM -0700, Arlin Davis wrote:
> Roland Dreier wrote:
> >
> >Can you explain what this means a little more?  Is there something you
> >need that you can't get by using select()/poll() with a timeout on the
> >CQ event FD?
> >
> >  
> >
> As long as you can tell me that a thread blocked on get_cq_event will 
> wakeup on a device close, signal, or CQ error then I don't need a wakeup 
> call from userspace.
> 
> and yes, select() was exactly my thinking,  but I was hoping we could 
> get it added to the ibv_get_cq_event() code and just include a new 
> timeout parameter (in usecs) with the call.

  I guess it would be trivial for someone to write an ibv_get_cq_event() 
wrapper which took a timeout, and performed the select before calling
the real ibv_get_cq_event... However, that seems limiting from a real
application point of view where you will almost certainly want to have
more then one file descriptor on which you are waiting.

  If the consumer is responsible for getting the FD and placing
it into a select, inorder to support timeouts and event notification,
then it's trivial to add a CM fd and a SA query fd, not to mention 
any other file descriptor in your application. 


-Libor



More information about the general mailing list