aboutsummaryrefslogtreecommitdiffstats
path: root/src/drivers/net/ipoib.c
diff options
context:
space:
mode:
authorMichael Brown <mcb30@etherboot.org>2009-07-06 19:12:12 +0100
committerMichael Brown <mcb30@etherboot.org>2009-07-17 23:06:33 +0100
commit887d296b886aeb5eb9dd67dd85221f64f2683849 (patch)
tree51d5502ceaafcb56875eb9733efe36700574b334 /src/drivers/net/ipoib.c
parent1f5c0239b4fc5dea895645397d5aaa3d4b95205a (diff)
downloadipxe-887d296b886aeb5eb9dd67dd85221f64f2683849.tar.gz
[infiniband] Poll completion queues automatically
Currently, all Infiniband users must create a process for polling their completion queues (or rely on a regular hook such as netdev_poll() in ipoib.c). Move instead to a model whereby the Infiniband core maintains a single process calling ib_poll_eq(), and polling the event queue triggers polls of the applicable completion queues. (At present, the Infiniband core simply polls all of the device's completion queues.) Polling a completion queue will now implicitly refill all attached receive work queues; this is analogous to the way that netdev_poll() implicitly refills the RX ring. Infiniband users no longer need to create a process just to poll their completion queues and refill their receive rings.
Diffstat (limited to 'src/drivers/net/ipoib.c')
-rw-r--r--src/drivers/net/ipoib.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/drivers/net/ipoib.c b/src/drivers/net/ipoib.c
index 03dfa53a..a559d015 100644
--- a/src/drivers/net/ipoib.c
+++ b/src/drivers/net/ipoib.c
@@ -743,10 +743,7 @@ static void ipoib_poll ( struct net_device *netdev ) {
struct ipoib_device *ipoib = netdev->priv;
struct ib_device *ibdev = ipoib->ibdev;
- ib_poll_cq ( ibdev, ipoib->meta.cq );
- ib_poll_cq ( ibdev, ipoib->data.cq );
- ib_qset_refill_recv ( ibdev, &ipoib->meta );
- ib_qset_refill_recv ( ibdev, &ipoib->data );
+ ib_poll_eq ( ibdev );
}
/**
@@ -861,8 +858,8 @@ static int ipoib_open ( struct net_device *netdev ) {
mac->qpn = htonl ( ipoib->data.qp->qpn );
/* Fill receive rings */
- ib_qset_refill_recv ( ibdev, &ipoib->meta );
- ib_qset_refill_recv ( ibdev, &ipoib->data );
+ ib_refill_recv ( ibdev, ipoib->meta.qp );
+ ib_refill_recv ( ibdev, ipoib->data.qp );
/* Join broadcast group */
if ( ( rc = ipoib_join_broadcast_group ( ipoib ) ) != 0 ) {