summaryrefslogtreecommitdiffstats
path: root/drivers/net/virtio_net.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2007-11-19 17:20:43 +0100
committerRusty Russell <rusty@rustcorp.com.au>2007-11-19 01:20:44 +0100
commit8329d98e480250ef5f5a083f9c3af50510b5e65d (patch)
tree183f79256e8c37cbc68ea115174f390e99120a77 /drivers/net/virtio_net.c
parentmodule: fix and elaborate comments (diff)
downloadlinux-8329d98e480250ef5f5a083f9c3af50510b5e65d.tar.xz
linux-8329d98e480250ef5f5a083f9c3af50510b5e65d.zip
virtio: fix net driver loop case where we fail to restart
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>
Diffstat (limited to 'drivers/net/virtio_net.c')
-rw-r--r--drivers/net/virtio_net.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index d74e6f4aa248..5413dbf3d4ac 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -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))