From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59865) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X5iH2-0004YQ-Gq for qemu-devel@nongnu.org; Fri, 11 Jul 2014 17:22:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X5iGx-00031l-Ic for qemu-devel@nongnu.org; Fri, 11 Jul 2014 17:22:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:64089) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X5iGx-00030Z-AD for qemu-devel@nongnu.org; Fri, 11 Jul 2014 17:22:27 -0400 Message-ID: <53C05590.40409@redhat.com> Date: Fri, 11 Jul 2014 15:22:24 -0600 From: Eric Blake MIME-Version: 1.0 References: <20140708141728.412a3f1c@redhat.com> <87fvi9i8tx.fsf@blackfin.pond.sub.org> <20140710103641.31b658c0@redhat.com> <87vbr4vtwp.fsf@blackfin.pond.sub.org> <53C004F2.1000602@redhat.com> <87tx6nsx3l.fsf@blackfin.pond.sub.org> <20140711145115.28849a0e@redhat.com> In-Reply-To: <20140711145115.28849a0e@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="EKqRMNvcaHAat9w6SFNKR8VTIM5Kmq2Qq" Subject: Re: [Qemu-devel] [PATCH] scripts: qapi-event.py: support vendor extension List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino , Markus Armbruster Cc: qemu-devel , wenchaoqemu@gmail.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --EKqRMNvcaHAat9w6SFNKR8VTIM5Kmq2Qq Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 07/11/2014 12:51 PM, Luiz Capitulino wrote: >>>> { 'type': 'VersionInfo', >>>> 'data': {'qemu': {'major': 'int', 'minor': 'int', 'micro': 'int'}= , >>>> + '__com.redhat.crap': {'major': 'int', 'minor': 'int', 'm= icro': 'int'}, >>>> 'package': 'str'} } >>> >>> And the fix may be as simple as ditching support for nested structs i= n >>> the first place, and rewriting this as: >>> >>> { 'type': 'VersionDetails', >>> 'data': { major': 'int', 'minor': 'int', 'micro': 'int'} } >>> { 'type': 'VersionInfo', >>> 'data': {'qemu': 'VersionDetails', >>> '__com.redhat.crap': 'VersionDetails', >>> 'package': 'str' } } >>> >>> But the fact that we are still discussing makes it obvious - this is = 2.2 >>> material. >> >> Agree. Let's ditch nested structs and see whether there are any misus= es >> of c_var() left. >=20 > This is an honest question: do we really want to drop nested struct sup= port, > wasn't it added by the block layer or am I just confused? We're talking about raw inline structs - there's only 3 impacted QAPI typesMP commands (if I counted correctly), and they have nothing to do with block layer complex structs. The idea is that we want to outlaw 'foo':{...} implicit structs, and instead require 'foo':'type', where 'type' was earlier defined with the {...} guts. The QMP wire format would be unchanged; it is just a change to the QAPI template that the generators read. Removing inline structs would also simplify the generators. Then, with that gone, we are free to to repurpose 'foo':{...} for default values of optional arguments. Here's a link to some of the earlier conversation: https://lists.gnu.org/archive/html/qemu-devel/2014-05/msg00708.html https://lists.gnu.org/archive/html/qemu-devel/2014-05/msg04268.html --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --EKqRMNvcaHAat9w6SFNKR8VTIM5Kmq2Qq 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/ iQEcBAEBCAAGBQJTwFWQAAoJEKeha0olJ0NqHmEIAK5wVtjsktak4ocnlpikhjC5 kPdarvsjDVfQNfBjJcmbEbX1PjDgm4onNHc9AQiWTXODedI9FjGx05rSpvvHCMi0 oDZA7ofcIPL1zk0IBTrn99/iAo5ayeT2gWT0/2SrHMCFOK3KYN6JWqFWOu/hXZEc YwAdgWhUiKYmROx2bquBXPSdt5Q2KVLHPp8hWnxoFehulKEzJYaeHW1BsfQMzYsE vz3wjFXWF9keAculF8IK+Gv3nBuFYndPh2Pa8169xAD2LhCx9sD6MebhbWKJJVhQ uLnR+wZ1hbz889Ao+VYasavb25jY3NAV2iRYjVt6yWGhs4+tViDeHVoru8gnDR0= =HPAb -----END PGP SIGNATURE----- --EKqRMNvcaHAat9w6SFNKR8VTIM5Kmq2Qq--