]> err.no Git - linux-2.6/commitdiff
virtio: fix net driver loop case where we fail to restart
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 19 Nov 2007 16:20:43 +0000 (11:20 -0500)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 19 Nov 2007 00:20:44 +0000 (11:20 +1100)
skb is only NULL the first time around: it's more correct to test for
being under-budget.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
drivers/net/virtio_net.c

index d74e6f4aa248a39bdcde000e7bbae3adb5e8f7be..5413dbf3d4ac25ab688bb1a965ccf981f230addc 100644 (file)
@@ -198,8 +198,8 @@ again:
        if (vi->num < vi->max / 2)
                try_fill_recv(vi);
 
-       /* All done? */
-       if (!skb) {
+       /* Out of packets? */
+       if (received < budget) {
                netif_rx_complete(vi->dev, napi);
                if (unlikely(!vi->rvq->vq_ops->restart(vi->rvq))
                    && netif_rx_reschedule(vi->dev, napi))