From: "Kővágó Zoltán" <dirty.ice.hu@gmail.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>,
Michael Roth <mdroth@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [PATCH 4/5] qapi: support nested structs in OptsVisitor
Date: Fri, 3 Jul 2015 13:10:52 +0200 [thread overview]
Message-ID: <55966DBC.40702@gmail.com> (raw)
In-Reply-To: <87k2uiqx8k.fsf@blackfin.pond.sub.org>
2015-07-02 19:34 keltezéssel, Markus Armbruster írta:
> "Kővágó, Zoltán" <dirty.ice.hu@gmail.com> writes:
>
>> The current OptsVisitor flattens the whole structure, if there are same
>> named fields under different paths the current visitor can't cope with
>> them (it'll just set the first field, leaving the others unspecified (if
>> they're optional) or erroring out (if they're required).
>>
>> This patch add support for it, by always requiring a complete path in
>> case of nested structs. Fields in the path are separated by dots,
>> similar to C structs (without pointers), like `foo.bar'.
>>
>> You must provide a full path even in non-ambigous cases. The previous
>> two commits hopefully ensures that this change doesn't create backward
>> compatibility problems.
>>
>> Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com>
>>
>> ---
>>
>> Rationale for this commit: see these threads
>> http://lists.nongnu.org/archive/html/qemu-devel/2015-06/msg04189.html
>> http://lists.nongnu.org/archive/html/qemu-devel/2015-06/msg04186.html
>
> So, despite your flattening work, we still need to parse option strings
> into nested QAPI types?
The reason why this whole flattening stuff is done it's because
otherwise this nested parsing patch breaks backward compatibility.
>
> Can you give examples of the need for such nested QAPI types in
> configuration? I may have seen them already in your audio patches, but
> I think having some right here would be useful.
I'm afraid that only the audio patches contains code that actually use
this new feature. But that has a lot of configuration options that
apply to both input and output, and having a shared struct that is
available via `in.' and `out.' is better than having to manually
duplicate all these settings under unique names in a single struct (like
in_frequency, out_frequency, in_channels, out_channels, ...).
next prev parent reply other threads:[~2015-07-03 11:10 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-23 13:32 [Qemu-devel] [PATCH 0/5] qapi flattening + some miscellaneous patches Kővágó, Zoltán
2015-06-23 13:32 ` [Qemu-devel] [PATCH 1/5] qapi: support implicit structs in OptsVisitor Kővágó, Zoltán
2015-06-23 13:32 ` [Qemu-devel] [PATCH 2/5] qapi: convert NumaOptions into a flat union Kővágó, Zoltán
2015-07-02 17:25 ` Markus Armbruster
2015-06-23 13:32 ` [Qemu-devel] [PATCH 3/5] qapi: change Netdev and NetLegacy " Kővágó, Zoltán
2015-07-02 17:17 ` Markus Armbruster
2015-06-23 13:33 ` [Qemu-devel] [PATCH 4/5] qapi: support nested structs in OptsVisitor Kővágó, Zoltán
2015-07-02 17:34 ` Markus Armbruster
2015-07-03 11:10 ` Kővágó Zoltán [this message]
2015-06-23 13:33 ` [Qemu-devel] [PATCH 5/5] opts: produce valid command line in qemu_opts_print Kővágó, Zoltán
2015-07-02 17:58 ` Markus Armbruster
2015-06-25 6:16 ` [Qemu-devel] [PATCH 0/5] qapi flattening + some miscellaneous patches Gerd Hoffmann
2015-06-25 7:57 ` Markus Armbruster
2015-06-25 8:53 ` Thomas Huth
2015-06-25 14:01 ` Gerd Hoffmann
2015-07-02 18:00 ` Markus Armbruster
2015-07-03 7:00 ` Gerd Hoffmann
2015-07-03 9:09 ` Markus Armbruster
2015-07-03 10:04 ` Markus Armbruster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55966DBC.40702@gmail.com \
--to=dirty.ice.hu@gmail.com \
--cc=armbru@redhat.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).