All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH for-2.7 v8 00/16] qapi netdev_add introspection (post-introspection cleanups subset F)
@ 2016-07-03  2:58 Eric Blake
  2016-07-03  2:58 ` [Qemu-devel] [PATCH v8 01/16] net: use Netdev instead of NetClientOptions in client init Eric Blake
                   ` (16 more replies)
  0 siblings, 17 replies; 29+ messages in thread
From: Eric Blake @ 2016-07-03  2:58 UTC (permalink / raw)
  To: qemu-devel; +Cc: armbru

It's time to expose QMP 'netdev_add' through introspection, and
to add boxed commands/events so that we can drastically reduce
the number of C parameters needed to implement a command that
matches a large QAPI type.

Prerequistes:
Markus' qapi-next branch (including my clone visitor)

available as a tag at:
git fetch git://repo.or.cz/qemu/ericb.git qapi-cleanupv8f
or as part of my qapi branch:
git fetch git://repo.or.cz/qemu/ericb.git qapi

v7 was here:
https://lists.gnu.org/archive/html/qemu-devel/2016-05/msg03569.html

Since then, I've addressed a lot of Markus' comments:
- drop 1/15
- split out a couple of patches
- wording tweaks, more justifications in some commit messages
- rebase to master
- allow boxed alternates, in addition to boxed unions
- forbid empty anonymous branches for now

001/16:[----] [--] 'net: use Netdev instead of NetClientOptions in client init'
002/16:[----] [--] 'qapi: Require all branches of flat union enum to be covered'
003/16:[----] [--] 'qapi: Hide tag_name data member of variants'
004/16:[0006] [FC] 'qapi: Add type.is_empty() helper'
005/16:[down] 'qapi: Drop useless gen_err_check()'
006/16:[down] 'qapi-event: Simplify visit of non-implicit data'
007/16:[0028] [FC] 'qapi: Plumb in 'box' to qapi generator lower levels'
008/16:[0121] [FC] 'qapi: Implement boxed types for commands/events'
009/16:[0002] [FC] 'block: Simplify block_set_io_throttle'
010/16:[0023] [FC] 'block: Simplify drive-mirror'
011/16:[0026] [FC] 'qapi-event: Reduce chance of collision with event data'
012/16:[0042] [FC] 'qapi: Change Netdev into a flat union'
013/16:[----] [--] 'net: Use correct type for bool flag'
014/16:[0008] [FC] 'net: Complete qapi-fication of netdev_add'
015/16:[0037] [FC] 'qapi: Allow anonymous branch types in flat union'
016/16:[----] [--] 'schema: Drop pointless empty type CpuInfoOther'

Other patches on my QAPI queue:
- posted, but needs another respin and might not make 2.7:
JSON output visitor
- not posted, and therefore most likely not 2.7 material:
anything we need to do to make 'blockdev-add' work smoothly
(we may want to allow a flat union with a default value for its
discriminator, and/or add a way to express mutually-exclusive
members in a qapi dict)

Other potential general QAPI patches, but not necessarily that I will write:
- Marc-Andre's cleanups
- convert more clients to use boxed commands
- get rid of has_FOO when FOO is pointer
- support default values (and get rid of has_FOO when FOO has default)
- QAPI-fy device_add
- ???

Eric Blake (15):
  qapi: Require all branches of flat union enum to be covered
  qapi: Hide tag_name data member of variants
  qapi: Add type.is_empty() helper
  qapi: Drop useless gen_err_check()
  qapi-event: Simplify visit of non-implicit data
  qapi: Plumb in 'box' to qapi generator lower levels
  qapi: Implement boxed types for commands/events
  block: Simplify block_set_io_throttle
  block: Simplify drive-mirror
  qapi-event: Reduce chance of collision with event data
  qapi: Change Netdev into a flat union
  net: Use correct type for bool flag
  net: Complete qapi-fication of netdev_add
  qapi: Allow anonymous branch types in flat union
  schema: Drop pointless empty type CpuInfoOther

