Blame SOURCES/kvm-virtio-net-delete-also-control-queue-when-TX-RX-dele.patch

4636b8
From a1fd8f3e5f2faeccd08a617c0208dd786cf4a6d7 Mon Sep 17 00:00:00 2001
4636b8
From: Julia Suvorova <jusual@redhat.com>
4636b8
Date: Wed, 4 Mar 2020 20:07:54 -0500
4636b8
Subject: [PATCH 12/12] virtio-net: delete also control queue when TX/RX
4636b8
 deleted
4636b8
4636b8
RH-Author: Julia Suvorova <jusual@redhat.com>
4636b8
Message-id: <20200304200754.32708-5-jusual@redhat.com>
4636b8
Patchwork-id: 94155
4636b8
O-Subject: [RHEL-7.9 qemu-kvm-rhev PATCH 4/4] virtio-net: delete also control queue when TX/RX deleted
4636b8
Bugzilla: 1721403
4636b8
RH-Acked-by: Stefano Garzarella <sgarzare@redhat.com>
4636b8
RH-Acked-by: Maxim Levitsky <mlevitsk@redhat.com>
4636b8
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
4636b8
4636b8
From: Yuri Benditovich <yuri.benditovich@daynix.com>
4636b8
4636b8
https://bugzilla.redhat.com/show_bug.cgi?id=1708480
4636b8
If the control queue is not deleted together with TX/RX, it
4636b8
later will be ignored in freeing cache resources and hot
4636b8
unplug will not be completed.
4636b8
4636b8
Cc: qemu-stable@nongnu.org
4636b8
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
4636b8
Message-Id: <20191226043649.14481-3-yuri.benditovich@daynix.com>
4636b8
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
4636b8
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
4636b8
(cherry picked from commit d945d9f1731244ef341f74ede93120fc9de35913)
4636b8
Signed-off-by: Jon Maloy <jmaloy.redhat.com>
4636b8
---
4636b8
 hw/net/virtio-net.c | 4 ++++
4636b8
 1 file changed, 4 insertions(+)
4636b8
4636b8
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
4636b8
index 90502fca7c..c4896184ed 100644
4636b8
--- a/hw/net/virtio-net.c
4636b8
+++ b/hw/net/virtio-net.c
4636b8
@@ -2100,8 +2100,12 @@ static void virtio_net_device_unrealize(DeviceState *dev, Error **errp)
4636b8
         virtio_net_del_queue(n, i);
4636b8
     }
4636b8
 
4636b8
+    /* delete also control vq */
4636b8
+    virtio_del_queue(vdev, max_queues * 2);
4636b8
+
4636b8
     timer_del(n->announce_timer);
4636b8
     timer_free(n->announce_timer);
4636b8
+
4636b8
     g_free(n->vqs);
4636b8
     qemu_del_nic(n->nic);
4636b8
     virtio_cleanup(vdev);
4636b8
-- 
4636b8
2.18.2
4636b8