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:
@@ -198,8 +198,8 @@ again:
|
|||||||
if (vi->num < vi->max / 2)
|
if (vi->num < vi->max / 2)
|
||||||
try_fill_recv(vi);
|
try_fill_recv(vi);
|
||||||
|
|
||||||
/* All done? */
|
/* Out of packets? */
|
||||||
if (!skb) {
|
if (received < budget) {
|
||||||
netif_rx_complete(vi->dev, napi);
|
netif_rx_complete(vi->dev, napi);
|
||||||
if (unlikely(!vi->rvq->vq_ops->restart(vi->rvq))
|
if (unlikely(!vi->rvq->vq_ops->restart(vi->rvq))
|
||||||
&& netif_rx_reschedule(vi->dev, napi))
|
&& netif_rx_reschedule(vi->dev, napi))
|
||||||
|
Reference in New Issue
Block a user