diff options
Diffstat (limited to 'src/net')
| -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 52811b921..edc93b6e3 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, }; |
