summaryrefslogtreecommitdiffstats
path: root/src/net/infiniband.c
diff options
context:
space:
mode:
authorMichael Brown2007-09-15 21:58:29 +0200
committerMichael Brown2007-09-15 21:58:29 +0200
commit8deef093d90d8558925cc4c6159b8e2bcf8b02e3 (patch)
tree155f2622d96a1ccf5def9c02cff2920b28d92846 /src/net/infiniband.c
parentAdd const attribute to byte-swapping functions (diff)
downloadipxe-8deef093d90d8558925cc4c6159b8e2bcf8b02e3.tar.gz
ipxe-8deef093d90d8558925cc4c6159b8e2bcf8b02e3.tar.xz
ipxe-8deef093d90d8558925cc4c6159b8e2bcf8b02e3.zip
Direct polling of TX completion queue now works.
Diffstat (limited to 'src/net/infiniband.c')
-rw-r--r--src/net/infiniband.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/net/infiniband.c b/src/net/infiniband.c
index 52811b92..edc93b6e 100644
--- a/src/net/infiniband.c
+++ b/src/net/infiniband.c
@@ -33,6 +33,26 @@
*
*/
+/**
+ * Find queue pair from a list
+ *
+ * @v list List of queue pairs
+ * @v qpn Queue pair number
+ * @ret qp Queue pair, or NULL if not found
+ */
+struct ib_queue_pair * ib_find_qp ( struct list_head *list,
+ unsigned long qpn ) {
+ struct ib_queue_pair *qp;
+
+ list_for_each_entry ( qp, list, list ) {
+ if ( qp->qpn == qpn )
+ return qp;
+ }
+ return NULL;
+}
+
+
+
/** Infiniband broadcast MAC address */
static uint8_t ib_broadcast[IB_ALEN] = { 0xff, };