From: Eric Blake <eblake@redhat.com>
To: Markus Armbruster <armbru@redhat.com>, qemu-devel@nongnu.org
Cc: mdroth@linux.vnet.ibm.com
Subject: Re: [PATCH v3 12/34] qapi: Add feature flags to remaining definitions
Date: Mon, 16 Mar 2020 12:55:38 -0500 [thread overview]
Message-ID: <a6b5dcd4-6ac7-adef-d3c0-20a6a9748bd3@redhat.com> (raw)
In-Reply-To: <20200315144653.22660-13-armbru@redhat.com>
On 3/15/20 9:46 AM, Markus Armbruster wrote:
> In v4.1.0, we added feature flags just to struct types (commit
> 6a8c0b5102^..f3ed93d545), to satisfy an immediate need (commit
> c9d4070991 "file-posix: Add dynamic-auto-read-only QAPI feature"). In
> v4.2.0, we added them to commands (commit 23394b4c39 "qapi: Add
> feature flags to commands") to satisfy another immediate need (commit
> d76744e65e "qapi: Allow introspecting fix for savevm's cooperation
> with blockdev").
>
> Add them to the remaining definitions: enumeration types, union types,
> alternate types, and events.
>
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
> +++ b/qapi/introspect.json
> @@ -89,12 +89,18 @@
> #
> # @meta-type: the entity's meta type, inherited from @base.
> #
> +# @features: names of features associated with the entity, in no
> +# particular order.
> +# (since 4.1 for object types, 4.2 for commands, 5.0 for
> +# the rest)
Odd versioning hint, but accurate, and I don't see any way to improve it.
> +#
> # Additional members depend on the value of @meta-type.
> #
> # Since: 2.5
> ##
> { 'union': 'SchemaInfo',
> - 'base': { 'name': 'str', 'meta-type': 'SchemaMetaType' },
> + 'base': { 'name': 'str', 'meta-type': 'SchemaMetaType',
> + '*features': [ 'str' ] },
> 'discriminator': 'meta-type',
> 'data': {
> 'builtin': 'SchemaInfoBuiltin',
> @@ -174,9 +180,6 @@
> # and may even differ from the order of the values of the
> # enum type of the @tag.
> #
> -# @features: names of features associated with the type, in no particular
> -# order. (since: 4.1)
> -#
> # Values of this type are JSON object on the wire.
> #
> # Since: 2.5
> @@ -184,8 +187,7 @@
> { 'struct': 'SchemaInfoObject',
> 'data': { 'members': [ 'SchemaInfoObjectMember' ],
> '*tag': 'str',
> - '*variants': [ 'SchemaInfoObjectVariant' ],
> - '*features': [ 'str' ] } }
> + '*variants': [ 'SchemaInfoObjectVariant' ] } }
The code motion from use in some of the union branches to now being
present in the base class of all of the branches is backwards-compatible.
The generator changes also look correct, and have enough testsuite
coverage to make it easier to be confident about the patch.
Reviewed-by: Eric Blake <eblake@redhat.com>
> +++ b/tests/qapi-schema/doc-good.json
> @@ -53,10 +53,14 @@
> # @Enum:
> # @one: The _one_ {and only}
> #
> +# Features:
> +# @enum-feat: Also _one_ {and only}
All our existing public features are a single word (matching naming
conventions elsewhere in QAPI). Are we sure we want to allow feature
names that include whitespace? Of course, the fact that our testsuite
covers it (even if we don't use it publically) means that we are sure
that our generator can handle it, regardless of whether we decide that a
separate patch should restrict feature names. But I don't see it
holding up this patch.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
next prev parent reply other threads:[~2020-03-16 19:07 UTC|newest]
Thread overview: 77+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-15 14:46 [PATCH v3 00/34] Configurable policy for handling deprecated interfaces Markus Armbruster
2020-03-15 14:46 ` [PATCH v3 01/34] qemu-doc: Belatedly document QMP command arg & result deprecation Markus Armbruster
2020-03-16 15:10 ` Eric Blake
2020-03-16 18:34 ` Markus Armbruster
2020-03-15 14:46 ` [PATCH v3 02/34] qapi: Belatedly update doc comment for @wait deprecation Markus Armbruster
2020-03-16 14:51 ` Marc-André Lureau
2020-03-16 15:10 ` Eric Blake
2020-03-15 14:46 ` [PATCH v3 03/34] docs/devel/qapi-code-gen: Clarify allow-oob introspection Markus Armbruster
2020-03-16 15:12 ` Eric Blake
2020-03-15 14:46 ` [PATCH v3 04/34] docs/devel/qapi-code-gen: Document 'features' introspection Markus Armbruster
2020-03-16 15:15 ` Eric Blake
2020-03-15 14:46 ` [PATCH v3 05/34] tests/test-qmp-cmds: Factor out qmp_dispatch() test helpers Markus Armbruster
2020-03-16 15:06 ` Marc-André Lureau
2020-03-16 19:46 ` Markus Armbruster
2020-03-16 17:16 ` Eric Blake
2020-03-15 14:46 ` [PATCH v3 06/34] tests/test-qmp-cmds: Check responses more thoroughly Markus Armbruster
2020-03-16 15:08 ` Marc-André Lureau
2020-03-16 17:18 ` Eric Blake
2020-03-15 14:46 ` [PATCH v3 07/34] tests/test-qmp-cmds: Simplify test data setup Markus Armbruster
2020-03-16 15:10 ` Marc-André Lureau
2020-03-15 14:46 ` [PATCH v3 08/34] tests/test-qmp-event: " Markus Armbruster
2020-03-16 15:11 ` Marc-André Lureau
2020-03-15 14:46 ` [PATCH v3 09/34] tests/test-qmp-event: Use qobject_is_equal() Markus Armbruster
2020-03-16 15:13 ` Marc-André Lureau
2020-03-15 14:46 ` [PATCH v3 10/34] tests/test-qmp-event: Check event is actually emitted Markus Armbruster
2020-03-16 15:14 ` Marc-André Lureau
2020-03-15 14:46 ` [PATCH v3 11/34] qapi/schema: Clean up around QAPISchemaEntity.connect_doc() Markus Armbruster
2020-03-16 16:47 ` Marc-André Lureau
2020-03-16 17:23 ` Eric Blake
2020-03-15 14:46 ` [PATCH v3 12/34] qapi: Add feature flags to remaining definitions Markus Armbruster
2020-03-16 17:55 ` Eric Blake [this message]
2020-03-17 5:46 ` Markus Armbruster
2020-03-17 11:29 ` Eric Blake
2020-03-15 14:46 ` [PATCH v3 13/34] qapi: Consistently put @features parameter right after @ifcond Markus Armbruster
2020-03-16 16:52 ` Marc-André Lureau
2020-03-16 17:57 ` Eric Blake
2020-03-15 14:46 ` [PATCH v3 14/34] qapi/introspect: Rename *qlit* to reduce confusion Markus Armbruster
2020-03-16 16:54 ` Marc-André Lureau
2020-03-15 14:46 ` [PATCH v3 15/34] qapi/introspect: Factor out _make_tree() Markus Armbruster
2020-03-16 16:58 ` Marc-André Lureau
2020-03-15 14:46 ` [PATCH v3 16/34] qapi/schema: Change _make_features() to a take feature list Markus Armbruster
2020-03-15 14:46 ` [PATCH v3 17/34] qapi/schema: Reorder classes so related ones are together Markus Armbruster
2020-03-16 17:03 ` Marc-André Lureau
2020-03-15 14:46 ` [PATCH v3 18/34] qapi/schema: Rename QAPISchemaObjectType{Variant, Variants} Markus Armbruster
2020-03-16 17:06 ` Marc-André Lureau
2020-03-15 14:46 ` [PATCH v3 19/34] qapi/schema: Call QAPIDoc.connect_member() in just one place Markus Armbruster
2020-03-16 17:08 ` Marc-André Lureau
2020-03-16 17:08 ` Marc-André Lureau
2020-03-15 14:46 ` [PATCH v3 20/34] qapi: Add feature flags to struct members Markus Armbruster
2020-03-16 17:10 ` Marc-André Lureau
2020-03-15 14:46 ` [PATCH v3 21/34] qapi: Inline do_qmp_dispatch() into qmp_dispatch() Markus Armbruster
2020-03-16 17:25 ` Marc-André Lureau
2020-03-15 14:46 ` [PATCH v3 22/34] qapi: Simplify how qmp_dispatch() deals with QCO_NO_SUCCESS_RESP Markus Armbruster
2020-03-16 17:28 ` Marc-André Lureau
2020-03-15 14:46 ` [PATCH v3 23/34] qapi: Simplify how qmp_dispatch() gets the request ID Markus Armbruster
2020-03-16 17:33 ` Marc-André Lureau
2020-03-17 6:39 ` Markus Armbruster
2020-03-17 7:37 ` Marc-André Lureau
2020-03-15 14:46 ` [PATCH v3 24/34] qapi: Replace qmp_dispatch()'s TODO comment by an explanation Markus Armbruster
2020-03-16 17:36 ` Marc-André Lureau
2020-03-17 6:52 ` Markus Armbruster
2020-03-15 14:46 ` [PATCH v3 25/34] qapi: New special feature flag "deprecated" Markus Armbruster
2020-03-15 15:49 ` Philippe Mathieu-Daudé
2020-03-15 16:53 ` Markus Armbruster
2020-03-15 14:46 ` [PATCH v3 26/34] qapi: Mark deprecated QMP parts with feature 'deprecated' Markus Armbruster
2020-03-15 14:46 ` [PATCH v3 27/34] qemu-options: New -compat to set policy for deprecated interfaces Markus Armbruster
2020-03-16 17:43 ` Marc-André Lureau
2020-03-15 14:46 ` [PATCH v3 28/34] qapi: Implement deprecated-output=hide for QMP command results Markus Armbruster
2020-03-16 17:53 ` Marc-André Lureau
2020-03-16 19:46 ` Markus Armbruster
2020-03-15 14:46 ` [PATCH v3 29/34] qapi: Implement deprecated-output=hide for QMP events Markus Armbruster
2020-03-15 14:46 ` [PATCH v3 30/34] qapi: Implement deprecated-output=hide for QMP event data Markus Armbruster
2020-03-16 19:48 ` Markus Armbruster
2020-03-15 14:46 ` [PATCH v3 31/34] qapi: Implement deprecated-output=hide for QMP introspection Markus Armbruster
2020-03-15 14:46 ` [PATCH v3 32/34] qapi: Implement deprecated-input=reject for QMP commands Markus Armbruster
2020-03-15 14:46 ` [PATCH v3 33/34] qapi: Implement deprecated-input=reject for QMP command arguments Markus Armbruster
2020-03-15 14:46 ` [PATCH v3 34/34] qapi: New -compat deprecated-input=crash 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=a6b5dcd4-6ac7-adef-d3c0-20a6a9748bd3@redhat.com \
--to=eblake@redhat.com \
--cc=armbru@redhat.com \
--cc=mdroth@linux.vnet.ibm.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).