qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4 7/8] migration: modified 'migrate-incoming' QAPI to accept


From: Juan Quintela
Subject: Re: [PATCH v4 7/8] migration: modified 'migrate-incoming' QAPI to accept 'channels' argument for migration.
Date: Mon, 15 May 2023 12:01:29 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)

Het Gala <het.gala@nutanix.com> wrote:
> MigrateChannelList ideally allows to have multiple listener interfaces up for
> connection.
>
> Added MigrateChannelList struct as argument to 'migrate-incoming' qapi. 
> Introduced
> MigrateChannelList in hmp_migrate_incoming() and qmp_migrate_incoming() 
> functions.
>
> Future patchset series plans to include multiple MigrateChannels to have 
> multiple
> listening interfaces up. That is the reason, 'MigrateChannelList' is the 
> preferred
> choice of argument over 'MigrateChannel' and making 'migrate-incoming' QAPI 
> future
> proof.
>
> For current patch, have just limit size of MigrateChannelList to 1 element as
> a runtime check.
>
> Suggested-by: Aravind Retnakaran <aravind.retnakaran@nutanix.com>
> Signed-off-by: Het Gala <het.gala@nutanix.com>
> ---
>  migration/migration-hmp-cmds.c | 14 +++++++++++++-
>  migration/migration.c          | 21 ++++++++++++++++----
>  qapi/migration.json            | 35 +++++++++++++++++++++++++++++++++-
>  softmmu/vl.c                   |  2 +-
>  4 files changed, 65 insertions(+), 7 deletions(-)
>
> diff --git a/migration/migration-hmp-cmds.c b/migration/migration-hmp-cmds.c
> index f098d04542..8c11a8c83b 100644
> --- a/migration/migration-hmp-cmds.c
> +++ b/migration/migration-hmp-cmds.c
> @@ -518,10 +518,22 @@ void hmp_migrate_incoming(Monitor *mon, const QDict 
> *qdict)
>  {
>      Error *err = NULL;
>      const char *uri = qdict_get_str(qdict, "uri");
> +    MigrateChannel *channel = g_new0(MigrateChannel, 1);
> +    MigrateChannelList *caps = NULL;
> +
> +    if (!migrate_channel_from_qdict(&channel, qdict, &err)) {
> +        error_setg(&err, "error in retrieving channel from qdict");
> +        goto end;
> +    }
>  
> -    qmp_migrate_incoming(uri, &err);
> +    QAPI_LIST_PREPEND(caps, channel);
> +    qmp_migrate_incoming(uri, !!caps, caps, &err);
> +    qapi_free_MigrateChannelList(caps);
>  
> +end:
> +    qapi_free_MigrateChannel(channel);
>      hmp_handle_error(mon, err);
> +    return;

Useless return?


The rest seeams ok.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]