[{"id":3629518,"web_url":"http://patchwork.ozlabs.org/comment/3629518/","msgid":"<aVLZQBX_RONdYTlT@x1.local>","list_archive_url":null,"date":"2025-12-29T19:40:48","subject":"Re: [RFC PATCH 15/25] migration/channel: Rename\n migration_channel_connect","submitter":{"id":67717,"url":"http://patchwork.ozlabs.org/api/people/67717/","name":"Peter Xu","email":"peterx@redhat.com"},"content":"On Fri, Dec 26, 2025 at 06:19:17PM -0300, Fabiano Rosas wrote:\n> Rename migration_channel_connect to indicate this is the source\n> side. Future patches will do similar changes to the incoming side and\n> this will avoid inconsistencies in naming.\n> \n> Signed-off-by: Fabiano Rosas <farosas@suse.de>\n\nWe have a lot of other helpers are using this pattern as names:\n\n  migration_incoming*\n\nSo I wonder if we want to unify it with\n\n  migration_outgoing*\n\n?\n\nSaid that, I don't think it's always the case, so it's not a rule either.\nAdding \"outgoing\" anywhere should indeed be an improvement already.\n\nWhichever you prefer:\n\nReviewed-by: Peter Xu <peterx@redhat.com>\n\n> ---\n>  migration/channel.c | 9 +--------\n>  migration/channel.h | 2 +-\n>  migration/exec.c    | 2 +-\n>  migration/fd.c      | 2 +-\n>  migration/file.c    | 2 +-\n>  migration/socket.c  | 2 +-\n>  migration/tls.c     | 2 +-\n>  7 files changed, 7 insertions(+), 14 deletions(-)\n> \n> diff --git a/migration/channel.c b/migration/channel.c\n> index af6c2cc76e..a8a5f26dfd 100644\n> --- a/migration/channel.c\n> +++ b/migration/channel.c\n> @@ -61,14 +61,7 @@ out:\n>      }\n>  }\n>  \n> -\n> -/**\n> - * @migration_channel_connect - Create new outgoing migration channel\n> - *\n> - * @s: Current migration state\n> - * @ioc: Channel to which we are connecting\n> - */\n> -void migration_channel_connect(MigrationState *s, QIOChannel *ioc)\n> +void migration_channel_connect_outgoing(MigrationState *s, QIOChannel *ioc)\n>  {\n>      trace_migration_set_outgoing_channel(ioc, object_get_typename(OBJECT(ioc)));\n>  \n> diff --git a/migration/channel.h b/migration/channel.h\n> index ccfeaaef18..7d3457271d 100644\n> --- a/migration/channel.h\n> +++ b/migration/channel.h\n> @@ -20,7 +20,7 @@\n>  \n>  void migration_channel_process_incoming(QIOChannel *ioc);\n>  \n> -void migration_channel_connect(MigrationState *s, QIOChannel *ioc);\n> +void migration_channel_connect_outgoing(MigrationState *s, QIOChannel *ioc);\n>  \n>  int migration_channel_read_peek(QIOChannel *ioc,\n>                                  const char *buf,\n> diff --git a/migration/exec.c b/migration/exec.c\n> index d83a07435a..d1629944dc 100644\n> --- a/migration/exec.c\n> +++ b/migration/exec.c\n> @@ -55,7 +55,7 @@ void exec_start_outgoing_migration(MigrationState *s, strList *command,\n>      }\n>  \n>      qio_channel_set_name(ioc, \"migration-exec-outgoing\");\n> -    migration_channel_connect(s, ioc);\n> +    migration_channel_connect_outgoing(s, ioc);\n>      object_unref(OBJECT(ioc));\n>  }\n>  \n> diff --git a/migration/fd.c b/migration/fd.c\n> index 0144a70742..150b236fbf 100644\n> --- a/migration/fd.c\n> +++ b/migration/fd.c\n> @@ -70,7 +70,7 @@ void fd_start_outgoing_migration(MigrationState *s, const char *fdname, Error **\n>      }\n>  \n>      qio_channel_set_name(ioc, \"migration-fd-outgoing\");\n> -    migration_channel_connect(s, ioc);\n> +    migration_channel_connect_outgoing(s, ioc);\n>      object_unref(OBJECT(ioc));\n>  }\n>  \n> diff --git a/migration/file.c b/migration/file.c\n> index 7bb9c1c79f..935402f36b 100644\n> --- a/migration/file.c\n> +++ b/migration/file.c\n> @@ -122,7 +122,7 @@ void file_start_outgoing_migration(MigrationState *s,\n>          return;\n>      }\n>      qio_channel_set_name(ioc, \"migration-file-outgoing\");\n> -    migration_channel_connect(s, ioc);\n> +    migration_channel_connect_outgoing(s, ioc);\n>  }\n>  \n>  static gboolean file_accept_incoming_migration(QIOChannel *ioc,\n> diff --git a/migration/socket.c b/migration/socket.c\n> index 298bac30cc..611915f84d 100644\n> --- a/migration/socket.c\n> +++ b/migration/socket.c\n> @@ -73,7 +73,7 @@ static void socket_outgoing_migration(QIOTask *task,\n>      }\n>  \n>      trace_migration_socket_outgoing_connected();\n> -    migration_channel_connect(data->s, sioc);\n> +    migration_channel_connect_outgoing(data->s, sioc);\n>      return;\n>  err:\n>      trace_migration_socket_outgoing_error(error_get_pretty(err));\n> diff --git a/migration/tls.c b/migration/tls.c\n> index a54e8e6e14..f68e6a533b 100644\n> --- a/migration/tls.c\n> +++ b/migration/tls.c\n> @@ -114,7 +114,7 @@ static void migration_tls_outgoing_handshake(QIOTask *task,\n>      }\n>  \n>      trace_migration_tls_outgoing_handshake_complete();\n> -    migration_channel_connect(s, ioc);\n> +    migration_channel_connect_outgoing(s, ioc);\n>  }\n>  \n>  QIOChannelTLS *migration_tls_client_create(QIOChannel *ioc,\n> -- \n> 2.51.0\n>","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=NfDMFtpT;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=google header.b=jHGtbZfC;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)"],"Received":["from lists.gnu.org (lists.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4dg66T2dHDz1xpV\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 30 Dec 2025 06:41:37 +1100 (AEDT)","from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1vaJ76-0003Ed-2Z; Mon, 29 Dec 2025 14:41:09 -0500","from eggs.gnu.org ([2001:470:142:3::10])\n by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <peterx@redhat.com>) id 1vaJ6s-0002uF-Ur\n for qemu-devel@nongnu.org; Mon, 29 Dec 2025 14:40:57 -0500","from us-smtp-delivery-124.mimecast.com ([170.10.129.124])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <peterx@redhat.com>) id 1vaJ6r-0000qL-AN\n for qemu-devel@nongnu.org; Mon, 29 Dec 2025 14:40:54 -0500","from mail-qk1-f198.google.com (mail-qk1-f198.google.com\n [209.85.222.198]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-491-5BekE4MlM4SzPCxCCcGV5g-1; Mon, 29 Dec 2025 14:40:50 -0500","by mail-qk1-f198.google.com with SMTP id\n af79cd13be357-8c2a3a614b5so80486985a.0\n for <qemu-devel@nongnu.org>; Mon, 29 Dec 2025 11:40:50 -0800 (PST)","from x1.local ([142.188.210.156]) by smtp.gmail.com with ESMTPSA id\n af79cd13be357-8c0975ee7bfsm2362805185a.51.2025.12.29.11.40.48\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Mon, 29 Dec 2025 11:40:49 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1767037252;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n in-reply-to:in-reply-to:references:references;\n bh=twAoBe533cmrg1sqwb9ZFphFISzxH4yWtN9QEHx9MFo=;\n b=NfDMFtpTKQu5ioWjd64RxaQNpGqQRd3k40fx7hqdHxsY2C4EE0iztX92KqWjgqsHWfVxGq\n kOcmoX2hzwbVRjmCz7930VA6RJtoysV8XsmQyD6QvGVUG6Pnxohnzu4uw3u7RHnNaVtekv\n zOUoTiaVElr8ik3mUcGXEiNasUUqw8M=","v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=redhat.com; s=google; t=1767037250; x=1767642050; darn=nongnu.org;\n h=in-reply-to:content-disposition:mime-version:references:message-id\n :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to;\n bh=twAoBe533cmrg1sqwb9ZFphFISzxH4yWtN9QEHx9MFo=;\n b=jHGtbZfCeWoI6ICDL/bXp0oXzz1scNtb0QKp41aHrWsg00j4doraxWzy6vAk+u3sri\n wiNAIdcYWrIxpsNH7vnD0HZrBEx1ndOV8YIoM0T46hCmBy9hqcYUDZfqAIpAZZGAxoTf\n eE4xea+MxPqC17fsFbBuKHLcmq0moGyjX59qLvckoLpJwrMYBKGGcwvdLKwee7mVQaWZ\n WVOpSekr6ODyT37P0b+GlhMwMHh8U/7q/YQpBYF+Nt9SlzrIeJMtwyFPmeyAc2mdrzvd\n STidUkHIIOYbTOLhyCkcOkWQCQgRbPvgBY1G6YP/NRRJwKATL7H60lnN/gDFiVnCd+Sw\n nIgg=="],"X-MC-Unique":"5BekE4MlM4SzPCxCCcGV5g-1","X-Mimecast-MFC-AGG-ID":"5BekE4MlM4SzPCxCCcGV5g_1767037250","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1767037250; x=1767642050;\n h=in-reply-to:content-disposition:mime-version:references:message-id\n :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc\n :subject:date:message-id:reply-to;\n bh=twAoBe533cmrg1sqwb9ZFphFISzxH4yWtN9QEHx9MFo=;\n b=bwzVcc0sB5864LrbzrTDPNgK3Z4WdchSlnhI4t4Qp4KUt5iJBj8lqW4z3wAn7o7fY/\n 2RFd637RLC5ceb/hR40aRJIKrn1ElrJ5DRLckRWBMbvV9Ah5hp/a3SQbfasoQuB2eXZm\n 7+t0DIPFWA1XgOeuplj4bpGJHLsXTBmpQm9osgR+BMCaUj1/7FexeuFOve34oKwASjbQ\n u4ZXrMoMvQSU6sFRH7sz3LFOFp5JWdH8JCm7xR8zP3WOvLLqDzXNx4ARMl4A6T+3F2Sw\n tY6LA/sg2bZyAcP0Ku4uw9zVFQyLdUpNXKUmmNOD5mmlI+3vkQ+qf6qXlstABHhRBwvA\n s6tQ==","X-Gm-Message-State":"AOJu0Yz9GvJta0VsWX8kL5DO7eC8VNE4hXz5jeFSojBUQ7BAWFnyUS6Z\n CSMmUZ3KAg9TKJ4x3LkLcpZC8/aH/+lHidf2pmpkMtIz2IYGhv4s5b9WRlIMKlInLR2Thm5sLkh\n zMHVbhwrGeVDEMAsyQMH0iT+BhBQXI2aqPIhA5qVOxjJMElmVQ4doBy9fB07NrvGb","X-Gm-Gg":"AY/fxX4MatB721rMdy/FNVtM35mYhcgX7rNvYVwqfZJ20G5oFLiYi9Po6seB6evoc6D\n y72pFVLpjdghLKaNtrBAxCv6XSiM1ft5MPxdpqf6Jp90agzeg3XeCLlc46j1GkJqgt3bhEfgaQ3\n ENH2+JAHbW2JRwYoQbQGiT5UMZj4/zzIE2eyiyx5uw+zEIUaiWwUZW9Xbxmo6ook6szwPYNKEDT\n ztkawuuNuIcd3KNPnmIXZyZepYlE4byyGUHBn4UiirwtLICDSi62Cq2NuicdCxpkRgmVT+KZ0eo\n ADSgb+YswNTToxy4S6Q0nTA++UOAuPb6BQI02j7adeA4xRju1HlvFpsq4n0Bi1TmnFM48/JjbNo\n XHSo=","X-Received":["by 2002:a05:620a:7107:b0:84b:7b84:4ec with SMTP id\n af79cd13be357-8c090028a13mr4771349685a.22.1767037250009;\n Mon, 29 Dec 2025 11:40:50 -0800 (PST)","by 2002:a05:620a:7107:b0:84b:7b84:4ec with SMTP id\n af79cd13be357-8c090028a13mr4771347285a.22.1767037249493;\n Mon, 29 Dec 2025 11:40:49 -0800 (PST)"],"X-Google-Smtp-Source":"\n AGHT+IEBOPvuQKQIYCfR2VsRN98jKKWov9zI+6ZLmzBGwxYVTyGr0ayImG7bQVno733NnzME2elyoQ==","Date":"Mon, 29 Dec 2025 14:40:48 -0500","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\n migration_channel_connect","Message-ID":"<aVLZQBX_RONdYTlT@x1.local>","References":"<20251226211930.27565-1-farosas@suse.de>\n <20251226211930.27565-16-farosas@suse.de>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20251226211930.27565-16-farosas@suse.de>","Received-SPF":"pass client-ip=170.10.129.124; envelope-from=peterx@redhat.com;\n helo=us-smtp-delivery-124.mimecast.com","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, DKIMWL_WL_HIGH=-0.001,\n DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001,\n RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001,\n SPF_HELO_PASS=-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-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<https://lists.nongnu.org/archive/html/qemu-devel>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org"}}]