From: Peter Xu <peterx@redhat.com>
To: Fabiano Rosas <farosas@suse.de>
Cc: qemu-devel@nongnu.org
Subject: Re: [RFC PATCH 15/25] migration/channel: Rename migration_channel_connect
Date: Mon, 29 Dec 2025 14:40:48 -0500 [thread overview]
Message-ID: <aVLZQBX_RONdYTlT@x1.local> (raw)
In-Reply-To: <20251226211930.27565-16-farosas@suse.de>
On Fri, Dec 26, 2025 at 06:19:17PM -0300, Fabiano Rosas wrote:
> Rename migration_channel_connect to indicate this is the source
> side. Future patches will do similar changes to the incoming side and
> this will avoid inconsistencies in naming.
>
> Signed-off-by: Fabiano Rosas <farosas@suse.de>
We have a lot of other helpers are using this pattern as names:
migration_incoming*
So I wonder if we want to unify it with
migration_outgoing*
?
Said that, I don't think it's always the case, so it's not a rule either.
Adding "outgoing" anywhere should indeed be an improvement already.
Whichever you prefer:
Reviewed-by: Peter Xu <peterx@redhat.com>
> ---
> migration/channel.c | 9 +--------
> migration/channel.h | 2 +-
> migration/exec.c | 2 +-
> migration/fd.c | 2 +-
> migration/file.c | 2 +-
> migration/socket.c | 2 +-
> migration/tls.c | 2 +-
> 7 files changed, 7 insertions(+), 14 deletions(-)
>
> diff --git a/migration/channel.c b/migration/channel.c
> index af6c2cc76e..a8a5f26dfd 100644
> --- a/migration/channel.c
> +++ b/migration/channel.c
> @@ -61,14 +61,7 @@ out:
> }
> }
>
> -
> -/**
> - * @migration_channel_connect - Create new outgoing migration channel
> - *
> - * @s: Current migration state
> - * @ioc: Channel to which we are connecting
> - */
> -void migration_channel_connect(MigrationState *s, QIOChannel *ioc)
> +void migration_channel_connect_outgoing(MigrationState *s, QIOChannel *ioc)
> {
> trace_migration_set_outgoing_channel(ioc, object_get_typename(OBJECT(ioc)));
>
> diff --git a/migration/channel.h b/migration/channel.h
> index ccfeaaef18..7d3457271d 100644
> --- a/migration/channel.h
> +++ b/migration/channel.h
> @@ -20,7 +20,7 @@
>
> void migration_channel_process_incoming(QIOChannel *ioc);
>
> -void migration_channel_connect(MigrationState *s, QIOChannel *ioc);
> +void migration_channel_connect_outgoing(MigrationState *s, QIOChannel *ioc);
>
> int migration_channel_read_peek(QIOChannel *ioc,
> const char *buf,
> diff --git a/migration/exec.c b/migration/exec.c
> index d83a07435a..d1629944dc 100644
> --- a/migration/exec.c
> +++ b/migration/exec.c
> @@ -55,7 +55,7 @@ void exec_start_outgoing_migration(MigrationState *s, strList *command,
> }
>
> qio_channel_set_name(ioc, "migration-exec-outgoing");
> - migration_channel_connect(s, ioc);
> + migration_channel_connect_outgoing(s, ioc);
> object_unref(OBJECT(ioc));
> }
>
> diff --git a/migration/fd.c b/migration/fd.c
> index 0144a70742..150b236fbf 100644
> --- a/migration/fd.c
> +++ b/migration/fd.c
> @@ -70,7 +70,7 @@ void fd_start_outgoing_migration(MigrationState *s, const char *fdname, Error **
> }
>
> qio_channel_set_name(ioc, "migration-fd-outgoing");
> - migration_channel_connect(s, ioc);
> + migration_channel_connect_outgoing(s, ioc);
> object_unref(OBJECT(ioc));
> }
>
> diff --git a/migration/file.c b/migration/file.c
> index 7bb9c1c79f..935402f36b 100644
> --- a/migration/file.c
> +++ b/migration/file.c
> @@ -122,7 +122,7 @@ void file_start_outgoing_migration(MigrationState *s,
> return;
> }
> qio_channel_set_name(ioc, "migration-file-outgoing");
> - migration_channel_connect(s, ioc);
> + migration_channel_connect_outgoing(s, ioc);
> }
>
> static gboolean file_accept_incoming_migration(QIOChannel *ioc,
> diff --git a/migration/socket.c b/migration/socket.c
> index 298bac30cc..611915f84d 100644
> --- a/migration/socket.c
> +++ b/migration/socket.c
> @@ -73,7 +73,7 @@ static void socket_outgoing_migration(QIOTask *task,
> }
>
> trace_migration_socket_outgoing_connected();
> - migration_channel_connect(data->s, sioc);
> + migration_channel_connect_outgoing(data->s, sioc);
> return;
> err:
> trace_migration_socket_outgoing_error(error_get_pretty(err));
> diff --git a/migration/tls.c b/migration/tls.c
> index a54e8e6e14..f68e6a533b 100644
> --- a/migration/tls.c
> +++ b/migration/tls.c
> @@ -114,7 +114,7 @@ static void migration_tls_outgoing_handshake(QIOTask *task,
> }
>
> trace_migration_tls_outgoing_handshake_complete();
> - migration_channel_connect(s, ioc);
> + migration_channel_connect_outgoing(s, ioc);
> }
>
> QIOChannelTLS *migration_tls_client_create(QIOChannel *ioc,
> --
> 2.51.0
>
--
Peter Xu
next prev parent reply other threads:[~2025-12-29 19:41 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-26 21:19 [RFC PATCH 00/25] migration: Cleanup early connection code Fabiano Rosas
2025-12-26 21:19 ` [RFC PATCH 01/25] migration: Remove redundant state change Fabiano Rosas
2025-12-29 15:22 ` Peter Xu
2025-12-26 21:19 ` [RFC PATCH 02/25] migration: Fix state change at migration_channel_process_incoming Fabiano Rosas
2025-12-29 15:32 ` Peter Xu
2025-12-26 21:19 ` [RFC PATCH 03/25] migration/tls: Remove unused parameter Fabiano Rosas
2025-12-29 15:33 ` Peter Xu
2025-12-26 21:19 ` [RFC PATCH 04/25] migration: Move multifd_recv_setup call Fabiano Rosas
2025-12-29 15:51 ` Peter Xu
2025-12-29 19:21 ` Fabiano Rosas
2025-12-26 21:19 ` [RFC PATCH 05/25] migration: Cleanup TLS handshake hostname passing Fabiano Rosas
2025-12-29 16:12 ` Peter Xu
2025-12-29 19:38 ` Fabiano Rosas
2025-12-26 21:19 ` [RFC PATCH 06/25] migration: Move postcopy_try_recover into migration_incoming_process Fabiano Rosas
2025-12-29 16:15 ` Peter Xu
2025-12-26 21:19 ` [RFC PATCH 07/25] migration: Use migrate_mode() to query for cpr-transfer Fabiano Rosas
2025-12-29 16:33 ` Peter Xu
2025-12-29 19:23 ` Fabiano Rosas
2025-12-26 21:19 ` [RFC PATCH 08/25] migration: Free the error earlier in the resume case Fabiano Rosas
2025-12-29 16:39 ` [RFC PATCH 08/25] migration: Free the error earlier in the resume case' Peter Xu
2025-12-26 21:19 ` [RFC PATCH 09/25] migration: Move error reporting out of migration_cleanup Fabiano Rosas
2025-12-29 16:45 ` Peter Xu
2025-12-26 21:19 ` [RFC PATCH 10/25] migration: Expand migration_connect_error_propagate to cover cancelling Fabiano Rosas
2025-12-29 17:12 ` Peter Xu
2025-12-26 21:19 ` [RFC PATCH 11/25] migration: yank: Move register instance earlier Fabiano Rosas
2025-12-29 17:17 ` Peter Xu
2025-12-26 21:19 ` [RFC PATCH 12/25] migration: Fold migration_cleanup() into migration_connect_error_propagate() Fabiano Rosas
2025-12-29 18:42 ` Peter Xu
2025-12-29 19:26 ` Fabiano Rosas
2025-12-26 21:19 ` [RFC PATCH 13/25] migration: Handle error in the early async paths Fabiano Rosas
2025-12-29 19:08 ` Peter Xu
2025-12-29 19:35 ` Fabiano Rosas
2025-12-26 21:19 ` [RFC PATCH 14/25] migration: Remove QEMUFile from channel.c Fabiano Rosas
2025-12-29 19:36 ` Peter Xu
2025-12-29 19:51 ` Fabiano Rosas
2025-12-26 21:19 ` [RFC PATCH 15/25] migration/channel: Rename migration_channel_connect Fabiano Rosas
2025-12-29 19:40 ` Peter Xu [this message]
2025-12-26 21:19 ` [RFC PATCH 16/25] migration: Rename instances of start Fabiano Rosas
2025-12-26 21:19 ` [RFC PATCH 17/25] migration: Move channel code to channel.c Fabiano Rosas
2025-12-26 21:19 ` [RFC PATCH 18/25] migration: Move transport connection code into channel.c Fabiano Rosas
2025-12-26 21:19 ` [RFC PATCH 19/25] migration/channel: Make synchronous calls evident Fabiano Rosas
2025-12-26 21:19 ` [RFC PATCH 20/25] migration/channel: Use switch statements in outgoing code Fabiano Rosas
2025-12-26 21:19 ` [RFC PATCH 21/25] migration/channel: Cleanup early passing of MigrationState Fabiano Rosas
2025-12-26 21:19 ` [RFC PATCH 22/25] migration/channel: Merge both sides of the connection initiation code Fabiano Rosas
2025-12-29 20:06 ` Peter Xu
2025-12-29 21:14 ` Fabiano Rosas
2025-12-29 22:05 ` Peter Xu
2025-12-26 21:19 ` [RFC PATCH 23/25] migration: Move channel parsing to channel.c Fabiano Rosas
2025-12-29 21:01 ` Peter Xu
2025-12-26 21:19 ` [RFC PATCH 24/25] migration: Move URI " Fabiano Rosas
2025-12-29 21:08 ` Peter Xu
2025-12-29 21:22 ` Fabiano Rosas
2025-12-29 22:11 ` Peter Xu
2025-12-26 21:19 ` [RFC PATCH 25/25] migration: Remove qmp_migrate_finish Fabiano Rosas
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=aVLZQBX_RONdYTlT@x1.local \
--to=peterx@redhat.com \
--cc=farosas@suse.de \
--cc=qemu-devel@nongnu.org \
/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.