diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index be5688f5e9310d30376e5fb98c6221dd1b33bc4c..bd4d26a36eadcb1a95bac0ba5226cf3254b400d2 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -283,6 +283,13 @@ static int virtnet_open(struct net_device *dev) struct virtnet_info *vi = netdev_priv(dev); napi_enable(&vi->napi); + + /* If all buffers were filled by other side before we napi_enabled, we + * won't get another interrupt, so process any outstanding packets + * now. virtnet_poll wants re-enable the queue, so we disable here. */ + vi->rvq->vq_ops->disable_cb(vi->rvq); + netif_rx_schedule(vi->dev, &vi->napi); + return 0; }