summaryrefslogtreecommitdiffstats
path: root/src/net/infiniband.c
diff options
context:
space:
mode:
authorMichael Brown2007-09-16 00:33:25 +0200
committerMichael Brown2007-09-16 00:33:25 +0200
commit37fc40bc8cd857a5e922b21b9e41580b39091c76 (patch)
tree499cb3ee788970acef79fe3b7b6f69e651058e26 /src/net/infiniband.c
parentKill off some dead code (diff)
downloadipxe-37fc40bc8cd857a5e922b21b9e41580b39091c76.tar.gz
ipxe-37fc40bc8cd857a5e922b21b9e41580b39091c76.tar.xz
ipxe-37fc40bc8cd857a5e922b21b9e41580b39091c76.zip
post_recv() now works, and we can pass data on the IPoIB queue pair
using entirely our own code.
Diffstat (limited to 'src/net/infiniband.c')
-rw-r--r--src/net/infiniband.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/net/infiniband.c b/src/net/infiniband.c
index edc93b6e..694c88b1 100644
--- a/src/net/infiniband.c
+++ b/src/net/infiniband.c
@@ -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;
}