From patchwork Tue Mar 28 15:27:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dr. David Alan Gilbert" X-Patchwork-Id: 744361 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vsvx54W4pz9s2s for ; Wed, 29 Mar 2017 02:30:49 +1100 (AEDT) Received: from localhost ([::1]:53939 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cst55-0000nL-1l for incoming@patchwork.ozlabs.org; Tue, 28 Mar 2017 11:30:47 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40372) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cst30-0007hG-J3 for qemu-devel@nongnu.org; Tue, 28 Mar 2017 11:28:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cst2w-00072d-Fz for qemu-devel@nongnu.org; Tue, 28 Mar 2017 11:28:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35743) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cst2w-00072U-7Y for qemu-devel@nongnu.org; Tue, 28 Mar 2017 11:28:34 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4713E7E9EE for ; Tue, 28 Mar 2017 15:28:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 4713E7E9EE Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=dgilbert@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 4713E7E9EE Received: from dgilbert-t530.redhat.com (ovpn-117-173.ams2.redhat.com [10.36.117.173]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3BCCB99680; Tue, 28 Mar 2017 15:28:28 +0000 (UTC) From: "Dr. David Alan Gilbert (git)" To: qemu-devel@nongnu.org, quintela@redhat.com, lvivier@redhat.com Date: Tue, 28 Mar 2017 16:27:43 +0100 Message-Id: <20170328152745.28186-5-dgilbert@redhat.com> In-Reply-To: <20170328152745.28186-1-dgilbert@redhat.com> References: <20170328152745.28186-1-dgilbert@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 28 Mar 2017 15:28:33 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 4/6] migration/announce: Update hmp migrate parameter info/set X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kashyap@redhat.com, germano@redhat.com, jasowang@redhat.com, armbru@redhat.com, jdenemar@redhat.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: "Dr. David Alan Gilbert" Add the new announce parameters to HMPs migrate_parameter commands. Signed-off-by: Dr. David Alan Gilbert --- 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;