From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59506) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YEgSj-0002jp-8s for qemu-devel@nongnu.org; Fri, 23 Jan 2015 10:48:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YEgSe-0001Sh-Q2 for qemu-devel@nongnu.org; Fri, 23 Jan 2015 10:47:57 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36304) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YEgSe-0001RV-JG for qemu-devel@nongnu.org; Fri, 23 Jan 2015 10:47:52 -0500 Message-ID: <54C26D26.60001@redhat.com> Date: Fri, 23 Jan 2015 08:47:50 -0700 From: Eric Blake MIME-Version: 1.0 References: <1418347746-15829-1-git-send-email-liang.z.li@intel.com> <1418347746-15829-14-git-send-email-liang.z.li@intel.com> In-Reply-To: <1418347746-15829-14-git-send-email-liang.z.li@intel.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="JovA7UJPkBmTdhSEbrRT9uv9mPTKfchui" Subject: Re: [Qemu-devel] [v3 13/13] migration: Add command to query migration parameter List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Liang Li , qemu-devel@nongnu.org Cc: yang.z.zhang@intel.com, lcapitulino@redhat.com, armbru@redhat.com, dgilbert@redhat.com, quintela@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --JovA7UJPkBmTdhSEbrRT9uv9mPTKfchui Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 12/11/2014 06:29 PM, Liang Li wrote: > Add the qmp and hmp commands to query the parameters used in live > migration. >=20 > Signed-off-by: Liang Li > Signed-off-by: Yang Zhang > --- > hmp-commands.hx | 2 ++ > hmp.c | 19 +++++++++++++++++++ > hmp.h | 1 + > migration.c | 25 +++++++++++++++++++++++++ > monitor.c | 7 +++++++ > qapi-schema.json | 10 ++++++++++ > qmp-commands.hx | 24 ++++++++++++++++++++++++ > 7 files changed, 88 insertions(+) >=20 > + if (params) { > + monitor_printf(mon, "parameters: "); > + for (p =3D params; p; p =3D p->next) { > + monitor_printf(mon, "%s: %d ", > + MigrationParameter_lookup[p->value->paramet= er], > + (int)p->value->value); Why are you casting to 'int'? I'm worried that this will fail if you ever have a 64-bit parameter, or if we ever have a non-integral parameter= =2E > +++ b/qapi-schema.json > @@ -584,6 +584,16 @@ > { 'command': 'migrate-set-parameters', > 'data': { 'parameters': ['MigrationParameterStatus'] } } > ## > +# @query-migrate-parameters > +# > +# Returns information about the current migration parameters status > +# > +# Returns: @MigrationParametersStatus > +# > +# Since: 2.3 > +## > +{ 'command': 'query-migrate-parameters', 'returns': ['MigrationParam= eterStatus']} Unusual spacing. Line is longer than 80 columns. > +query-migrate-parameters > +------------------------ > + > +Query current migration parameters > + > +- "parameters": migration parameters value > + - "compress-level" : compress level value (json-int) Is it worth giving the example with all three defined parameters, rather than truncating it to just one? Again, see my comments on 12/13 about possibly squashing these together, and/or using a union to make it obvious that we might support non-integral parameters in the future. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --JovA7UJPkBmTdhSEbrRT9uv9mPTKfchui Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJUwm0mAAoJEKeha0olJ0Nq7eMH/RiMRM3s9MpiCWojK8dJqfCX wIE+wdKVqHu8Lv1vnhT8ToV7JIp55txB9EmUcHIGL29ASPrhac8n/FLIB33KAs8K 06jHmVBLfiyK21YdOolsBAwwXxoXjA5Cu1atAgWjS55oeHzOz6euYr7jxO9//APn KsG2GmxZEYihYIvXxilfR6L+qPnxnnRIv4Pq7dOYpw1ZiNbLzgP33vj11P+cMlK8 YMK6pal0NK9XhzobkDOKNPAeXvs/xH6fssp0psDcxRPIeIQdzGo8fDUd3K/EeXWq 6XelpYIJW9JjO8CBpm8iGUAsaJj5E5MrIha0AZnKOS1Ll06vU6PL9U0r59D6+dA= =0GGA -----END PGP SIGNATURE----- --JovA7UJPkBmTdhSEbrRT9uv9mPTKfchui--