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>
This commit is contained in:
Rusty Russell 2007-11-19 11:20:43 -05:00
Родитель 9a4b9708f1
Коммит 8329d98e48
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -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))