From: Mark McLoughlin <[EMAIL PROTECTED]> Once we know we have buffers available on the receive ring, we can safely disable notifications.
Signed-off-by: Mark McLoughlin <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> diff --git a/qemu/hw/virtio-net.c b/qemu/hw/virtio-net.c index b001475..47349ce 100644 --- a/qemu/hw/virtio-net.c +++ b/qemu/hw/virtio-net.c @@ -106,9 +106,12 @@ static int virtio_net_can_receive(void *opaque) !(n->vdev.status & VIRTIO_CONFIG_S_DRIVER_OK)) return 0; - if (n->rx_vq->vring.avail->idx == n->rx_vq->last_avail_idx) + if (n->rx_vq->vring.avail->idx == n->rx_vq->last_avail_idx) { + n->rx_vq->vring.used->flags &= ~VRING_USED_F_NO_NOTIFY; return 0; + } + n->rx_vq->vring.used->flags |= VRING_USED_F_NO_NOTIFY; return 1; } -- To unsubscribe from this list: send the line "unsubscribe kvm-commits" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html