From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34093) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aBqRs-0007ng-2A for qemu-devel@nongnu.org; Wed, 23 Dec 2015 15:55:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aBqRo-0000zN-RP for qemu-devel@nongnu.org; Wed, 23 Dec 2015 15:55:52 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57760) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aBqRo-0000zB-Jp for qemu-devel@nongnu.org; Wed, 23 Dec 2015 15:55:48 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id F2E50C0B9300 for ; Wed, 23 Dec 2015 20:55:47 +0000 (UTC) From: Eric Blake Date: Wed, 23 Dec 2015 13:55:29 -0700 Message-Id: <1450904145-17721-1-git-send-email-eblake@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH v6 00/16] qapi netdev_add introspection (post-introspection cleanups subset F) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: armbru@redhat.com Prerequisites: + my qapi cleanups subset E v8: https://lists.gnu.org/archive/html/qemu-devel/2015-12/msg03863.html This is the final subset of my original cleanups series v5. The focus here is adding a 'box':true parameter and anonymous flat union base syntax, so that we can finally represent netdev_add as a full-fledged qapi command that shows up in introspection rather than as a magic command with undocumented arguments. v6 notes: Rebase, since there are several other series that want features from this subset. Backport diffstat: 001/16:[0096] [FC] 'net: use Netdev instead of NetClientOptions in client= init' 002/16:[0021] [FC] 'qapi: Avoid use of 'data' member of qapi unions' 003/16:[0010] [FC] 'qapi: Forbid empty unions and useless alternates' 004/16:[0014] [FC] 'qapi: Drop useless 'data' member of unions' 005/16:[0017] [FC] 'qapi: Hide tag_name data member of variants' 006/16:[0049] [FC] 'qapi: Plumb in 'box' to qapi generator lower levels' 007/16:[down] 'qapi: Implement boxed types for commands/events' 008/16:[0008] [FC] 'qapi: support implicit structs in OptsVisitor' 009/16:[0092] [FC] 'qapi: Change Netdev into a flat union' 010/16:[----] [-C] 'net: Use correct type for bool flag' 011/16:[0023] [FC] 'net: Complete qapi-fication of netdev_add' 012/16:[0049] [FC] 'qapi: Allow anonymous base for flat union' 013/16:[down] 'qapi: Use anonymous base in SchemaInfo' 014/16:[down] 'qapi: Use anonymous base in Netdev' 015/16:[down] 'qapi: Use anonymous base in CpuInfo' 016/16:[down] 'qapi: Populate info['name'] for each entity' v5 notes: https://lists.gnu.org/archive/html/qemu-devel/2015-09/msg05410.html see the archives for more Eric Blake (13): qapi: Avoid use of 'data' member of qapi unions qapi: Forbid empty unions and useless alternates qapi: Drop useless 'data' member of unions qapi: Hide tag_name data member of variants qapi: Plumb in 'box' to qapi generator lower levels qapi: Implement boxed types for commands/events net: Use correct type for bool flag net: Complete qapi-fication of netdev_add qapi: Allow anonymous base for flat union qapi: Use anonymous base in SchemaInfo qapi: Use anonymous base in Netdev qapi: Use anonymous base in CpuInfo qapi: Populate info['name'] for each entity K=C5=91v=C3=A1g=C3=B3, Zolt=C3=A1n (3): net: use Netdev instead of NetClientOptions in client init qapi: support implicit structs in OptsVisitor qapi: Change Netdev into a flat union blockdev.c | 31 ++-- docs/qapi-code-gen.txt | 67 ++++++--- hw/arm/musicpal.c | 2 +- hw/core/qdev-properties-system.c | 2 +- hw/net/allwinner_emac.c | 2 +- hw/net/cadence_gem.c | 2 +- hw/net/dp8393x.c | 2 +- hw/net/e1000.c | 2 +- hw/net/eepro100.c | 2 +- hw/net/etraxfs_eth.c | 2 +- hw/net/fsl_etsec/etsec.c | 2 +- hw/net/imx_fec.c | 2 +- hw/net/lan9118.c | 2 +- hw/net/lance.c | 2 +- hw/net/mcf_fec.c | 2 +- hw/net/milkymist-minimac2.c | 2 +- hw/net/mipsnet.c | 2 +- hw/net/ne2000-isa.c | 2 +- hw/net/ne2000.c | 2 +- hw/net/opencores_eth.c | 2 +- hw/net/pcnet-pci.c | 2 +- hw/net/rocker/rocker_fp.c | 2 +- hw/net/rtl8139.c | 2 +- hw/net/smc91c111.c | 2 +- hw/net/spapr_llan.c | 2 +- hw/net/stellaris_enet.c | 2 +- hw/net/vhost_net.c | 16 +- hw/net/virtio-net.c | 10 +- hw/net/vmxnet3.c | 2 +- hw/net/xen_nic.c | 2 +- hw/net/xgmac.c | 2 +- hw/net/xilinx_axienet.c | 2 +- hw/net/xilinx_ethlite.c | 2 +- hw/usb/dev-network.c | 4 +- include/net/net.h | 7 +- monitor.c | 14 +- net/clients.h | 20 +-- net/dump.c | 8 +- net/hub.c | 24 +-- net/l2tpv3.c | 8 +- net/net.c | 161 +++++++++++++--= ------ net/netmap.c | 6 +- net/slirp.c | 8 +- net/socket.c | 10 +- net/tap-win32.c | 8 +- net/tap.c | 28 ++-- net/vde.c | 8 +- net/vhost-user.c | 20 +-- qapi-schema.json | 82 ++++++----- qapi/introspect.json | 12 +- qapi/opts-visitor.c | 15 ++ qmp-commands.hx | 2 +- scripts/qapi-commands.py | 75 ++++++---- scripts/qapi-event.py | 43 ++++-- scripts/qapi-introspect.py | 4 +- scripts/qapi-types.py | 17 +-- scripts/qapi-visit.py | 10 +- scripts/qapi.py | 116 ++++++++++----- tests/Makefile | 4 +- tests/qapi-schema/alternate-empty.err | 1 + tests/qapi-schema/alternate-empty.exit | 2 +- tests/qapi-schema/alternate-empty.json | 2 +- tests/qapi-schema/alternate-empty.out | 5 - tests/qapi-schema/args-bad-box.err | 1 + ...{flat-union-bad-base.exit =3D> args-bad-box.exit} | 0 tests/qapi-schema/args-bad-box.json | 2 + .../{union-clash-data.err =3D> args-bad-box.out} | 0 tests/qapi-schema/args-box-anon.err | 1 + tests/qapi-schema/args-box-anon.exit | 1 + tests/qapi-schema/args-box-anon.json | 2 + .../{flat-union-bad-base.out =3D> args-box-anon.out} | 0 tests/qapi-schema/args-union.err | 2 +- tests/qapi-schema/args-union.json | 3 +- tests/qapi-schema/event-case.out | 1 + tests/qapi-schema/flat-union-bad-base.err | 1 - tests/qapi-schema/flat-union-bad-base.json | 13 -- tests/qapi-schema/flat-union-empty.err | 1 + tests/qapi-schema/flat-union-empty.exit | 2 +- tests/qapi-schema/flat-union-empty.json | 2 +- tests/qapi-schema/flat-union-empty.out | 10 -- tests/qapi-schema/ident-with-escape.out | 2 +- tests/qapi-schema/indented-expr.out | 4 +- tests/qapi-schema/qapi-schema-test.json | 10 +- tests/qapi-schema/qapi-schema-test.out | 47 ++++-- tests/qapi-schema/test-qapi.py | 11 +- tests/qapi-schema/union-clash-data.exit | 1 - tests/qapi-schema/union-clash-data.json | 7 - tests/qapi-schema/union-clash-data.out | 11 -- tests/qapi-schema/union-empty.err | 1 + tests/qapi-schema/union-empty.exit | 2 +- tests/qapi-schema/union-empty.json | 2 +- tests/qapi-schema/union-empty.out | 7 - tests/test-qmp-commands.c | 12 ++ ui/input.c | 2 +- 94 files changed, 604 insertions(+), 463 deletions(-) create mode 100644 tests/qapi-schema/args-bad-box.err rename tests/qapi-schema/{flat-union-bad-base.exit =3D> args-bad-box.exi= t} (100%) create mode 100644 tests/qapi-schema/args-bad-box.json rename tests/qapi-schema/{union-clash-data.err =3D> args-bad-box.out} (1= 00%) create mode 100644 tests/qapi-schema/args-box-anon.err create mode 100644 tests/qapi-schema/args-box-anon.exit create mode 100644 tests/qapi-schema/args-box-anon.json rename tests/qapi-schema/{flat-union-bad-base.out =3D> args-box-anon.out= } (100%) delete mode 100644 tests/qapi-schema/flat-union-bad-base.err delete mode 100644 tests/qapi-schema/flat-union-bad-base.json delete mode 100644 tests/qapi-schema/union-clash-data.exit delete mode 100644 tests/qapi-schema/union-clash-data.json delete mode 100644 tests/qapi-schema/union-clash-data.out --=20 2.4.3