qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH v2 0/3] Flatten simple unions where we still can
Date: Tue, 21 Feb 2017 21:46:25 +0100	[thread overview]
Message-ID: <1487709988-14322-1-git-send-email-armbru@redhat.com> (raw)

Simple unions are simpler than flat unions in the schema, but more
complicated in C and on the QMP wire: there's extra indirection in C
and extra nesting on the wire, both pointless.  They're best avoided
in new code.

But we can do more: we can flatten the simple unions that aren't used
in QMP.

In the longer run, I'd love to get rid of simple unions entirely, and
reduce the notational overhead of flat unions in the schema.

v2:
* PATCH 1+2: Since: added [Eric], commit message tweaked
* PATCH 3: new

Markus Armbruster (3):
  numa: Flatten simple union NumaOptions
  net: Flatten simple union NetLegacyOptions
  i386/cpu: net: Flatten simple union GuestPanicInformationType

 net/net.c         | 44 ++++++++++++++++++++++----------------------
 numa.c            |  4 ++--
 qapi-schema.json  | 35 +++++++++++++++++++++++++++++++++--
 target/i386/cpu.c | 17 ++++++-----------
 vl.c              | 12 ++++++------
 5 files changed, 69 insertions(+), 43 deletions(-)

-- 
2.7.4

             reply	other threads:[~2017-02-21 20:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-21 20:46 Markus Armbruster [this message]
2017-02-21 20:46 ` [Qemu-devel] [PATCH v2 1/3] numa: Flatten simple union NumaOptions Markus Armbruster
2017-02-21 20:46 ` [Qemu-devel] [PATCH v2 2/3] net: Flatten simple union NetLegacyOptions Markus Armbruster
2017-02-21 20:46 ` [Qemu-devel] [PATCH v2 3/3] i386/cpu: net: Flatten simple union GuestPanicInformationType Markus Armbruster
2017-02-22 15:14   ` Eric Blake
2017-02-22 18:46     ` 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=1487709988-14322-1-git-send-email-armbru@redhat.com \
    --to=armbru@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).