On Fri, 2010-02-19 at 00:30 +0200, Michael S. Tsirkin wrote:
This check is done only when the ring is empty(head == vq->num).
But we are breaking out of the loop here.
if (unlikely(total_len >= VHOST_NET_WEIGHT)) {
vhost_poll_queue(&vq->poll);
break;
}
I guess tx_poll_start() is missing here. The following patch fixes
the hang and may be a better fix.
Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index 4c89283..fe9d296 100644
--- a/drivers/vhost/net.c
+++ b/drivers/vhost/net.c
@@ -172,6 +172,7 @@ static void handle_tx(struct vhost_net *net)
vhost_add_used_and_signal(&net->dev, vq, head, 0);
total_len += len;
if (unlikely(total_len >= VHOST_NET_WEIGHT)) {
+ tx_poll_start(net, sock);
vhost_poll_queue(&vq->poll);
break;
}
Thanks
Sridhar
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html