[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v7 17/23] qapi: introduce new cmd option "allow-
From: |
Igor Mammedov |
Subject: |
Re: [Qemu-devel] [PATCH v7 17/23] qapi: introduce new cmd option "allow-oob" |
Date: |
Thu, 8 Mar 2018 11:04:13 +0100 |
On Wed, 24 Jan 2018 13:39:51 +0800
Peter Xu <address@hidden> wrote:
> Here "oob" stands for "Out-Of-Band". When "allow-oob" is set, it means
> the command allows out-of-band execution.
>
> The "oob" idea is proposed by Markus Armbruster in following thread:
>
> https://lists.gnu.org/archive/html/qemu-devel/2017-09/msg02057.html
>
> This new "allow-oob" boolean will be exposed by "query-qmp-schema" as
> well for command entries, so that QMP clients can know which command can
> be used as out-of-band calls. For example the command "migrate"
> originally looks like:
>
> {"name": "migrate", "ret-type": "17", "meta-type": "command",
> "arg-type": "86"}
>
> And it'll be changed into:
>
> {"name": "migrate", "ret-type": "17", "allow-oob": false,
> "meta-type": "command", "arg-type": "86"}
>
> This patch only provides the QMP interface level changes. It does not
> contains the real out-of-band execution implementation yet.
>
> Suggested-by: Markus Armbruster <address@hidden>
> Reviewed-by: Stefan Hajnoczi <address@hidden>
> Reviewed-by: Fam Zheng <address@hidden>
> Signed-off-by: Peter Xu <address@hidden>
> ---
> include/qapi/qmp/dispatch.h | 1 +
> qapi/introspect.json | 6 +++++-
> scripts/qapi-commands.py | 19 ++++++++++++++-----
> scripts/qapi-introspect.py | 10 ++++++++--
> scripts/qapi.py | 15 ++++++++++-----
> scripts/qapi2texi.py | 2 +-
> tests/qapi-schema/test-qapi.py | 2 +-
> 7 files changed, 40 insertions(+), 15 deletions(-)
>
> diff --git a/include/qapi/qmp/dispatch.h b/include/qapi/qmp/dispatch.h
> index 20578dcd48..b76798800c 100644
> --- a/include/qapi/qmp/dispatch.h
> +++ b/include/qapi/qmp/dispatch.h
> @@ -23,6 +23,7 @@ typedef enum QmpCommandOptions
> {
> QCO_NO_OPTIONS = 0x0,
> QCO_NO_SUCCESS_RESP = 0x1,
> + QCO_ALLOW_OOB = 0x2,
Options are essentially bitmask,
so using shift for value would be more explicit way to express it.
QCO_ALLOW_OOB = (1U << 1)
> } QmpCommandOptions;
>
> typedef struct QmpCommand
[...]
- Re: [Qemu-devel] [PATCH v7 17/23] qapi: introduce new cmd option "allow-oob",
Igor Mammedov <=