post_recv() now works, and we can pass data on the IPoIB queue pair

using entirely our own code.
This commit is contained in:
Michael Brown
2007-09-15 23:33:25 +01:00
parent 838b972cd3
commit 37fc40bc8c
5 changed files with 234 additions and 74 deletions

View File

@@ -34,19 +34,20 @@
*/
/**
* Find queue pair from a list
* Find work queue belonging to completion queue
*
* @v list List of queue pairs
* @v cq Completion queue
* @v qpn Queue pair number
* @ret qp Queue pair, or NULL if not found
* @v is_send Find send work queue (rather than receive)
* @ret wq Work queue, or NULL if not found
*/
struct ib_queue_pair * ib_find_qp ( struct list_head *list,
unsigned long qpn ) {
struct ib_queue_pair *qp;
struct ib_work_queue * ib_find_wq ( struct ib_completion_queue *cq,
unsigned long qpn, int is_send ) {
struct ib_work_queue *wq;
list_for_each_entry ( qp, list, list ) {
if ( qp->qpn == qpn )
return qp;
list_for_each_entry ( wq, &cq->work_queues, list ) {
if ( ( wq->qp->qpn == qpn ) && ( wq->is_send == is_send ) )
return wq;
}
return NULL;
}