Skip to content

Commit

Permalink
virtio: fix net driver loop case where we fail to restart
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Rusty Russell committed Nov 19, 2007
1 parent 9a4b970 commit 8329d98
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/virtio_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,8 @@ static int virtnet_poll(struct napi_struct *napi, int budget)
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))
Expand Down

0 comments on commit 8329d98

Please sign in to comment.