yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
ddf19c
From 2f494c41715193522c52eafc6af2a5e33f88ceb9 Mon Sep 17 00:00:00 2001
ddf19c
From: Julia Suvorova <jusual@redhat.com>
ddf19c
Date: Wed, 19 Feb 2020 21:34:31 +0000
ddf19c
Subject: [PATCH 7/7] virtio-net: delete also control queue when TX/RX deleted
ddf19c
ddf19c
RH-Author: Julia Suvorova <jusual@redhat.com>
ddf19c
Message-id: <20200219213431.11913-5-jusual@redhat.com>
ddf19c
Patchwork-id: 93983
ddf19c
O-Subject: [RHEL-AV-8.2.0 qemu-kvm PATCH 4/4] virtio-net: delete also control queue when TX/RX deleted
ddf19c
Bugzilla: 1791590
ddf19c
RH-Acked-by: Danilo de Paula <ddepaula@redhat.com>
ddf19c
RH-Acked-by: Stefano Garzarella <sgarzare@redhat.com>
ddf19c
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
ddf19c
ddf19c
From: Yuri Benditovich <yuri.benditovich@daynix.com>
ddf19c
ddf19c
https://bugzilla.redhat.com/show_bug.cgi?id=1708480
ddf19c
If the control queue is not deleted together with TX/RX, it
ddf19c
later will be ignored in freeing cache resources and hot
ddf19c
unplug will not be completed.
ddf19c
ddf19c
Cc: qemu-stable@nongnu.org
ddf19c
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
ddf19c
Message-Id: <20191226043649.14481-3-yuri.benditovich@daynix.com>
ddf19c
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
ddf19c
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
ddf19c
(cherry picked from commit d945d9f1731244ef341f74ede93120fc9de35913)
ddf19c
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
ddf19c
---
ddf19c
 hw/net/virtio-net.c | 3 ++-
ddf19c
 1 file changed, 2 insertions(+), 1 deletion(-)
ddf19c
ddf19c
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
ddf19c
index db3d7c3..f325440 100644
ddf19c
--- a/hw/net/virtio-net.c
ddf19c
+++ b/hw/net/virtio-net.c
ddf19c
@@ -3101,7 +3101,8 @@ static void virtio_net_device_unrealize(DeviceState *dev, Error **errp)
ddf19c
     for (i = 0; i < max_queues; i++) {
ddf19c
         virtio_net_del_queue(n, i);
ddf19c
     }
ddf19c
-
ddf19c
+    /* delete also control vq */
ddf19c
+    virtio_del_queue(vdev, max_queues * 2);
ddf19c
     qemu_announce_timer_del(&n->announce_timer, false);
ddf19c
     g_free(n->vqs);
ddf19c
     qemu_del_nic(n->nic);
ddf19c
-- 
ddf19c
1.8.3.1
ddf19c