From: Markus Armbruster <armbru@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,
berrange@redhat.com, eblake@redhat.com,
Manish Mishra <manish.mishra@nutanix.com>,
Aravind Retnakaran <aravind.retnakaran@nutanix.com>
Subject: Re: [PATCH 5/5] migration: Established connection for listener sockets on the dest interface
Date: Thu, 12 Jan 2023 07:38:06 +0100 [thread overview]
Message-ID: <87lem89s1d.fsf@pond.sub.org> (raw)
In-Reply-To: <20221226053329.157905-6-het.gala@nutanix.com> (Het Gala's message of "Mon, 26 Dec 2022 05:33:29 +0000")
Het Gala <het.gala@nutanix.com> writes:
> From: Author Het Gala <het.gala@nutanix.com>
>
> Modified 'migrate-incoming' QAPI supports MigrateChannel parameters to prevent
> multi-level encodings of uri on the destination side.
>
> socket_start_incoming_migration() has been depricated as it's only purpose was
> uri parsing.
> Renamed socket_outgoing_migration_internal() as socket_start_incoming_migration().
> qemu_uri_parsing() is used to populate the new struct from 'uri' string
> needed for migration connection. The function will no longer be used once the
> 'uri' parameter is depricated, as the parameters will already be mapped into
> new struct.
>
> Suggested-by: Daniel P. Berrange <berrange@redhat.com>
> Suggested-by: Manish Mishra <manish.mishra@nutanix.com>
> Suggested-by: Aravind Retnakaran <aravind.retnakaran@nutanix.com>
> Signed-off-by: Het Gala <het.gala@nutanix.com>
> ---
> migration/migration.c | 48 ++++++++++++++++++++++++++++---------------
> migration/socket.c | 16 ++-------------
> migration/socket.h | 2 +-
> 3 files changed, 35 insertions(+), 31 deletions(-)
>
> diff --git a/migration/migration.c b/migration/migration.c
> index 838940fd55..c70fd0ab4f 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c
> @@ -520,27 +520,43 @@ static void qemu_uri_parsing(const char *uri,
> }
> }
>
> -static void qemu_start_incoming_migration(const char *uri, Error **errp)
> +static void qemu_start_incoming_migration(const char *uri,
> + MigrateChannel *channel,
> + Error **errp)
> {
> - const char *p = NULL;
> + MigrateAddress *addrs = g_new0(MigrateAddress, 1);
> + SocketAddress *saddr = g_new0(SocketAddress, 1);
> +
> + /*
> + * motive here is just to have checks and convert uri into
> + * socketaddress struct
> + */
> + if (uri && channel) {
> + error_setg(errp, "uri and channels options should be used "
> + "mutually exclusive");
> + } else if (uri) {
> + qemu_uri_parsing(uri, &channel, errp);
> + }
>
> migrate_protocol_allow_multi_channels(false); /* reset it anyway */
> qapi_event_send_migration(MIGRATION_STATUS_SETUP);
> - if (strstart(uri, "tcp:", &p) ||
> - strstart(uri, "unix:", NULL) ||
> - strstart(uri, "vsock:", NULL)) {
> - migrate_protocol_allow_multi_channels(true);
> - socket_start_incoming_migration(p ? p : uri, errp);
> + if (addrs->transport == MIGRATE_TRANSPORT_SOCKET) {
> + if (saddr->type == SOCKET_ADDRESS_TYPE_INET ||
> + saddr->type == SOCKET_ADDRESS_TYPE_UNIX ||
> + saddr->type == SOCKET_ADDRESS_TYPE_VSOCK) {
> + migrate_protocol_allow_multi_channels(true);
> + 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);
> + } else if (addrs->transport == MIGRATE_TRANSPORT_RDMA) {
> + rdma_start_incomng_migration(addrs->u.rdma.rdma_str, errp);
Fails to compile:
../migration/migration.c: In function ‘qemu_start_incoming_migration’:
../migration/migration.c:554:9: error: implicit declaration of function ‘rdma_start_incomng_migration’; did you mean ‘rdma_start_incoming_migration’? [-Werror=implicit-function-declaration]
554 | rdma_start_incomng_migration(addrs->u.rdma.rdma_str, errp);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| rdma_start_incoming_migration
../migration/migration.c:554:9: error: nested extern declaration of ‘rdma_start_incomng_migration’ [-Werror=nested-externs]
Please fix that, and also test RDMA.
> #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 if (addrs->transport == MIGRATE_TRANSPORT_EXEC) {
> + exec_start_incoming_migration(addrs->u.exec.exec_str, errp);
> } else {
> - error_setg(errp, "unknown migration protocol: %s", uri);
> + error_setg(errp, "unknown migration protocol: %i", addrs->transport);
> }
> }
>
[...]
next prev parent reply other threads:[~2023-01-12 6:39 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-26 5:33 [PATCH 0/5] migration: Modified 'migrate' QAPI command for migration Het Gala
2022-12-26 5:33 ` [PATCH 1/5] migration: Updated QAPI format for 'migrate' qemu monitor command Het Gala
2023-01-09 14:07 ` Daniel P. Berrangé
2023-01-10 7:39 ` Het Gala
2023-01-10 9:32 ` Daniel P. Berrangé
2023-01-10 14:09 ` Het Gala
2023-01-13 8:07 ` Het Gala
2023-01-13 8:47 ` Daniel P. Berrangé
2023-01-17 10:43 ` Dr. David Alan Gilbert
2023-01-18 5:13 ` Het Gala
2023-01-17 10:47 ` Dr. David Alan Gilbert
2023-01-18 5:37 ` Het Gala
2022-12-26 5:33 ` [PATCH 2/5] migration: HMP side changes for modified 'migrate' QAPI design Het Gala
2022-12-26 5:33 ` [PATCH 3/5] migration: Avoid multiple parsing of uri in migration code flow Het Gala
2023-01-09 14:14 ` Daniel P. Berrangé
2023-01-10 7:43 ` Het Gala
2022-12-26 5:33 ` [PATCH 4/5] migration: Modified 'migrate-incoming' QAPI and HMP side changes on the destination interface Het Gala
2022-12-26 5:33 ` [PATCH 5/5] migration: Established connection for listener sockets on the dest interface Het Gala
2023-01-12 6:38 ` Markus Armbruster [this message]
2023-01-02 7:18 ` [PATCH 0/5] migration: Modified 'migrate' QAPI command for migration Het Gala
2023-01-09 6:59 ` Het Gala
2023-01-17 10:52 ` Claudio Fontana
2023-01-18 5:52 ` Het Gala
2023-01-18 10:41 ` Claudio Fontana
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=87lem89s1d.fsf@pond.sub.org \
--to=armbru@redhat.com \
--cc=aravind.retnakaran@nutanix.com \
--cc=berrange@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.