qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 5/8] migration: Add multifd-compress paramete


From: Wei Yang
Subject: Re: [Qemu-devel] [PATCH v3 5/8] migration: Add multifd-compress parameter
Date: Mon, 20 May 2019 12:53:13 +0000
User-agent: NeoMutt/20170113 (1.7.2)

On Wed, May 15, 2019 at 02:15:41PM +0200, Juan Quintela wrote:
>Signed-off-by: Juan Quintela <address@hidden>
>
>---
>Rename it to NONE
>Fix typos (dave)
>---
> hmp.c                        | 17 +++++++++++++++++
> hw/core/qdev-properties.c    | 13 +++++++++++++
> include/hw/qdev-properties.h |  1 +
> migration/migration.c        | 16 ++++++++++++++++
> qapi/migration.json          | 30 +++++++++++++++++++++++++++---
> tests/migration-test.c       | 13 ++++++++++---
> 6 files changed, 84 insertions(+), 6 deletions(-)
>
>diff --git a/hmp.c b/hmp.c
>index 56a3ed7375..5732c34249 100644
>--- a/hmp.c
>+++ b/hmp.c
>@@ -38,6 +38,7 @@
> #include "qapi/qapi-commands-run-state.h"
> #include "qapi/qapi-commands-tpm.h"
> #include "qapi/qapi-commands-ui.h"
>+#include "qapi/qapi-visit-migration.h"
> #include "qapi/qmp/qdict.h"
> #include "qapi/qmp/qerror.h"
> #include "qapi/string-input-visitor.h"
>@@ -435,6 +436,9 @@ void hmp_info_migrate_parameters(Monitor *mon, const QDict 
>*qdict)
>         monitor_printf(mon, "%s: %u\n",
>             MigrationParameter_str(MIGRATION_PARAMETER_MULTIFD_CHANNELS),
>             params->multifd_channels);
>+        monitor_printf(mon, "%s: %s\n",
>+            MigrationParameter_str(MIGRATION_PARAMETER_MULTIFD_COMPRESS),
>+            MultifdCompress_str(params->multifd_compress));
>         monitor_printf(mon, "%s: %" PRIu64 "\n",
>             MigrationParameter_str(MIGRATION_PARAMETER_XBZRLE_CACHE_SIZE),
>             params->xbzrle_cache_size);
>@@ -1736,6 +1740,7 @@ void hmp_migrate_set_parameter(Monitor *mon, const QDict 
>*qdict)
>     MigrateSetParameters *p = g_new0(MigrateSetParameters, 1);
>     uint64_t valuebw = 0;
>     uint64_t cache_size;
>+    MultifdCompress compress_type;
>     Error *err = NULL;
>     int val, ret;
> 
>@@ -1821,6 +1826,18 @@ void hmp_migrate_set_parameter(Monitor *mon, const 
>QDict *qdict)
>         p->has_multifd_channels = true;
>         visit_type_int(v, param, &p->multifd_channels, &err);
>         break;
>+    case MIGRATION_PARAMETER_MULTIFD_COMPRESS:
>+        p->has_multifd_compress = true;
>+        visit_type_MultifdCompress(v, param, &compress_type, &err);
>+        if (err) {
>+            break;
>+        }
>+        if (compress_type < 0 || compress_type >= MULTIFD_COMPRESS__MAX) {

A warning during build:

hmp.c:1835:27: warning: comparison of unsigned enum expression < 0 is always 
false [-Wtautological-compare]
        if (compress_type < 0 || compress_type >= MULTIFD_COMPRESS__MAX) {

-- 
Wei Yang
Help you, Help me



reply via email to

[Prev in Thread] Current Thread [Next in Thread]