From nobody Sun Jan 25 11:59:43 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=suse.de ARC-Seal: i=1; a=rsa-sha256; t=1769178116; cv=none; d=zohomail.com; s=zohoarc; b=LmtXWprkpdO2nPhukEstcPH/46UVY5g2nPS2QQ5AD6TnfLxqzdBZrDnr68K0dSm4IqqRthVC/VtOPZhY0upZBjMexmz+dGqML9aI2cIO8DvLqzoIHhpxkVK8V1Hzuh5ZJS58DUGwtVSvZxkLV+uj8V65YHmDVazAJelDEMYXmyM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769178116; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=moIuMnraXU6NKmeqmd+SD14KS4odDyrT9Jl23Ut5oDc=; b=TzXEhsYbCE7cHQsaRFqZuYEjzhhHzhTYPpkc18SvQqYL1M+dn7KHOw1+P2bxx+O2aMrcdZLxJjGxDlqbzWLi47K4TOWJ2nh8DFMoIGM07UIO6GDmZtU4ZG93lWRF2OnlhzLWEtuAYjaWAYOAxtU3hzWeylVCpDpiLUMURN439ks= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1769178116404793.7845964054507; Fri, 23 Jan 2026 06:21:56 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vjHzW-0001MZ-O5; Fri, 23 Jan 2026 09:18:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vjHzA-0000jZ-Gx for qemu-devel@nongnu.org; Fri, 23 Jan 2026 09:18:04 -0500 Received: from smtp-out2.suse.de ([2a07:de40:b251:101:10:150:64:2]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vjHz6-0003hu-8q for qemu-devel@nongnu.org; Fri, 23 Jan 2026 09:18:04 -0500 Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 7AB415BCDE; Fri, 23 Jan 2026 14:17:42 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 675AA1395E; Fri, 23 Jan 2026 14:17:40 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 6M40CgSDc2m8HAAAD6G6ig (envelope-from ); Fri, 23 Jan 2026 14:17:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1769177862; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=moIuMnraXU6NKmeqmd+SD14KS4odDyrT9Jl23Ut5oDc=; b=OpoO62vTUYNgYaWIcCLpDzd8gWTJTWY/usEPicWlJfBpBf11AjyowLMwG0/KM+JZqQZSEa Hr8kF+BxKR4cjy/ostMiy2+vTy8xeGHStjoSuPfLPCOaMDOTMomHpdlCvgUYlhyXHBxoTk Lxt11t7rvWVzItynvPGQZfkXzxUpNqA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1769177862; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=moIuMnraXU6NKmeqmd+SD14KS4odDyrT9Jl23Ut5oDc=; b=hQ4Z4tLmM09vDUjHQhUvOZi6KC54cen5U81GcuSbhRaudJFhM3htCdWx2B1Ar9glu8tfk5 Ao04rHbagIWywjBQ== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=OpoO62vT; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=hQ4Z4tLm DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1769177862; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=moIuMnraXU6NKmeqmd+SD14KS4odDyrT9Jl23Ut5oDc=; b=OpoO62vTUYNgYaWIcCLpDzd8gWTJTWY/usEPicWlJfBpBf11AjyowLMwG0/KM+JZqQZSEa Hr8kF+BxKR4cjy/ostMiy2+vTy8xeGHStjoSuPfLPCOaMDOTMomHpdlCvgUYlhyXHBxoTk Lxt11t7rvWVzItynvPGQZfkXzxUpNqA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1769177862; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=moIuMnraXU6NKmeqmd+SD14KS4odDyrT9Jl23Ut5oDc=; b=hQ4Z4tLmM09vDUjHQhUvOZi6KC54cen5U81GcuSbhRaudJFhM3htCdWx2B1Ar9glu8tfk5 Ao04rHbagIWywjBQ== From: Fabiano Rosas To: qemu-devel@nongnu.org Cc: peterx@redhat.com, berrange@redhat.com, ppandit@redhat.com, Prasad Pandit , Li Zhijian Subject: [PATCH v4 17/25] migration: Rename instances of start Date: Fri, 23 Jan 2026 11:16:47 -0300 Message-ID: <20260123141656.6765-18-farosas@suse.de> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260123141656.6765-1-farosas@suse.de> References: <20260123141656.6765-1-farosas@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.01 X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_RATELIMITED(0.00)[rspamd.com]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_FIVE(0.00)[6]; DNSWL_BLOCKED(0.00)[2a07:de40:b281:106:10:150:64:167:received,2a07:de40:b281:104:10:150:64:97:from]; RCVD_VIA_SMTP_AUTH(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; R_RATELIMIT(0.00)[to_ip_from(RL3zxdrj4h6o64essgck3rrntz)]; DBL_BLOCKED_OPENRESOLVER(0.00)[fedoraproject.org:email, imap1.dmz-prg2.suse.org:rdns, imap1.dmz-prg2.suse.org:helo, suse.de:dkim, suse.de:mid, suse.de:email] X-Rspamd-Action: no action X-Rspamd-Queue-Id: 7AB415BCDE X-Rspamd-Server: rspamd1.dmz-prg2.suse.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a07:de40:b251:101:10:150:64:2; envelope-from=farosas@suse.de; helo=smtp-out2.suse.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @suse.de) X-ZM-MESSAGEID: 1769178117669158500 Content-Type: text/plain; charset="utf-8" To make it easier to follow the code, rename the functions that start the migration thread and migration coroutine to contain the word "start". This will give new contributors the chance of seeing the word start and reaching the actual migration code, instead of twists and turns of qio_channel_add_watch and qio_task_run_in_thread. Remove all other instances of "start" and use wording more suitable to what the current migration stage is. The transport code such as fd_start_migration_outgoing becomes fd_connect_outgoing, the early setup code such as qemu_start_incoming_migration becomes qemu_setup_incoming_migration and so on. Reviewed-by: Peter Xu Reviewed-by: Prasad Pandit Signed-off-by: Fabiano Rosas --- migration/channel.c | 4 ++-- migration/exec.c | 5 ++--- migration/exec.h | 5 ++--- migration/fd.c | 4 ++-- migration/fd.h | 6 +++--- migration/file.c | 6 +++--- migration/file.h | 6 +++--- migration/migration.c | 30 +++++++++++++++--------------- migration/migration.h | 3 ++- migration/rdma.c | 21 ++++++++++----------- migration/rdma.h | 6 +++--- migration/socket.c | 8 +++----- migration/socket.h | 6 +++--- migration/trace-events | 10 +++++----- 14 files changed, 58 insertions(+), 62 deletions(-) diff --git a/migration/channel.c b/migration/channel.c index f41333adcc..d1eec4942b 100644 --- a/migration/channel.c +++ b/migration/channel.c @@ -48,7 +48,7 @@ void migration_channel_process_incoming(QIOChannel *ioc) } =20 if (migration_incoming_setup(ioc, ch, &local_err)) { - migration_incoming_process(); + migration_start_incoming(); } } out: @@ -82,7 +82,7 @@ void migration_channel_connect_outgoing(MigrationState *s= , QIOChannel *ioc) =20 migration_ioc_register_yank(ioc); migration_outgoing_setup(ioc); - migration_connect(s); + migration_start_outgoing(s); } =20 =20 diff --git a/migration/exec.c b/migration/exec.c index d1629944dc..c3085e803e 100644 --- a/migration/exec.c +++ b/migration/exec.c @@ -40,8 +40,7 @@ const char *exec_get_cmd_path(void) } #endif =20 -void exec_start_outgoing_migration(MigrationState *s, strList *command, - Error **errp) +void exec_connect_outgoing(MigrationState *s, strList *command, Error **er= rp) { QIOChannel *ioc =3D NULL; g_auto(GStrv) argv =3D strv_from_str_list(command); @@ -68,7 +67,7 @@ static gboolean exec_accept_incoming_migration(QIOChannel= *ioc, return G_SOURCE_REMOVE; } =20 -void exec_start_incoming_migration(strList *command, Error **errp) +void exec_connect_incoming(strList *command, Error **errp) { QIOChannel *ioc; g_auto(GStrv) argv =3D strv_from_str_list(command); diff --git a/migration/exec.h b/migration/exec.h index 3107f205e3..e7e8e475ac 100644 --- a/migration/exec.h +++ b/migration/exec.h @@ -23,8 +23,7 @@ #ifdef WIN32 const char *exec_get_cmd_path(void); #endif -void exec_start_incoming_migration(strList *host_port, Error **errp); +void exec_connect_incoming(strList *host_port, Error **errp); =20 -void exec_start_outgoing_migration(MigrationState *s, strList *host_port, - Error **errp); +void exec_connect_outgoing(MigrationState *s, strList *host_port, Error **= errp); #endif diff --git a/migration/fd.c b/migration/fd.c index 150b236fbf..b689426ad4 100644 --- a/migration/fd.c +++ b/migration/fd.c @@ -49,7 +49,7 @@ static bool migration_fd_valid(int fd) return false; } =20 -void fd_start_outgoing_migration(MigrationState *s, const char *fdname, Er= ror **errp) +void fd_connect_outgoing(MigrationState *s, const char *fdname, Error **er= rp) { QIOChannel *ioc; int fd =3D monitor_get_fd(monitor_cur(), fdname, errp); @@ -83,7 +83,7 @@ static gboolean fd_accept_incoming_migration(QIOChannel *= ioc, return G_SOURCE_REMOVE; } =20 -void fd_start_incoming_migration(const char *fdname, Error **errp) +void fd_connect_incoming(const char *fdname, Error **errp) { QIOChannel *ioc; int fd =3D monitor_fd_param(monitor_cur(), fdname, errp); diff --git a/migration/fd.h b/migration/fd.h index b901bc014e..7211629270 100644 --- a/migration/fd.h +++ b/migration/fd.h @@ -16,8 +16,8 @@ =20 #ifndef QEMU_MIGRATION_FD_H #define QEMU_MIGRATION_FD_H -void fd_start_incoming_migration(const char *fdname, Error **errp); +void fd_connect_incoming(const char *fdname, Error **errp); =20 -void fd_start_outgoing_migration(MigrationState *s, const char *fdname, - Error **errp); +void fd_connect_outgoing(MigrationState *s, const char *fdname, + Error **errp); #endif diff --git a/migration/file.c b/migration/file.c index 935402f36b..b7b0fb5194 100644 --- a/migration/file.c +++ b/migration/file.c @@ -93,8 +93,8 @@ out: return ret; } =20 -void file_start_outgoing_migration(MigrationState *s, - FileMigrationArgs *file_args, Error **e= rrp) +void file_connect_outgoing(MigrationState *s, + FileMigrationArgs *file_args, Error **errp) { g_autoptr(QIOChannelFile) fioc =3D NULL; g_autofree char *filename =3D g_strdup(file_args->filename); @@ -173,7 +173,7 @@ static void file_create_incoming_channels(QIOChannel *i= oc, char *filename, } } =20 -void file_start_incoming_migration(FileMigrationArgs *file_args, Error **e= rrp) +void file_connect_incoming(FileMigrationArgs *file_args, Error **errp) { g_autofree char *filename =3D g_strdup(file_args->filename); QIOChannelFile *fioc =3D NULL; diff --git a/migration/file.h b/migration/file.h index 1a1115f7f1..9b1e874bb7 100644 --- a/migration/file.h +++ b/migration/file.h @@ -13,10 +13,10 @@ #include "channel.h" #include "multifd.h" =20 -void file_start_incoming_migration(FileMigrationArgs *file_args, Error **e= rrp); +void file_connect_incoming(FileMigrationArgs *file_args, Error **errp); =20 -void file_start_outgoing_migration(MigrationState *s, - FileMigrationArgs *file_args, Error **e= rrp); +void file_connect_outgoing(MigrationState *s, + FileMigrationArgs *file_args, Error **errp); int file_parse_offset(char *filespec, uint64_t *offsetp, Error **errp); void file_cleanup_outgoing_migration(void); bool file_send_channel_create(gpointer opaque, Error **errp); diff --git a/migration/migration.c b/migration/migration.c index 4745c3bdf7..c2040bea75 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -740,7 +740,7 @@ migration_incoming_state_setup(MigrationIncomingState *= mis, Error **errp) return true; } =20 -static void qemu_start_incoming_migration(const char *uri, bool has_channe= ls, +static void qemu_setup_incoming_migration(const char *uri, bool has_channe= ls, MigrationChannelList *channels, Error **errp) { @@ -788,18 +788,18 @@ static void qemu_start_incoming_migration(const char = *uri, bool has_channels, if (saddr->type =3D=3D SOCKET_ADDRESS_TYPE_INET || saddr->type =3D=3D SOCKET_ADDRESS_TYPE_UNIX || saddr->type =3D=3D SOCKET_ADDRESS_TYPE_VSOCK) { - socket_start_incoming_migration(saddr, errp); + socket_connect_incoming(saddr, errp); } else if (saddr->type =3D=3D SOCKET_ADDRESS_TYPE_FD) { - fd_start_incoming_migration(saddr->u.fd.str, errp); + fd_connect_incoming(saddr->u.fd.str, errp); } #ifdef CONFIG_RDMA } else if (addr->transport =3D=3D MIGRATION_ADDRESS_TYPE_RDMA) { - rdma_start_incoming_migration(&addr->u.rdma, errp); + rdma_connect_incoming(&addr->u.rdma, errp); #endif } else if (addr->transport =3D=3D MIGRATION_ADDRESS_TYPE_EXEC) { - exec_start_incoming_migration(addr->u.exec.args, errp); + exec_connect_incoming(addr->u.exec.args, errp); } else if (addr->transport =3D=3D MIGRATION_ADDRESS_TYPE_FILE) { - file_start_incoming_migration(&addr->u.file, errp); + file_connect_incoming(&addr->u.file, errp); } else { error_setg(errp, "unknown migration protocol: %s", uri); } @@ -1012,7 +1012,7 @@ static bool postcopy_try_recover(void) return false; } =20 -void migration_incoming_process(void) +void migration_start_incoming(void) { if (postcopy_try_recover()) { return; @@ -1969,7 +1969,7 @@ void qmp_migrate_incoming(const char *uri, bool has_c= hannels, mis->exit_on_error =3D has_exit_on_error ? exit_on_error : INMIGRATE_DEFAULT_EXIT_ON_ERRO= R; =20 - qemu_start_incoming_migration(uri, has_channels, channels, &local_err); + qemu_setup_incoming_migration(uri, has_channels, channels, &local_err); =20 if (local_err) { yank_unregister_instance(MIGRATION_YANK_INSTANCE); @@ -2016,7 +2016,7 @@ void qmp_migrate_recover(const char *uri, Error **err= p) * only re-setup the migration stream and poke existing migration * to continue using that newly established channel. */ - qemu_start_incoming_migration(uri, false, NULL, errp); + qemu_setup_incoming_migration(uri, false, NULL, errp); } =20 void qmp_migrate_pause(Error **errp) @@ -2333,18 +2333,18 @@ static void qmp_migrate_finish(MigrationAddress *ad= dr, Error **errp) if (saddr->type =3D=3D SOCKET_ADDRESS_TYPE_INET || saddr->type =3D=3D SOCKET_ADDRESS_TYPE_UNIX || saddr->type =3D=3D SOCKET_ADDRESS_TYPE_VSOCK) { - socket_start_outgoing_migration(s, saddr, &local_err); + socket_connect_outgoing(s, saddr, &local_err); } else if (saddr->type =3D=3D SOCKET_ADDRESS_TYPE_FD) { - fd_start_outgoing_migration(s, saddr->u.fd.str, &local_err); + fd_connect_outgoing(s, saddr->u.fd.str, &local_err); } #ifdef CONFIG_RDMA } else if (addr->transport =3D=3D MIGRATION_ADDRESS_TYPE_RDMA) { - rdma_start_outgoing_migration(s, &addr->u.rdma, &local_err); + rdma_connect_outgoing(s, &addr->u.rdma, &local_err); #endif } else if (addr->transport =3D=3D MIGRATION_ADDRESS_TYPE_EXEC) { - exec_start_outgoing_migration(s, addr->u.exec.args, &local_err); + exec_connect_outgoing(s, addr->u.exec.args, &local_err); } else if (addr->transport =3D=3D MIGRATION_ADDRESS_TYPE_FILE) { - file_start_outgoing_migration(s, &addr->u.file, &local_err); + file_connect_outgoing(s, &addr->u.file, &local_err); } else { error_setg(&local_err, "uri is not a valid migration protocol"); } @@ -4030,7 +4030,7 @@ fail_setup: return NULL; } =20 -void migration_connect(MigrationState *s) +void migration_start_outgoing(MigrationState *s) { Error *local_err =3D NULL; uint64_t rate_limit; diff --git a/migration/migration.h b/migration/migration.h index b55cc40613..c4ea57d80a 100644 --- a/migration/migration.h +++ b/migration/migration.h @@ -539,7 +539,8 @@ void migration_connect_error_propagate(MigrationState *= s, Error *error); void migrate_error_propagate(MigrationState *s, Error *error); bool migrate_has_error(MigrationState *s); =20 -void migration_connect(MigrationState *s); +void migration_start_outgoing(MigrationState *s); +void migration_start_incoming(void); =20 int migration_call_notifiers(MigrationEventType type, Error **errp); =20 diff --git a/migration/rdma.c b/migration/rdma.c index 98a6cebb17..4d63fd723b 100644 --- a/migration/rdma.c +++ b/migration/rdma.c @@ -3881,17 +3881,16 @@ static void rdma_accept_incoming_migration(void *op= aque) =20 rdma->migration_started_on_destination =3D 1; migration_incoming_setup(ioc, CH_MAIN, &error_abort); - migration_incoming_process(); + migration_start_incoming(); } =20 -void rdma_start_incoming_migration(InetSocketAddress *host_port, - Error **errp) +void rdma_connect_incoming(InetSocketAddress *host_port, Error **errp) { MigrationState *s =3D migrate_get_current(); int ret; RDMAContext *rdma; =20 - trace_rdma_start_incoming_migration(); + trace_rdma_connect_incoming(); =20 /* Avoid ram_block_discard_disable(), cannot change during migration. = */ if (ram_block_discard_is_required()) { @@ -3909,7 +3908,7 @@ void rdma_start_incoming_migration(InetSocketAddress = *host_port, goto err; } =20 - trace_rdma_start_incoming_migration_after_dest_init(); + trace_rdma_connect_incoming_after_dest_init(); =20 ret =3D rdma_listen(rdma->listen_id, 5); =20 @@ -3918,7 +3917,7 @@ void rdma_start_incoming_migration(InetSocketAddress = *host_port, goto cleanup_rdma; } =20 - trace_rdma_start_incoming_migration_after_rdma_listen(); + trace_rdma_connect_incoming_after_rdma_listen(); s->rdma_migration =3D true; qemu_set_fd_handler(rdma->channel->fd, rdma_accept_incoming_migration, NULL, (void *)(intptr_t)rdma); @@ -3933,8 +3932,8 @@ err: g_free(rdma); } =20 -void rdma_start_outgoing_migration(void *opaque, - InetSocketAddress *host_port, Error **errp) +void rdma_connect_outgoing(void *opaque, + InetSocketAddress *host_port, Error **errp) { MigrationState *s =3D opaque; RDMAContext *rdma_return_path =3D NULL; @@ -3958,7 +3957,7 @@ void rdma_start_outgoing_migration(void *opaque, goto err; } =20 - trace_rdma_start_outgoing_migration_after_rdma_source_init(); + trace_rdma_connect_outgoing_after_rdma_source_init(); ret =3D qemu_rdma_connect(rdma, false, errp); =20 if (ret < 0) { @@ -3991,11 +3990,11 @@ void rdma_start_outgoing_migration(void *opaque, rdma_return_path->is_return_path =3D true; } =20 - trace_rdma_start_outgoing_migration_after_rdma_connect(); + trace_rdma_connect_outgoing_after_rdma_connect(); =20 s->rdma_migration =3D true; migration_outgoing_setup(rdma_new_output(rdma)); - migration_connect(s); + migration_start_outgoing(s); return; return_path_err: qemu_rdma_cleanup(rdma); diff --git a/migration/rdma.h b/migration/rdma.h index f74f16a459..170c25cf44 100644 --- a/migration/rdma.h +++ b/migration/rdma.h @@ -21,10 +21,10 @@ =20 #include "system/memory.h" =20 -void rdma_start_outgoing_migration(void *opaque, InetSocketAddress *host_p= ort, - Error **errp); +void rdma_connect_outgoing(void *opaque, InetSocketAddress *host_port, + Error **errp); =20 -void rdma_start_incoming_migration(InetSocketAddress *host_port, Error **e= rrp); +void rdma_connect_incoming(InetSocketAddress *host_port, Error **errp); =20 /* * Constants used by rdma return codes diff --git a/migration/socket.c b/migration/socket.c index f94959828f..f57f1a8e7c 100644 --- a/migration/socket.c +++ b/migration/socket.c @@ -80,9 +80,8 @@ fail: migration_connect_error_propagate(data->s, err); } =20 -void socket_start_outgoing_migration(MigrationState *s, - SocketAddress *saddr, - Error **errp) +void socket_connect_outgoing(MigrationState *s, SocketAddress *saddr, + Error **errp) { QIOChannelSocket *sioc =3D qio_channel_socket_new(); struct SocketConnectData *data =3D g_new0(struct SocketConnectData, 1); @@ -140,8 +139,7 @@ socket_incoming_migration_end(void *opaque) object_unref(OBJECT(listener)); } =20 -void socket_start_incoming_migration(SocketAddress *saddr, - Error **errp) +void socket_connect_incoming(SocketAddress *saddr, Error **errp) { QIONetListener *listener =3D qio_net_listener_new(); MigrationIncomingState *mis =3D migration_incoming_get_current(); diff --git a/migration/socket.h b/migration/socket.h index 04ebbe95a1..f0c89b64c7 100644 --- a/migration/socket.h +++ b/migration/socket.h @@ -23,10 +23,10 @@ =20 void socket_send_channel_create(QIOTaskFunc f, void *data); =20 -void socket_start_incoming_migration(SocketAddress *saddr, Error **errp); +void socket_connect_incoming(SocketAddress *saddr, Error **errp); =20 -void socket_start_outgoing_migration(MigrationState *s, - SocketAddress *saddr, Error **errp); +void socket_connect_outgoing(MigrationState *s, + SocketAddress *saddr, Error **errp); void socket_cleanup_outgoing_migration(void); =20 #endif diff --git a/migration/trace-events b/migration/trace-events index cbf10d0b63..91d7506634 100644 --- a/migration/trace-events +++ b/migration/trace-events @@ -271,11 +271,11 @@ rdma_registration_handle_wait(void) "" rdma_registration_start(uint64_t flags) "%" PRIu64 rdma_registration_stop(uint64_t flags) "%" PRIu64 rdma_registration_stop_ram(void) "" -rdma_start_incoming_migration(void) "" -rdma_start_incoming_migration_after_dest_init(void) "" -rdma_start_incoming_migration_after_rdma_listen(void) "" -rdma_start_outgoing_migration_after_rdma_connect(void) "" -rdma_start_outgoing_migration_after_rdma_source_init(void) "" +rdma_connect_incoming(void) "" +rdma_connect_incoming_after_dest_init(void) "" +rdma_connect_incoming_after_rdma_listen(void) "" +rdma_connect_outgoing_after_rdma_connect(void) "" +rdma_connect_outgoing_after_rdma_source_init(void) "" =20 # postcopy-ram.c postcopy_discard_send_finish(const char *ramblock, int nwords, int ncmds) = "%s mask words sent=3D%d in %d commands" --=20 2.51.0