[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/5] qapi: convert NumaOptions into a flat union
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH 2/5] qapi: convert NumaOptions into a flat union |
Date: |
Thu, 02 Jul 2015 19:25:39 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
"Kővágó, Zoltán" <address@hidden> writes:
> Signed-off-by: Kővágó, Zoltán <address@hidden>
> ---
> numa.c | 2 +-
> qapi-schema.json | 47 ++++++++++++++++++++++++++++++++++++-----------
> 2 files changed, 37 insertions(+), 12 deletions(-)
>
> diff --git a/numa.c b/numa.c
> index 91fc6c1..8b0755d 100644
> --- a/numa.c
> +++ b/numa.c
> @@ -140,7 +140,7 @@ static int parse_numa(void *opaque, QemuOpts *opts, Error
> **errp)
> }
>
> switch (object->kind) {
> - case NUMA_OPTIONS_KIND_NODE:
> + case NUMA_DRIVER_NODE:
> numa_node_parse(object->node, opts, &err);
> if (err) {
> goto error;
> diff --git a/qapi-schema.json b/qapi-schema.json
> index 106008c..7ebf99e 100644
> --- a/qapi-schema.json
> +++ b/qapi-schema.json
> @@ -3537,17 +3537,6 @@
> 'data': { '*console':'int', 'events': [ 'InputEvent' ] } }
>
> ##
> -# @NumaOptions
> -#
> -# A discriminated record of NUMA options. (for OptsVisitor)
> -#
> -# Since 2.1
> -##
> -{ 'union': 'NumaOptions',
> - 'data': {
> - 'node': 'NumaNodeOptions' }}
> -
> -##
> # @NumaNodeOptions
> #
> # Create a guest NUMA node. (for OptsVisitor)
> @@ -3574,6 +3563,42 @@
> '*memdev': 'str' }}
>
> ##
> +# @NumaDriver
> +#
> +# List of possible numa drivers.
> +#
> +# Since: 2.4
> +##
> +{ 'enum': 'NumaDriver',
> + 'data': [ 'node' ] }
> +
> +##
> +# @NumaCommonOptions
> +#
> +# Common set of numa options.
> +#
> +# @type: the numa driver to use
> +#
> +# Since: 2.4
> +##
> +{ 'struct': 'NumaCommonOptions',
> + 'data': {
> + 'type': 'NumaDriver' } }
> +
> +##
> +# @NumaOptions
> +#
> +# A discriminated record of NUMA options. (for OptsVisitor)
> +#
> +# Since 2.1
> +##
> +{ 'union': 'NumaOptions',
> + 'base': 'NumaCommonOptions',
> + 'discriminator': 'type',
> + 'data': {
> + 'node': 'NumaNodeOptions' }}
> +
> +##
> # @HostMemPolicy
> #
> # Host memory policy types
Here, the notational overhead of flat unions borders on the ridiculous.
Anyway, faithful conversion.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [PATCH 2/5] qapi: convert NumaOptions into a flat union,
Markus Armbruster <=