virtio-net: purge outstanding packets when starting vhost
commit086abc1ccd0fa5103345adda819e6c6436949579
authorMichael S. Tsirkin <mst@redhat.com>
Thu, 4 Sep 2014 08:39:17 +0000 (4 11:39 +0300)
committerStefan Hajnoczi <stefanha@redhat.com>
Thu, 4 Sep 2014 16:19:09 +0000 (4 17:19 +0100)
tree3c64bcbc490597390f0b9213c564f24ed7ecf09d
parentca77d85e1dbf929ae677a0bac96e9b3edd1704da
virtio-net: purge outstanding packets when starting vhost

whenever we start vhost, virtio could have outstanding packets
queued, when they complete later we'll modify the ring
while vhost is processing it.

To prevent this, purge outstanding packets on vhost start.

Cc: qemu-stable@nongnu.org
Cc: Jason Wang <jasowang@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
hw/net/virtio-net.c