From nobody Tue Feb 10 04:16:59 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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 ARC-Seal: i=1; a=rsa-sha256; t=1612882104; cv=none; d=zohomail.com; s=zohoarc; b=FKEAz5XcvOuynThzSRQ/IayN3NZO0DrGSryDt5YCcmVXNc77dHVUqo0y8nZI3x2+mEdGA8PPQKkVRksiw4dSvN+qCGQ2gcVUjMgOGDVPdVkzEJw21kkUhroIncsLZk5o5b6AtB8GYbibY7bMMz0yVSBqWzC7/FNkH5N/l2+cZv8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612882104; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ru3bRhABI6OtYIVBvPFmFVMH/ELX2iFa6NhT2U1i/9Y=; b=FykXtDdgv9jfnc1rJ/M7D+PzROelFIUTMcM9bSFQQXFnZFlsTjg6bte9LpG8dYnmiGcLgLt+Q8dFEpzT6Ixgl+kZ08BJVrKGMjMToYREMnrgU/t7seJILzPYDz4+423kGANDVt70bHurFZ8YgiuEyU+UuWg72R+c9BSTLI+I/UE= ARC-Authentication-Results: i=1; mx.zohomail.com; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1612882104158578.5047727746753; Tue, 9 Feb 2021 06:48:24 -0800 (PST) Received: from localhost ([::1]:51574 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l9UJT-0000NR-5P for importer@patchew.org; Tue, 09 Feb 2021 09:48:23 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58532) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9QTv-0006rF-Q1 for qemu-devel@nongnu.org; Tue, 09 Feb 2021 05:42:55 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:2645) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9QTs-0000L4-26 for qemu-devel@nongnu.org; Tue, 09 Feb 2021 05:42:55 -0500 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4DZfZW4B7rz7hmh; Tue, 9 Feb 2021 18:41:23 +0800 (CST) Received: from huawei.com (10.175.104.175) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.498.0; Tue, 9 Feb 2021 18:42:39 +0800 From: Hao Wang To: , , Subject: [PATCH v2 1/2] migration/tls: fix inverted semantics in multifd_channel_connect Date: Tue, 9 Feb 2021 18:42:36 +0800 Message-ID: <20210209104237.2250941-2-wanghao232@huawei.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20210209104237.2250941-1-wanghao232@huawei.com> References: <20210209104237.2250941-1-wanghao232@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.175.104.175] X-CFilter-Loop: Reflected 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=45.249.212.35; envelope-from=wanghao232@huawei.com; helo=szxga07-in.huawei.com X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 09 Feb 2021 09:41:09 -0500 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: yubihong@huawei.com, alex.chen@huawei.com, zhang.zhanghailiang@huawei.com, qemu-devel@nongnu.org, xiexiangyou@huawei.com, zhengchuan@huawei.com, wanghao232@huawei.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Function multifd_channel_connect() return "true" to indicate failure, which is rather confusing. Fix that. Signed-off-by: Hao Wang Reviewed-by: Chuan Zheng Reviewed-by: Daniel P. Berrang=C3=A9 --- migration/multifd.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/migration/multifd.c b/migration/multifd.c index 1a1e589064..2a1ea85ade 100644 --- a/migration/multifd.c +++ b/migration/multifd.c @@ -798,9 +798,9 @@ static bool multifd_channel_connect(MultiFDSendParams *= p, * function after the TLS handshake, * so we mustn't call multifd_send_thread until then */ - return false; - } else { return true; + } else { + return false; } } else { /* update for tls qio channel */ @@ -808,10 +808,10 @@ static bool multifd_channel_connect(MultiFDSendParams= *p, qemu_thread_create(&p->thread, p->name, multifd_send_thread, p, QEMU_THREAD_JOINABLE); } - return false; + return true; } =20 - return true; + return false; } =20 static void multifd_new_send_channel_cleanup(MultiFDSendParams *p, @@ -844,7 +844,7 @@ static void multifd_new_send_channel_async(QIOTask *tas= k, gpointer opaque) p->c =3D QIO_CHANNEL(sioc); qio_channel_set_delay(p->c, false); p->running =3D true; - if (multifd_channel_connect(p, sioc, local_err)) { + if (!multifd_channel_connect(p, sioc, local_err)) { goto cleanup; } return; --=20 2.23.0