qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert (git)" <dgilbert@redhat.com>
To: qemu-devel@nongnu.org, quintela@redhat.com, lvivier@redhat.com
Cc: kashyap@redhat.com, germano@redhat.com, armbru@redhat.com,
	jasowang@redhat.com, jdenemar@redhat.com
Subject: [Qemu-devel] [PATCH 4/6] migration/announce: Update hmp migrate parameter info/set
Date: Tue, 28 Mar 2017 16:27:43 +0100	[thread overview]
Message-ID: <20170328152745.28186-5-dgilbert@redhat.com> (raw)
In-Reply-To: <20170328152745.28186-1-dgilbert@redhat.com>

From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>

Add the new announce parameters to HMPs migrate_parameter commands.

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
 hmp.c | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/hmp.c b/hmp.c
index edb8970..83a982a 100644
--- a/hmp.c
+++ b/hmp.c
@@ -285,6 +285,22 @@ void hmp_info_migrate_parameters(Monitor *mon, const QDict *qdict)
 
     if (params) {
         monitor_printf(mon, "parameters:");
+        assert(params->has_announce_initial);
+        monitor_printf(mon, " %s: %" PRId64,
+            MigrationParameter_lookup[MIGRATION_PARAMETER_ANNOUNCE_INITIAL],
+            params->announce_initial);
+        assert(params->has_announce_max);
+        monitor_printf(mon, " %s: %" PRId64,
+            MigrationParameter_lookup[MIGRATION_PARAMETER_ANNOUNCE_MAX],
+            params->announce_max);
+        assert(params->has_announce_rounds);
+        monitor_printf(mon, " %s: %" PRId64,
+            MigrationParameter_lookup[MIGRATION_PARAMETER_ANNOUNCE_ROUNDS],
+            params->announce_rounds);
+        assert(params->has_announce_step);
+        monitor_printf(mon, " %s: %" PRId64,
+            MigrationParameter_lookup[MIGRATION_PARAMETER_ANNOUNCE_STEP],
+            params->announce_step);
         assert(params->has_compress_level);
         monitor_printf(mon, " %s: %" PRId64,
             MigrationParameter_lookup[MIGRATION_PARAMETER_COMPRESS_LEVEL],
@@ -1354,6 +1370,22 @@ void hmp_migrate_set_parameter(Monitor *mon, const QDict *qdict)
         if (strcmp(param, MigrationParameter_lookup[i]) == 0) {
             MigrationParameters p = { 0 };
             switch (i) {
+            case MIGRATION_PARAMETER_ANNOUNCE_INITIAL:
+                p.has_announce_initial = true;
+                use_int_value = true;
+                break;
+            case MIGRATION_PARAMETER_ANNOUNCE_MAX:
+                p.has_announce_max = true;
+                use_int_value = true;
+                break;
+            case MIGRATION_PARAMETER_ANNOUNCE_ROUNDS:
+                p.has_announce_rounds = true;
+                use_int_value = true;
+                break;
+            case MIGRATION_PARAMETER_ANNOUNCE_STEP:
+                p.has_announce_step = true;
+                use_int_value = true;
+                break;
             case MIGRATION_PARAMETER_COMPRESS_LEVEL:
                 p.has_compress_level = true;
                 use_int_value = true;
@@ -1410,6 +1442,10 @@ void hmp_migrate_set_parameter(Monitor *mon, const QDict *qdict)
                 }
                 /* Set all integers; only one has_FOO will be set, and
                  * the code ignores the remaining values */
+                p.announce_initial = valueint;
+                p.announce_max = valueint;
+                p.announce_rounds = valueint;
+                p.announce_step = valueint;
                 p.compress_level = valueint;
                 p.compress_threads = valueint;
                 p.decompress_threads = valueint;
-- 
2.9.3

  parent reply	other threads:[~2017-03-28 15:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-28 15:27 [Qemu-devel] [PATCH 0/6 for 2.10] Parameterise self-announce Dr. David Alan Gilbert (git)
2017-03-28 15:27 ` [Qemu-devel] [PATCH 1/6] migration/announce: Add parameters for self-announce Dr. David Alan Gilbert (git)
2017-03-28 15:56   ` Eric Blake
2017-03-28 15:27 ` [Qemu-devel] [PATCH 2/6] migration/announce: Accessor functions for parameters Dr. David Alan Gilbert (git)
2017-03-28 15:27 ` [Qemu-devel] [PATCH 3/6] migration/announce: Use the new parameters Dr. David Alan Gilbert (git)
2017-03-28 15:27 ` Dr. David Alan Gilbert (git) [this message]
2017-03-28 15:27 ` [Qemu-devel] [PATCH 5/6] migration/announce: Document self-announce mechanism Dr. David Alan Gilbert (git)
2017-03-28 15:27 ` [Qemu-devel] [PATCH 6/6] migration/announce: Add test Dr. David Alan Gilbert (git)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170328152745.28186-5-dgilbert@redhat.com \
    --to=dgilbert@redhat.com \
    --cc=armbru@redhat.com \
    --cc=germano@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=jdenemar@redhat.com \
    --cc=kashyap@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).