From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45791) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X6kk5-0005h2-FR for qemu-devel@nongnu.org; Mon, 14 Jul 2014 14:12:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X6kk4-0001Rl-1o for qemu-devel@nongnu.org; Mon, 14 Jul 2014 14:12:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53558) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X6kk3-0001R0-Qi for qemu-devel@nongnu.org; Mon, 14 Jul 2014 14:12:47 -0400 Date: Mon, 14 Jul 2014 14:12:43 -0400 From: Luiz Capitulino Message-ID: <20140714141243.6390520f@redhat.com> In-Reply-To: <53C05590.40409@redhat.com> 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> <53C05590.40409@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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: Eric Blake Cc: famz@redhat.com, Markus Armbruster , wenchaoqemu@gmail.com, qemu-devel On Fri, 11 Jul 2014 15:22:24 -0600 Eric Blake wrote: > 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', 'micro': 'int'}, > >>>> 'package': 'str'} } > >>> > >>> And the fix may be as simple as ditching support for nested structs in > >>> 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 misuses > >> of c_var() left. > > > > This is an honest question: do we really want to drop nested struct support, > > 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 Right, this makes sense. Thanks for the URLs. Is there anyone planning on doing this? I don't think I'll have cycles anytime soon... I'd be willing to merge my fix if nobody steps up.