Kővágó, Zoltán (1):
  net: use Netdev instead of NetClientOptions in client init

 qapi-schema.json                                   |  76 +++++----
 qapi/block-core.json                               |  40 ++++-
 scripts/qapi.py                                    | 153 ++++++++++++-----
 scripts/qapi-commands.py                           |  31 ++--
 scripts/qapi-event.py                              |  71 +++++---
 scripts/qapi-introspect.py                         |   4 +-
 scripts/qapi-types.py                              |   2 +-
 scripts/qapi-visit.py                              |  22 ++-
 include/net/net.h                                  |   8 +-
 net/clients.h                                      |  20 +--
 blockdev.c                                         | 187 ++++++++-------------
 hmp.c                                              |  72 +++-----
 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/e1000e.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                                 |  20 +--
 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 +-
 monitor.c                                          |  14 +-
 net/dump.c                                         |   8 +-
 net/filter.c                                       |   2 +-
 net/hub.c                                          |  24 +--
 net/l2tpv3.c                                       |   8 +-
 net/net.c                                          | 164 +++++++++++-------
 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                                   |  22 +--
 tests/test-qmp-commands.c                          |   8 +
 docs/qapi-code-gen.txt                             |  27 ++-
 qmp-commands.hx                                    |   2 +-
 tests/Makefile.include                             |   7 +
 tests/qapi-schema/args-bad-box.err                 |   1 +
 tests/qapi-schema/args-bad-box.exit                |   1 +
 tests/qapi-schema/args-bad-box.json                |   2 +
 tests/qapi-schema/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 +
 tests/qapi-schema/args-box-anon.out                |   0
 tests/qapi-schema/args-box-empty.err               |   1 +
 tests/qapi-schema/args-box-empty.exit              |   1 +
 tests/qapi-schema/args-box-empty.json              |   3 +
 tests/qapi-schema/args-box-empty.out               |   0
 tests/qapi-schema/args-box-string.err              |   1 +
 tests/qapi-schema/args-box-string.exit             |   1 +
 tests/qapi-schema/args-box-string.json             |   2 +
 tests/qapi-schema/args-box-string.out              |   0
 tests/qapi-schema/args-union.err                   |   2 +-
 tests/qapi-schema/args-union.json                  |   3 +-
 tests/qapi-schema/event-box-empty.err              |   1 +
 tests/qapi-schema/event-box-empty.exit             |   1 +
 tests/qapi-schema/event-box-empty.json             |   2 +
 tests/qapi-schema/event-box-empty.out              |   0
 tests/qapi-schema/event-case.out                   |   1 +
 tests/qapi-schema/flat-union-incomplete-branch.err |   1 +
 .../qapi-schema/flat-union-incomplete-branch.exit  |   1 +
 .../qapi-schema/flat-union-incomplete-branch.json  |   9 +
 tests/qapi-schema/flat-union-incomplete-branch.out |   0
 tests/qapi-schema/flat-union-inline.err            |   2 +-
 tests/qapi-schema/flat-union-inline.json           |   5 +-
 tests/qapi-schema/ident-with-escape.out            |   2 +-
 tests/qapi-schema/indented-expr.out                |   4 +-
 tests/qapi-schema/qapi-schema-test.json            |  12 +-
 tests/qapi-schema/qapi-schema-test.out             |  44 ++++-
 tests/qapi-schema/test-qapi.py                     |  11 +-
 tests/qapi-schema/union-inline.err                 |   1 +
 tests/qapi-schema/union-inline.exit                |   1 +
 tests/qapi-schema/union-inline.json                |   4 +
 tests/qapi-schema/union-inline.out                 |   0
 100 files changed, 732 insertions(+), 526 deletions(-)
 create mode 100644 tests/qapi-schema/args-bad-box.err
 create mode 100644 tests/qapi-schema/args-bad-box.exit
 create mode 100644 tests/qapi-schema/args-bad-box.json
 create mode 100644 tests/qapi-schema/args-bad-box.out
 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
 create mode 100644 tests/qapi-schema/args-box-anon.out
 create mode 100644 tests/qapi-schema/args-box-empty.err
 create mode 100644 tests/qapi-schema/args-box-empty.exit
 create mode 100644 tests/qapi-schema/args-box-empty.json
 create mode 100644 tests/qapi-schema/args-box-empty.out
 create mode 100644 tests/qapi-schema/args-box-string.err
 create mode 100644 tests/qapi-schema/args-box-string.exit
 create mode 100644 tests/qapi-schema/args-box-string.json
 create mode 100644 tests/qapi-schema/args-box-string.out
 create mode 100644 tests/qapi-schema/event-box-empty.err
 create mode 100644 tests/qapi-schema/event-box-empty.exit
 create mode 100644 tests/qapi-schema/event-box-empty.json
 create mode 100644 tests/qapi-schema/event-box-empty.out
 create mode 100644 tests/qapi-schema/flat-union-incomplete-branch.err
 create mode 100644 tests/qapi-schema/flat-union-incomplete-branch.exit
 create mode 100644 tests/qapi-schema/flat-union-incomplete-branch.json
 create mode 100644 tests/qapi-schema/flat-union-incomplete-branch.out
 create mode 100644 tests/qapi-schema/union-inline.err
 create mode 100644 tests/qapi-schema/union-inline.exit
 create mode 100644 tests/qapi-schema/union-inline.json
 create mode 100644 tests/qapi-schema/union-inline.out

