提交 8329d98e 编写于 作者: R Rusty Russell

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: NRusty Russell <rusty@rustcorp.com.au>
上级 9a4b9708
......@@ -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))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册