|
|
016a62 |
From bbfbeacbeb992bd85c4aeab2566782f551097d18 Mon Sep 17 00:00:00 2001
|
|
|
016a62 |
From: Julia Suvorova <jusual@redhat.com>
|
|
|
016a62 |
Date: Tue, 4 Feb 2020 18:20:07 +0000
|
|
|
016a62 |
Subject: [PATCH 6/6] virtio-net: delete also control queue when TX/RX deleted
|
|
|
016a62 |
|
|
|
016a62 |
RH-Author: Julia Suvorova <jusual@redhat.com>
|
|
|
016a62 |
Message-id: <20200204182007.183537-5-jusual@redhat.com>
|
|
|
016a62 |
Patchwork-id: 93702
|
|
|
016a62 |
O-Subject: [RHEL-8.2.0 qemu-kvm PATCH 4/4] virtio-net: delete also control queue when TX/RX deleted
|
|
|
016a62 |
Bugzilla: 1708480
|
|
|
016a62 |
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
016a62 |
RH-Acked-by: Cornelia Huck <cohuck@redhat.com>
|
|
|
016a62 |
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
|
|
|
016a62 |
|
|
|
016a62 |
From: Yuri Benditovich <yuri.benditovich@daynix.com>
|
|
|
016a62 |
|
|
|
016a62 |
https://bugzilla.redhat.com/show_bug.cgi?id=1708480
|
|
|
016a62 |
If the control queue is not deleted together with TX/RX, it
|
|
|
016a62 |
later will be ignored in freeing cache resources and hot
|
|
|
016a62 |
unplug will not be completed.
|
|
|
016a62 |
|
|
|
016a62 |
Cc: qemu-stable@nongnu.org
|
|
|
016a62 |
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
|
|
|
016a62 |
Message-Id: <20191226043649.14481-3-yuri.benditovich@daynix.com>
|
|
|
016a62 |
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
|
|
|
016a62 |
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
|
|
016a62 |
(cherry picked from commit d945d9f1731244ef341f74ede93120fc9de35913)
|
|
|
016a62 |
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
|
|
016a62 |
---
|
|
|
016a62 |
hw/net/virtio-net.c | 4 ++++
|
|
|
016a62 |
1 file changed, 4 insertions(+)
|
|
|
016a62 |
|
|
|
016a62 |
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
|
|
|
016a62 |
index 90502fc..c489618 100644
|
|
|
016a62 |
--- a/hw/net/virtio-net.c
|
|
|
016a62 |
+++ b/hw/net/virtio-net.c
|
|
|
016a62 |
@@ -2100,8 +2100,12 @@ static void virtio_net_device_unrealize(DeviceState *dev, Error **errp)
|
|
|
016a62 |
virtio_net_del_queue(n, i);
|
|
|
016a62 |
}
|
|
|
016a62 |
|
|
|
016a62 |
+ /* delete also control vq */
|
|
|
016a62 |
+ virtio_del_queue(vdev, max_queues * 2);
|
|
|
016a62 |
+
|
|
|
016a62 |
timer_del(n->announce_timer);
|
|
|
016a62 |
timer_free(n->announce_timer);
|
|
|
016a62 |
+
|
|
|
016a62 |
g_free(n->vqs);
|
|
|
016a62 |
qemu_del_nic(n->nic);
|
|
|
016a62 |
virtio_cleanup(vdev);
|
|
|
016a62 |
--
|
|
|
016a62 |
1.8.3.1
|
|
|
016a62 |
|