提交 d945d9f1 编写于 作者: Y Yuri Benditovich 提交者: Michael S. Tsirkin

virtio-net: delete also control queue when TX/RX deleted

https://bugzilla.redhat.com/show_bug.cgi?id=1708480
If the control queue is not deleted together with TX/RX, it
later will be ignored in freeing cache resources and hot
unplug will not be completed.

Cc: qemu-stable@nongnu.org
Signed-off-by: NYuri Benditovich <yuri.benditovich@daynix.com>
Message-Id: <20191226043649.14481-3-yuri.benditovich@daynix.com>
Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
上级 421afd2f
...@@ -3101,7 +3101,8 @@ static void virtio_net_device_unrealize(DeviceState *dev, Error **errp) ...@@ -3101,7 +3101,8 @@ static void virtio_net_device_unrealize(DeviceState *dev, Error **errp)
for (i = 0; i < max_queues; i++) { for (i = 0; i < max_queues; i++) {
virtio_net_del_queue(n, i); virtio_net_del_queue(n, i);
} }
/* delete also control vq */
virtio_del_queue(vdev, max_queues * 2);
qemu_announce_timer_del(&n->announce_timer, false); qemu_announce_timer_del(&n->announce_timer, false);
g_free(n->vqs); g_free(n->vqs);
qemu_del_nic(n->nic); qemu_del_nic(n->nic);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册