From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58444) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bsCs9-0001ni-Uy for qemu-devel@nongnu.org; Thu, 06 Oct 2016 13:54:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bsCs7-0006sk-W5 for qemu-devel@nongnu.org; Thu, 06 Oct 2016 13:54:21 -0400 References: <1475246744-29302-1-git-send-email-berrange@redhat.com> <1475246744-29302-11-git-send-email-berrange@redhat.com> <20161006151042.GG5188@noname.redhat.com> <20161006151830.GL14680@redhat.com> <20161006153005.GH5188@noname.redhat.com> From: Eric Blake Message-ID: <09ace787-0268-0c89-b0c1-65c6c0c3e8e6@redhat.com> Date: Thu, 6 Oct 2016 12:54:11 -0500 MIME-Version: 1.0 In-Reply-To: <20161006153005.GH5188@noname.redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="XAwlsTFINP9erokvKKQQ84PURePnIL1PR" Subject: Re: [Qemu-devel] [Qemu-block] [PATCH v14 10/21] qapi: permit auto-creating nested structs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , "Daniel P. Berrange" Cc: qemu-block@nongnu.org, Markus Armbruster , qemu-devel@nongnu.org, Max Reitz , Paolo Bonzini , =?UTF-8?Q?Andreas_F=c3=a4rber?= This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --XAwlsTFINP9erokvKKQQ84PURePnIL1PR From: Eric Blake To: Kevin Wolf , "Daniel P. Berrange" Cc: qemu-block@nongnu.org, Markus Armbruster , qemu-devel@nongnu.org, Max Reitz , Paolo Bonzini , =?UTF-8?Q?Andreas_F=c3=a4rber?= Message-ID: <09ace787-0268-0c89-b0c1-65c6c0c3e8e6@redhat.com> Subject: Re: [Qemu-block] [PATCH v14 10/21] qapi: permit auto-creating nested structs References: <1475246744-29302-1-git-send-email-berrange@redhat.com> <1475246744-29302-11-git-send-email-berrange@redhat.com> <20161006151042.GG5188@noname.redhat.com> <20161006151830.GL14680@redhat.com> <20161006153005.GH5188@noname.redhat.com> In-Reply-To: <20161006153005.GH5188@noname.redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/06/2016 10:30 AM, Kevin Wolf wrote: >>> So, considering that it is a purely internally used type not visible = in >>> QMP, would it make sense to change NetLegacy to be a flat union inste= ad, >>> with NetLegacyOptions as the common base? Then you get the same flat >>> namespace that we always had and that makes much more sense as an API= =2E >> >> Changing that will impact on the QMP data structure, so I don't think >> we can do that. >=20 > I don't see this type used in QMP at all. It's only used for command > line parsing, and only with the OptsVisitor, so I think we're fine if w= e > flatten it now. In fact, in all my work to move netdev_add towards QAPI, I intentionally special-cased NetLegacy to be unchanged, because it was not being used by QMP at the time, and I didn't want any QMP changes to netdev to break command line usage of NetLegacy. We still have the annoying problem that my last patch for converting netdev_add to QAPI didn't make 2.7, because we hadn't sorted out whether we wanted to be able to handle back-compat of a user that requested "1" vs. 1 (the QemuOpts code accepted either spelling, by virtue of the fact that QDict to opts conversion rewrote the parsed QMP object into all strings); and maybe this series solves that issue. But the issue for netdev_add (which IS visible to QMP) is slightly different than the issue for NetLegacy (which does not have QMP ties other than using QAPI to define a struct and glue code in net.c to map it back to normal netdev code). --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --XAwlsTFINP9erokvKKQQ84PURePnIL1PR Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJX9o/DAAoJEKeha0olJ0Nq7ykIALBEbKZrZvlMIdW19ssZMXKJ 9r6msu7Cviu6qq+4vKw5rwk4JGb0I/Ih81RcYxvdw4FLfdmsL1K+ClnfeW1pKKhk YHFWs/cYpt92FaxfCDGGegx2yHXRWP9raS2VJ4njxYkk9XEQDV/L59nzwFV+xsI0 6T8+eIJjIsLc42bwIdp9YO5J9d85TckF3tOLtoEPJheINxCQTArZkLYeEEG4IW69 tDgHiwS01klkZb37WBtFsNvkU0P5ibtPObjg5WGTx2vA0TZTVJqDm3dlwi/lywDs q/7zj8/4b1mYDYOOIMYliL3sDPuFPm82hTheiIGAwEgLLVNw1V2rfmr/jZxGkeE= =vyDd -----END PGP SIGNATURE----- --XAwlsTFINP9erokvKKQQ84PURePnIL1PR--