[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 1/8] migration: introduced 'MigrateAddress' in QAPI for mi
|
From: |
Juan Quintela |
|
Subject: |
Re: [PATCH v4 1/8] migration: introduced 'MigrateAddress' in QAPI for migration wire protocol. |
|
Date: |
Mon, 15 May 2023 10:37:37 +0200 |
|
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
Het Gala <het.gala@nutanix.com> wrote:
> This patch introduces well defined MigrateAddress struct and its related child
> objects.
>
> The existing argument of 'migrate' and 'migrate-incoming' QAPI - 'uri' is of
> string type. The current migration flow follows double encoding scheme for
> fetching migration parameters such as 'uri' and this is not an ideal design.
>
> Motive for intoducing struct level design is to prevent double encoding of
> QAPI
> arguments, as Qemu should be able to directly use the QAPI arguments without
> any level of encoding.
>
> Suggested-by: Aravind Retnakaran <aravind.retnakaran@nutanix.com>
> Signed-off-by: Het Gala <het.gala@nutanix.com>
> ---
> qapi/migration.json | 41 +++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 41 insertions(+)
>
> diff --git a/qapi/migration.json b/qapi/migration.json
> index 82000adce4..bf90bd8fe2 100644
> --- a/qapi/migration.json
> +++ b/qapi/migration.json
> @@ -1423,6 +1423,47 @@
> ##
> { 'command': 'migrate-continue', 'data': {'state': 'MigrationStatus'} }
>
> +##
> +# @MigrateTransport:
> +#
> +# The supported communication transport mechanisms for migration
> +#
> +# @socket: Supported communication type between two devices for migration.
> +# Socket is able to cover all of 'tcp', 'unix', 'vsock' and
> +# 'fd' already
> +#
> +# @exec: Supported communication type to redirect migration stream into file.
> +#
> +# @rdma: Supported communication type to redirect rdma type migration stream.
> +#
> +# Since 8.0
8.1
I can fix that if it gets acked from someone from QAPI.
> +##
> +{ 'enum': 'MigrateTransport',
> + 'data': ['socket', 'exec', 'rdma'] }
> +
> +##
> +# @MigrateExecCommand:
> + #
> + # Since 8.0
> + ##
> +{ 'struct': 'MigrateExecCommand',
> + 'data': {'args': [ 'str' ] } }
> +
> +##
> +# @MigrateAddress:
> +#
> +# The options available for communication transport mechanisms for migration
> +#
> +# Since 8.0
> +##
> +{ 'union': 'MigrateAddress',
> + 'base': { 'transport' : 'MigrateTransport'},
> + 'discriminator': 'transport',
> + 'data': {
> + 'socket': 'SocketAddress',
> + 'exec': 'MigrateExecCommand',
> + 'rdma': 'InetSocketAddress' } }
> +
> ##
> # @migrate:
> #
I will wait for a comment from QAPI people, from migration point of
view:
Reviewed-by: Juan Quintela <quintela@redhat.com>
[PATCH v4 3/8] migration: converts socket backend to accept MigrateAddress struct, Het Gala, 2023/05/12