All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Het Gala <het.gala@nutanix.com>
Cc: qemu-devel@nongnu.org, prerna.saxena@nutanix.com,
	quintela@redhat.com, dgilbert@redhat.com, pbonzini@redhat.com,
	armbru@redhat.com, eblake@redhat.com, manish.mishra@nutanix.com,
	aravind.retnakaran@nutanix.com
Subject: Re: [PATCH v8 3/9] migration: convert socket backend to accept MigrateAddress
Date: Wed, 19 Jul 2023 10:59:43 +0100	[thread overview]
Message-ID: <ZLe0D0ErzGF/j5ac@redhat.com> (raw)
In-Reply-To: <20230713105713.236883-4-het.gala@nutanix.com>

On Thu, Jul 13, 2023 at 10:57:07AM +0000, Het Gala wrote:
> Socket transport backend for 'migrate'/'migrate-incoming' QAPIs accept
> new wire protocol of MigrateAddress struct.
> 
> It is achived by parsing 'uri' string and storing migration parameters
> required for socket connection into well defined SocketAddress struct.
> 
> Suggested-by: Aravind Retnakaran <aravind.retnakaran@nutanix.com>
> Signed-off-by: Het Gala <het.gala@nutanix.com>
> ---
>  migration/migration.c | 32 +++++++++++++++++++-------------
>  migration/socket.c    | 34 +++++-----------------------------
>  migration/socket.h    |  7 ++++---
>  3 files changed, 28 insertions(+), 45 deletions(-)
> 
> diff --git a/migration/migration.c b/migration/migration.c
> index af2ec50061..8108d4248f 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c
> @@ -480,18 +480,21 @@ static void qemu_start_incoming_migration(const char *uri, Error **errp)
>      }
>  
>      qapi_event_send_migration(MIGRATION_STATUS_SETUP);
> -    if (strstart(uri, "tcp:", &p) ||
> -        strstart(uri, "unix:", NULL) ||
> -        strstart(uri, "vsock:", NULL)) {
> -        socket_start_incoming_migration(p ? p : uri, errp);
> +    if (channel->transport == MIGRATION_ADDRESS_TYPE_SOCKET) {
> +        SocketAddress *saddr = &channel->u.socket;
> +        if (saddr->type == SOCKET_ADDRESS_TYPE_INET ||
> +            saddr->type == SOCKET_ADDRESS_TYPE_UNIX ||
> +            saddr->type == SOCKET_ADDRESS_TYPE_VSOCK) {
> +            socket_start_incoming_migration(saddr, errp);
> +        } else if (saddr->type == SOCKET_ADDRESS_TYPE_FD) {
> +            fd_start_incoming_migration(saddr->u.fd.str, errp);
> +        }
>  #ifdef CONFIG_RDMA
>      } else if (strstart(uri, "rdma:", &p)) {
>          rdma_start_incoming_migration(p, errp);
>  #endif
>      } else if (strstart(uri, "exec:", &p)) {
>          exec_start_incoming_migration(p, errp);
> -    } else if (strstart(uri, "fd:", &p)) {
> -        fd_start_incoming_migration(p, errp);
>      } else {
>          error_setg(errp, "unknown migration protocol: %s", uri);
>      }
> @@ -1697,7 +1700,7 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk,
>          return;
>      }
>  
> -    if (!migrate_uri_parse(uri, &channel, &local_err)) {
> +    if (!migrate_uri_parse(uri, &channel, errp)) {
>          return;
>      }
>

This chunk should be squashed into the previous patch

With that changed:

  Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



  reply	other threads:[~2023-07-19 10:00 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-13 10:57 [PATCH v8 0/9] migration: Modify 'migrate' and 'migrate-incoming' QAPI commands for migration Het Gala
2023-07-13 10:57 ` [PATCH v8 1/9] migration: New QAPI type 'MigrateAddress' Het Gala
2023-07-19  9:51   ` Daniel P. Berrangé
2023-07-13 10:57 ` [PATCH v8 2/9] migration: convert migration 'uri' into 'MigrateAddress' Het Gala
2023-07-19  9:55   ` Daniel P. Berrangé
2023-07-13 10:57 ` [PATCH v8 3/9] migration: convert socket backend to accept MigrateAddress Het Gala
2023-07-19  9:59   ` Daniel P. Berrangé [this message]
2023-07-19 15:21   ` Daniel P. Berrangé
2023-07-13 10:57 ` [PATCH v8 4/9] migration: convert rdma " Het Gala
2023-07-19 10:01   ` Daniel P. Berrangé
2023-07-13 10:57 ` [PATCH v8 5/9] migration: convert exec " Het Gala
2023-07-19 10:02   ` Daniel P. Berrangé
2023-07-13 10:57 ` [PATCH v8 6/9] migration: New migrate and migrate-incoming argument 'channels' Het Gala
2023-07-19 10:11   ` Daniel P. Berrangé
2023-07-13 10:57 ` [PATCH v8 7/9] migration: modify migration_channels_and_uri_compatible() for new QAPI syntax Het Gala
2023-07-19 10:12   ` Daniel P. Berrangé
2023-07-13 10:57 ` [PATCH v8 8/9] migration: Implement MigrateChannelList to migration flow Het Gala
2023-07-19 10:33   ` Daniel P. Berrangé
2023-07-13 10:57 ` [PATCH v8 9/9] migration: Add test case for modified QAPI syntax Het Gala
2023-07-19 10:37   ` Daniel P. Berrangé

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=ZLe0D0ErzGF/j5ac@redhat.com \
    --to=berrange@redhat.com \
    --cc=aravind.retnakaran@nutanix.com \
    --cc=armbru@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=eblake@redhat.com \
    --cc=het.gala@nutanix.com \
    --cc=manish.mishra@nutanix.com \
    --cc=pbonzini@redhat.com \
    --cc=prerna.saxena@nutanix.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.