]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: report error on attempt to live change virtio-net queues
authorLaine Stump <laine@laine.org>
Tue, 3 Dec 2013 10:40:38 +0000 (12:40 +0200)
committerLaine Stump <laine@laine.org>
Tue, 3 Dec 2013 14:50:59 +0000 (16:50 +0200)
This resolves:

  https://bugzilla.redhat.com/show_bug.cgi?id=1029732

The BZ asked for the capability to change the number of queues used by
a virtio-net device while the device is in use. Because the number of
queues can only be set at the time the device is created, that isn't
possible. However, libvirt also shouldn't be silently reporting
success when someone tries to change the number of queues. So this
patch flags that as an error (just as attempts to change any of the
other virtio-specific parameters already do).

src/qemu/qemu_hotplug.c

index 649c884445dafbbb8cb7a6f6eb6f618dd4a9f355..c136232eaf63dc0e04c9d8e9957eeb1db5a64658 100644 (file)
@@ -1899,7 +1899,8 @@ qemuDomainChangeNet(virQEMUDriverPtr driver,
         (olddev->driver.virtio.name != newdev->driver.virtio.name ||
          olddev->driver.virtio.txmode != newdev->driver.virtio.txmode ||
          olddev->driver.virtio.ioeventfd != newdev->driver.virtio.ioeventfd ||
-         olddev->driver.virtio.event_idx != newdev->driver.virtio.event_idx)) {
+         olddev->driver.virtio.event_idx != newdev->driver.virtio.event_idx ||
+         olddev->driver.virtio.queues != newdev->driver.virtio.queues)) {
         virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
                        _("cannot modify virtio network device driver attributes"));
         goto cleanup;