]> git.ipfire.org Git - thirdparty/qemu.git/commit
virtio-net: purge outstanding packets when starting vhost
authorMichael S. Tsirkin <mst@redhat.com>
Thu, 4 Sep 2014 08:39:17 +0000 (11:39 +0300)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Wed, 10 Sep 2014 14:30:58 +0000 (09:30 -0500)
commitcf29a8839115c99eb4050cea31d71ee1cb96ad2a
tree77eed3f32d84f7675c76a86ccafd03829ad2cdc1
parent08743db463e52a2d1d789200dba5bfaa3221adc2
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>
(cherry picked from commit 086abc1ccd0fa5103345adda819e6c6436949579)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/net/virtio-net.c