From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37941) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SyPxj-0001wh-UP for qemu-devel@nongnu.org; Mon, 06 Aug 2012 12:15:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SyPxX-00073E-Qo for qemu-devel@nongnu.org; Mon, 06 Aug 2012 12:15:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:22245) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SyPxX-00072v-Ih for qemu-devel@nongnu.org; Mon, 06 Aug 2012 12:15:11 -0400 Message-ID: <501FED67.7070809@redhat.com> Date: Mon, 06 Aug 2012 10:14:31 -0600 From: Eric Blake MIME-Version: 1.0 References: <1344158004-10370-1-git-send-email-owasserm@redhat.com> <1344158004-10370-3-git-send-email-owasserm@redhat.com> <501FD40E.8030506@redhat.com> <501FEB19.3030007@redhat.com> In-Reply-To: <501FEB19.3030007@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigC3AB506022327DB78D08A381" Subject: Re: [Qemu-devel] [PATCH 02/11] Add migrate-set-capabilities and query-migrate-capabilities List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Orit Wasserman Cc: peter.maydell@linaro.org, aliguori@us.ibm.com, quintela@redhat.com, stefanha@gmail.com, qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com, blauwirbel@gmail.com, avi@redhat.com, pbonzini@redhat.com, lcapitulino@redhat.com, chegu_vinod@hp.com This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigC3AB506022327DB78D08A381 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 08/06/2012 10:04 AM, Orit Wasserman wrote: > On 08/06/2012 05:26 PM, Eric Blake wrote: >> On 08/05/2012 03:13 AM, Orit Wasserman wrote: >>> The management can enable/disable a capability for the next migration= by using >>> migrate-set-apabilities QMP command. >> >> s/set-apabilities/set-capabilities/ >> >> In HMP, are migrate_supported_capabilities and migrate_capabilities >> redundant? That is, I think I can use either command to answer both >> questions "what capabilities exist" and "what is the current state of >> all capabilities that exist", since _both_ commands output a list of >> capability names as well as an on/off designator. If my analysis is >> right, then we don't need migrate_supported_capabilities. > No 'info migrate_supported_capabilities' shows the capabilities this ve= rsion of QEMU can supports. > and 'info migrate_capabilities' show what are the state of capabilities= for the migration, i.e what is enabled. Let's compare: patch 1/11: +void hmp_info_migrate_supported_capabilities(Monitor *mon) +{ + MigrationCapabilityStatusList *caps_list, *cap; + + caps_list =3D qmp_query_migrate_supported_capabilities(NULL); + if (!caps_list) { + monitor_printf(mon, "No supported migration capabilities found\n= "); + return; + } + + for (cap =3D caps_list; cap; cap =3D cap->next) { + monitor_printf(mon, "%s: %s ", + MigrationCapability_lookup[cap->value->capability= ], + cap->value->state ? "on" : "off"); patch 2/11: +void hmp_info_migrate_capabilities(Monitor *mon) +{ + MigrationCapabilityStatusList *caps, *cap; + + caps =3D qmp_query_migrate_capabilities(NULL); + + if (caps) { + monitor_printf(mon, "capabilities: "); + for (cap =3D caps; cap; cap =3D cap->next) { + monitor_printf(mon, "%s: %s ", + MigrationCapability_lookup[cap->value->capability], + cap->value->state ? "on" : "off"); That is, BOTH commands end up iterating over a list of caps, and output identical information in the case where caps exist of 'name: state' for each capability. They really ARE redundant - both commands are telling me: capabilities: xbzrle: on foobar: off which I can read to answer both my question of 'what is supported' (xbzrle and foobar) and 'what is enabled' (xbzrle). I see no need to have to commands to tell me the same information, so I'd prefer the shorter name. --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enigC3AB506022327DB78D08A381 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.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJQH+1nAAoJEKeha0olJ0Nq/xUIALAMQ1O8TYqM2snkAwDM5QnH XXc1W+N+WrBQ/9rGM/bj7nn37LpF1dnotF+DAGeWjAscVHpduA/KzKdM+8xUOcca MWJqN4ghiGmDmsoKqYU/XWuXZB0nUXHH5K8Y7JNGdA9vIUiEHw6eUBtcqtHyOKMA 6H8lFr+S9DoVNa+prHU4vtnDj888VNFdOM/LrQBu9yefGE3iLv0y2LhcV1eSlwcB CNR/Hft+W9XdQRo+RFBqP39iX2J34zJclPJWMCLKc0qXq8ENNdNGjDzhFqslK/R2 OMM13DDp9N4kpbY9pSQLFl4sThQGajI90PB4FImaCzQaxTnV42Nzgt1MVkacVOw= =nnH3 -----END PGP SIGNATURE----- --------------enigC3AB506022327DB78D08A381--