[openib-general] in need of a simple ulp

Sean Hefty mshefty at ichips.intel.com
Fri May 20 13:40:42 PDT 2005


Jeff Carr wrote:
> There must also be some limit to how many cqe's you can allocate with 
> ib_post_recv(). (?)

Each receive posted will generate a cqe.  That limit is controlled by the 
message_count variable.

> There must be some way to delete/free these? They don't get re-used I 
> take it? Surely it wasn't intended that ib_post_recv() be initially run 
> for each transfer expected in the lifetime of the connection. :)

There needs to be one cqe reserved for each possible completion that can be 
outstanding at one time.  If you know that the number of completions will be 
high initially, and then drop to a smaller value, there is a verb that can 
be used to resize the CQ.  (I don't believe it is implemented in the openib 
stack at this time.)

> There must also be some information about what is known about these 
> cqe's. How do we know if one of them was used for a transfer from the 
> server to the client or from the client letting the server know the 
> transfer was recieved?

In this case you won't know what's on a cqe until you poll the completion. 
An alternative way of structuring the code is to create two CQs, and tie one 
to the send queue, the other to the receive queue.

- Sean



More information about the general mailing list