[libvirt] [PATCHv2 1/2] qemu: revert patch - bandwidth tuning in session mode

Michal Privoznik mprivozn at redhat.com
Wed Nov 5 18:14:30 UTC 2014


On 05.11.2014 18:41, Erik Skultety wrote:
> Since there was a valid note to patch 43b67f2e about the best spot to
> check for bandwidth set call while having libvirt daemon run in session
> mode, this patch reverts previous changes dealing with bandwith
> (also reverts adding variable @cfg in qemuDomainGetNumaParameters which
>   does not have any use at the moment, but getting and unreferencing
>   driver's config) in qemu_driver.c and qemu_command.c. There will be
> another patch in the series which introduces the fix itself.
> ---
>   src/qemu/qemu_command.c | 11 -----------
>   src/qemu/qemu_driver.c  |  9 ---------
>   2 files changed, 20 deletions(-)
>
> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
> index 917639e..956bb14 100644
> --- a/src/qemu/qemu_command.c
> +++ b/src/qemu/qemu_command.c
> @@ -7841,17 +7841,6 @@ qemuBuildCommandLine(virConnectPtr conn,
>                              _("CPU tuning is not available in session mode"));
>               goto error;
>           }
> -
> -        virDomainNetDefPtr *nets = def->nets;
> -        virNetDevBandwidthPtr bandwidth = NULL;
> -        size_t nnets = def->nnets;
> -        for (i = 0; i < nnets; i++) {
> -            if ((bandwidth = virDomainNetGetActualBandwidth(nets[i])) != NULL) {
> -                virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
> -                    _("Network bandwidth tuning is not available in session mode"));
> -                goto error;
> -            }
> -        }
>       }
>
>       for (i = 0; i < def->ngraphics; ++i) {
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index 6acaea8..edd82c1 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -9383,7 +9383,6 @@ qemuDomainGetNumaParameters(virDomainPtr dom,
>       size_t i;
>       virDomainObjPtr vm = NULL;
>       virDomainDefPtr persistentDef = NULL;
> -    virQEMUDriverConfigPtr cfg = NULL;
>       char *nodeset = NULL;
>       int ret = -1;
>       virCapsPtr caps = NULL;
> @@ -9402,7 +9401,6 @@ qemuDomainGetNumaParameters(virDomainPtr dom,
>           return -1;
>
>       priv = vm->privateData;
> -    cfg = virQEMUDriverGetConfig(driver);
>
>       if (virDomainGetNumaParametersEnsureACL(dom->conn, vm->def) < 0)
>           goto cleanup;
> @@ -9476,7 +9474,6 @@ qemuDomainGetNumaParameters(virDomainPtr dom,
>       if (vm)
>           virObjectUnlock(vm);
>       virObjectUnref(caps);
> -    virObjectUnref(cfg);
>       return ret;
>   }
>
> @@ -10447,12 +10444,6 @@ qemuDomainSetInterfaceParameters(virDomainPtr dom,
>       if (virDomainSetInterfaceParametersEnsureACL(dom->conn, vm->def, flags) < 0)
>           goto cleanup;
>
> -    if (!cfg->privileged) {
> -        virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
> -                       _("Network bandwidth tuning is not available in session mode"));
> -        goto cleanup;
> -    }
> -
>       if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
>           goto cleanup;
>
>

ACK, however, I'm not pushing this one until 2/2 is fixed.

Michal




More information about the libvir-list mailing list