From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52089) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXyGR-0005cc-GR for qemu-devel@nongnu.org; Fri, 04 Sep 2015 17:11:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZXyGJ-0005KH-Dr for qemu-devel@nongnu.org; Fri, 04 Sep 2015 17:11:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33378) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXyGJ-0005Jq-69 for qemu-devel@nongnu.org; Fri, 04 Sep 2015 17:11:07 -0400 References: <7dcbdc8169de6b0090aa1ba89e7426fb3cd0e6cf.1440171025.git.DirtY.iCE.hu@gmail.com> <20150821231307.GD5816@thinpad.lan.raisama.net> <55D89BB8.4090201@gmail.com> <20150826153117.GF4230@thinpad.lan.raisama.net> From: Eric Blake Message-ID: <55EA08E9.1090800@redhat.com> Date: Fri, 4 Sep 2015 15:11:05 -0600 MIME-Version: 1.0 In-Reply-To: <20150826153117.GF4230@thinpad.lan.raisama.net> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="GobCFJobJBjTs4w8scDIP7HfERQLLHo6C" Subject: Re: [Qemu-devel] [PATCH v2 03/49] qapi: convert NumaOptions into a flat union List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost , =?UTF-8?B?S8WRdsOhZ8OzIFpvbHTDoW4=?= Cc: Markus Armbruster , qemu-devel@nongnu.org, Gerd Hoffmann This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --GobCFJobJBjTs4w8scDIP7HfERQLLHo6C Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 08/26/2015 09:31 AM, Eduardo Habkost wrote: > As long as somebody who understands QAPI says the changes make sense an= d > should work, I am OK with them if the following is changed: That would be me, right? See my other mail for my tentative R-b; although if you start renaming things due to this discussion, maybe I should review v3 more closely after all. >>>> +## >>>> +{ 'enum': 'NumaDriver', >>>> + 'data': [ 'node' ] } >>> >>> Why is the name "NumaDriver"? Below, the field is called "type", so w= hy >>> not something like "NumaOptionType"? >> >> No particular reason other than the example in docs/qapi-code-gen.txt = used >> driver. The field is called type because in the non-flat union the >> discriminator is called type. >=20 > In the docs/qapi-code-gen.txt example, the option is about an actual > blockdev driver, and the discriminator is really called "driver". >=20 > In this case, the field is called "type" and has nothing to do with > drivers, so something like NumaOptionType makes more sense. The enum name is not ABI (we can name it whatever makes sense), but does show up in the C code that interacts with the generated type. In fact, if you could name the enum type 'NumaOptionsKind', then the C enum name would not change (staying at NUMA_OPTIONS_KIND_NODE instead of your change to NUMA_DRIVER_NODE). Except that right now, the qapi generator doesn't allow user-defined types ending in 'Kind'. :( I don't know if naming it NumaDriver makes sense; and so your suggestion of naming it NumaOptionsType may be better in the long run. It would make your C enum become NUMA_OPTIONS_TYPE_NODE. Or maybe you wait for me to do a followup patch to the qapi generator to allow user-defined types ending in 'Kind'. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --GobCFJobJBjTs4w8scDIP7HfERQLLHo6C 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/ iQEcBAEBCAAGBQJV6gjpAAoJEKeha0olJ0NqgzYH/3VV652JLMuqI2FDlkRRrJ7b JFxZ4dYDUQyHozsLENwR7p43da4h87/EQntNpmaLo61D5VIIOYl0WFkNHaPhiv+H Q4Isd9F+gXTIvxLKoajxQBb8ThTKS4OX8LXN1JWil4fnrNsjGlWoXmzacyLypU3/ NCGIs3gfF92VeQpaB/mXhqKtmSuFIio3DM947N3tdOPZBFFp61HmjYeSA1H+Ivah gOKJqxJC8TlyBlNZrFV3VlFl8pcTIoesjTp0kOcoX7Nax/sxrY6Tc3BStLa2/HZ6 I0yLf9bZQgHUvPI244N9U9czgJKF0PrAJKddKyFK9gr0ZgHpcbH6OaYPp2C41gE= =zJWD -----END PGP SIGNATURE----- --GobCFJobJBjTs4w8scDIP7HfERQLLHo6C--