Received: from eggs.gnu.org ([2001:4830:134:3::10]:57713) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZSvUm-0007bQ-3W for qemu-devel@nongnu.org; Fri, 21 Aug 2015 19:13:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZSvUi-0003EN-T8 for qemu-devel@nongnu.org; Fri, 21 Aug 2015 19:13:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39023) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZSvUi-0003EH-P4 for qemu-devel@nongnu.org; Fri, 21 Aug 2015 19:13:08 -0400 Date: Fri, 21 Aug 2015 16:13:07 -0700 From: Eduardo Habkost Message-ID: <20150821231307.GD5816@thinpad.lan.raisama.net> References: <7dcbdc8169de6b0090aa1ba89e7426fb3cd0e6cf.1440171025.git.DirtY.iCE.hu@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <7dcbdc8169de6b0090aa1ba89e7426fb3cd0e6cf.1440171025.git.DirtY.iCE.hu@gmail.com> Content-Transfer-Encoding: quoted-printable 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: =?utf-8?B?S8WRdsOhZ8OzLCBab2x0w6Fu?= Cc: Markus Armbruster , qemu-devel@nongnu.org, Gerd Hoffmann On Fri, Aug 21, 2015 at 05:36:59PM +0200, K=C5=91v=C3=A1g=C3=B3, Zolt=C3=A1= n wrote: > Signed-off-by: K=C5=91v=C3=A1g=C3=B3, Zolt=C3=A1n I don't understand QAPI enough to understand why exactly this is needed (so I would like to get feedback from somebody who actually understands QAPI unions), but I have one comment below. [...] > ## > +# @NumaDriver > +# > +# List of possible numa drivers. > +# > +# Since: 2.5 > +## > +{ 'enum': 'NumaDriver', > + 'data': [ 'node' ] } Why is the name "NumaDriver"? Below, the field is called "type", so why not something like "NumaOptionType"? > + > +## > +# @NumaCommonOptions > +# > +# Common set of numa options. > +# > +# @type: the numa driver to use > +# > +# Since: 2.5 > +## > +{ 'struct': 'NumaCommonOptions', > + 'data': { > + 'type': 'NumaDriver' } } > + > +## > +# @NumaOptions > +# > +# A discriminated record of NUMA options. (for OptsVisitor) > +# > +# Since 2.1 > +## > +{ 'union': 'NumaOptions', > + 'base': 'NumaCommonOptions', > + 'discriminator': 'type', > + 'data': { > + 'node': 'NumaNodeOptions' }} > + > +## > # @HostMemPolicy > # > # Host memory policy types > --=20 > 2.5.0 >=20 --=20 Eduardo