[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v2 30/32] virtio-net: delete also control queue when TX/RX deleted
From: |
Michael S. Tsirkin |
Subject: |
[PULL v2 30/32] virtio-net: delete also control queue when TX/RX deleted |
Date: |
Tue, 7 Jan 2020 02:37:39 -0500 |
From: Yuri Benditovich <address@hidden>
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: address@hidden
Signed-off-by: Yuri Benditovich <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
hw/net/virtio-net.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index db3d7c38e6..f325440d01 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -3101,7 +3101,8 @@ static void virtio_net_device_unrealize(DeviceState *dev,
Error **errp)
for (i = 0; i < max_queues; 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);
g_free(n->vqs);
qemu_del_nic(n->nic);
--
MST
- [PULL v2 20/32] virtio-mmio: Clear v2 transport state on soft reset, (continued)
- [PULL v2 20/32] virtio-mmio: Clear v2 transport state on soft reset, Michael S. Tsirkin, 2020/01/07
- [PULL v2 19/32] ACPI: add expected files for HMAT tests (acpihmat), Michael S. Tsirkin, 2020/01/07
- [PULL v2 21/32] hw/pci/pci_host: Remove redundant PCI_DPRINTF(), Michael S. Tsirkin, 2020/01/07
- [PULL v2 23/32] vhost-user: add VHOST_USER_RESET_DEVICE to reset devices, Michael S. Tsirkin, 2020/01/07
- [PULL v2 24/32] vhost-user-scsi: reset the device if supported, Michael S. Tsirkin, 2020/01/07
- [PULL v2 25/32] hw: fix using 4.2 compat in 5.0 machine types for i440fx/q35, Michael S. Tsirkin, 2020/01/07
- [PULL v2 26/32] virtio: make seg_max virtqueue size dependent, Michael S. Tsirkin, 2020/01/07
- [PULL v2 27/32] tests: add virtio-scsi and virtio-blk seg_max_adjust test, Michael S. Tsirkin, 2020/01/07
- [PULL v2 28/32] virtio-mmio: update queue size on guest write, Michael S. Tsirkin, 2020/01/07
- [PULL v2 29/32] virtio: reset region cache when on queue deletion, Michael S. Tsirkin, 2020/01/07
- [PULL v2 30/32] virtio-net: delete also control queue when TX/RX deleted,
Michael S. Tsirkin <=
- [PULL v2 31/32] intel_iommu: a fix to vtd_find_as_from_bus_num(), Michael S. Tsirkin, 2020/01/07
- [PULL v2 32/32] intel_iommu: add present bit check for pasid table entries, Michael S. Tsirkin, 2020/01/07
- [PULL v2 22/32] hw/pci/pci_host: Let pci_data_[read/write] use unsigned 'size' argument, Michael S. Tsirkin, 2020/01/07
- [PULL v2 03/32] virtio-balloon: fix memory leak while attach virtio-balloon device, Michael S. Tsirkin, 2020/01/07
- [PULL v2 04/32] virtio-serial-bus: fix memory leak while attach virtio-serial-bus, Michael S. Tsirkin, 2020/01/07
- Re: [PULL v2 00/32] virtio, pci, pc: fixes, features, Peter Maydell, 2020/01/07