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

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