From d081a49af8c68ad6c8fe9b552e306c5bad7b4e61 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Tue, 21 Feb 2017 21:46:26 +0100 Subject: numa: Flatten simple union NumaOptions 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. NumaOptions isn't new, but it's only used internally, not in QMP. Convert it to a flat union. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <1487709988-14322-2-git-send-email-armbru@redhat.com> --- qapi-schema.json | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'qapi-schema.json') diff --git a/qapi-schema.json b/qapi-schema.json index e9a6364b7d..a448ea8767 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -5570,6 +5570,14 @@ '*head' : 'int', 'events' : [ 'InputEvent' ] } } +## +# @NumaOptionsType: +# +# Since: 2.1 +## +{ 'enum': 'NumaOptionsType', + 'data': [ 'node' ] } + ## # @NumaOptions: # @@ -5578,6 +5586,8 @@ # Since: 2.1 ## { 'union': 'NumaOptions', + 'base': { 'type': 'NumaOptionsType' }, + 'discriminator': 'type', 'data': { 'node': 'NumaNodeOptions' }} -- cgit v1.2.3 From d3be4b57cefde105299e234f0659b77f37920c72 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Tue, 21 Feb 2017 21:46:27 +0100 Subject: net: Flatten simple union NetLegacyOptions 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. NetLegacyOptions isn't new, but it's only used internally, not in QMP. Convert it to a flat union. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <1487709988-14322-3-git-send-email-armbru@redhat.com> --- qapi-schema.json | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'qapi-schema.json') diff --git a/qapi-schema.json b/qapi-schema.json index a448ea8767..5347781eca 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -3958,6 +3958,15 @@ '*name': 'str', 'opts': 'NetLegacyOptions' } } +## +# @NetLegacyOptionsType: +# +# Since: 1.2 +## +{ 'enum': 'NetLegacyOptionsType', + 'data': ['none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'vde', + 'dump', 'bridge', 'netmap', 'vhost-user'] } + ## # @NetLegacyOptions: # @@ -3966,6 +3975,8 @@ # Since: 1.2 ## { 'union': 'NetLegacyOptions', + 'base': { 'type': 'NetLegacyOptionsType' }, + 'discriminator': 'type', 'data': { 'none': 'NetdevNoneOptions', 'nic': 'NetLegacyNicOptions', -- cgit v1.2.3