diff options
author | Michael Brown | 2007-09-15 21:58:29 +0200 |
---|---|---|
committer | Michael Brown | 2007-09-15 21:58:29 +0200 |
commit | 8deef093d90d8558925cc4c6159b8e2bcf8b02e3 (patch) | |
tree | 155f2622d96a1ccf5def9c02cff2920b28d92846 /src/net/infiniband.c | |
parent | Add const attribute to byte-swapping functions (diff) | |
download | ipxe-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.c | 20 |
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, }; |