-- 
2.5.5

^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2016-07-13 21:05 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-03  2:58 [Qemu-devel] [PATCH for-2.7 v8 00/16] qapi netdev_add introspection (post-introspection cleanups subset F) Eric Blake
2016-07-03  2:58 ` [Qemu-devel] [PATCH v8 01/16] net: use Netdev instead of NetClientOptions in client init Eric Blake
2016-07-03  2:58 ` [Qemu-devel] [PATCH v8 02/16] qapi: Require all branches of flat union enum to be covered Eric Blake
2016-07-03  2:58 ` [Qemu-devel] [PATCH v8 03/16] qapi: Hide tag_name data member of variants Eric Blake
2016-07-03  2:58 ` [Qemu-devel] [PATCH v8 04/16] qapi: Add type.is_empty() helper Eric Blake
2016-07-03  2:58 ` [Qemu-devel] [PATCH v8 05/16] qapi: Drop useless gen_err_check() Eric Blake
2016-07-03  2:58 ` [Qemu-devel] [PATCH v8 06/16] qapi-event: Simplify visit of non-implicit data Eric Blake
2016-07-03  2:58 ` [Qemu-devel] [PATCH v8 07/16] qapi: Plumb in 'box' to qapi generator lower levels Eric Blake
2016-07-03  2:58 ` [Qemu-devel] [PATCH v8 08/16] qapi: Implement boxed types for commands/events Eric Blake
2016-07-07 10:52   ` Markus Armbruster
2016-07-07 16:02     ` Eric Blake
2016-07-08  7:06       ` Markus Armbruster
2016-07-03  2:58 ` [Qemu-devel] [PATCH v8 09/16] block: Simplify block_set_io_throttle Eric Blake
2016-07-03  2:58 ` [Qemu-devel] [PATCH v8 10/16] block: Simplify drive-mirror Eric Blake
2016-07-05 20:27   ` [Qemu-devel] [Qemu-block] " John Snow
2016-07-05 22:16     ` Eric Blake
2016-07-05 22:17       ` John Snow
2016-07-03  2:58 ` [Qemu-devel] [PATCH v8 11/16] qapi-event: Reduce chance of collision with event data Eric Blake
2016-07-07 11:37   ` Markus Armbruster
2016-07-13 21:05     ` Eric Blake
2016-07-03  2:58 ` [Qemu-arm] [PATCH v8 12/16] qapi: Change Netdev into a flat union Eric Blake
2016-07-03  2:58   ` Eric Blake
2016-07-03  2:58   ` [Qemu-devel] " Eric Blake
2016-07-03  2:58 ` [Qemu-devel] [PATCH v8 13/16] net: Use correct type for bool flag Eric Blake
2016-07-03  2:58 ` [Qemu-devel] [PATCH v8 14/16] net: Complete qapi-fication of netdev_add Eric Blake
2016-07-07 12:57   ` Markus Armbruster
2016-07-03  2:58 ` [Qemu-devel] [PATCH v8 15/16] qapi: Allow anonymous branch types in flat union Eric Blake
2016-07-03  2:58 ` [Qemu-devel] [PATCH v8 16/16] schema: Drop pointless empty type CpuInfoOther Eric Blake
2016-07-07 13:40 ` [Qemu-devel] [PATCH for-2.7 v8 00/16] qapi netdev_add introspection (post-introspection cleanups subset F) Markus Armbruster

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.