From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40602) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZenZi-0004O5-Oq for qemu-devel@nongnu.org; Wed, 23 Sep 2015 13:11:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZenZg-0000dE-3B for qemu-devel@nongnu.org; Wed, 23 Sep 2015 13:11:22 -0400 Received: from mail-wi0-x235.google.com ([2a00:1450:400c:c05::235]:38054) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZenZf-0000ct-Sa for qemu-devel@nongnu.org; Wed, 23 Sep 2015 13:11:20 -0400 Received: by wiclk2 with SMTP id lk2so79237407wic.1 for ; Wed, 23 Sep 2015 10:11:19 -0700 (PDT) From: "=?UTF-8?B?S8WRdsOhZ8OzIFpvbHTDoW4=?=" References: <7567ba6259b039b5d89faf658c8f52d500e2595c.1443017811.git.DirtY.iCE.hu@gmail.com> <5602B9C5.9020505@redhat.com> Message-ID: <5602DBEE.4070706@gmail.com> Date: Wed, 23 Sep 2015 19:05:50 +0200 MIME-Version: 1.0 In-Reply-To: <5602B9C5.9020505@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v2 1/3] qapi: convert NumaOptions into a flat union List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , qemu-devel@nongnu.org Cc: Eduardo Habkost , Markus Armbruster 2015-09-23 16:40 keltezéssel, Eric Blake írta: > On 09/23/2015 08:27 AM, Kővágó, Zoltán wrote: >> Changes the NumaOptions to flat union from a simple one. This is >> required by my later OptsVisitor patch to preserve backward >> compatibility. >> >> Strictly speaking this would break QMP compatibility (as specified in >> docs/qapi-code-gen.txt), but since no QMP command use this structure, >> it's not an issue. The -numa option syntax doesn't change. There are >> some changes in the C api, but this patch fixes them. >> >> Signed-off-by: Kővágó, Zoltán >> Reviewed-by: Eric Blake >> >> --- >> >> Changes from v1: >> * fixed documentation > > Since you're basing this on top of my pending series, why not take > advantage of it... Oh, so now that's possible. I was too lazy to read the changes you have made to qapi... Then I suppose I should do the same thing with NetLegacy. > > >> +## >> +# @NumaCommonOptions >> +# >> +# Common set of numa options. >> +# >> +# @type: NUMA command-line option type. >> +# >> +# Since: 2.5 >> +## >> +{ 'struct': 'NumaCommonOptions', >> + 'data': { >> + 'type': 'NumaOptionType' } } > > ...by dropping this type, and instead... > >> + >> +## >> +# @NumaOptions >> +# > > ...document @type here, and... > >> +# A discriminated record of NUMA options. (for OptsVisitor) >> +# >> +# Since 2.1 >> +## >> +{ 'union': 'NumaOptions', >> + 'base': 'NumaCommonOptions', > > ...write this as 'base': { 'type': 'NumaOptionType' }, > >> + 'discriminator': 'type', >> + 'data': { >> + 'node': 'NumaNodeOptions' }} >> + >> +## >> # @HostMemPolicy >> # >> # Host memory policy types >> >