From patchwork Sun Dec 31 09:30:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avihai Horon X-Patchwork-Id: 13507161 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3F967C3DA6E for ; Sun, 31 Dec 2023 09:31:47 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rJs9l-0002DB-CS; Sun, 31 Dec 2023 04:30:54 -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 1rJs9b-0002C5-VX for qemu-devel@nongnu.org; Sun, 31 Dec 2023 04:30:44 -0500 Received: from mail-bn8nam12on2062c.outbound.protection.outlook.com ([2a01:111:f400:fe5b::62c] helo=NAM12-BN8-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rJs9Z-0008Kn-Ev for qemu-devel@nongnu.org; Sun, 31 Dec 2023 04:30:43 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PLcbFRYzsZ98FlzpK2qmCvRbRC2gBwRJRcN04GlTbHOKN5pelpRpTbrRr/IkaabhPPKPIpb8E6kNl+De7N9IjWAYlb3tU5qtjEkIHQ6zZ9cf2rIp3DiYuoCVyLMgeWOjCWE7sTwiNLq6Vv+lw56uU8mGyjucSaPPnhoweWIndKZFVvZfSzcLVGJ7oYTnwCwU8nsiwkuUDkQotLPSm9jXe9GO9yRgohW8vtRV6e3A9U2ThwDwfBVsxMnowOgxAcnRmiHlHAdMUqq26LIbEyNax3unroiNtfd6nW55rUAoOCdKUJ80Eg+udlvHPE/QRcGC7BA9OI2snMo17SPmxUAxbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=UdIo33Cr60+SuFBvvBM2M2d8TGnpS4hOxhdu8/lt//g=; b=SezXtOTl9FelmZ3DfOAB4FRCBgGprW+Xy7Mlv8PKspmTT7OhXsYdoV/jswg3UWf75h54TlWFrOq+1NvIklA+rZeG2gFx1GLgcWskMl6p76xV+KXH8pQI/jI8tQSQrhYWtiSnbdMxakSUJ7Ytui+m3mWThZyvHt4RHdqkY00T1SREKYj2tlf25lUhvdTk6V1GR/8oF5LZexz6l8RXZYz4a2ruF1dX5oSgQc+bvwSp68R06D66lDi9kJcT3EVeqfgj0HB8YjelikXaBwDMO3c8MIu/OoazRGBGAbKny8hdyLgL+Dc/ZilGi1kbW2azHF9mwrKPl1G5HplFHvpE37hb4Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=nongnu.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UdIo33Cr60+SuFBvvBM2M2d8TGnpS4hOxhdu8/lt//g=; b=D4ObncjqYgLlbqSzRVi4/Sx+hx3utQdv2pxshvwL1qL5o7sPKd2njClbsqfg7dwjt2sMDl8R9y8h1ZdbezH15f7gJUTOCGjR6O6fqMRyvnwVAWMqtY2UOvg5q/DOok3PJxDZKExNtqMmBWsM1sioJzwOB5HFpU8HMp1LMjIsm7wQuOydntMVYfrj6GO/qVn3vwyCehTDFs3++CbcTRWHoLlSephCMlYwcqOXZ8fh8WOlncMnMHjfAByluKrtmvRSg8eVfy5mzhT3sEn2OATBbew1vXPCZrD7u8SHbOt0uCMmmkjZusV1wejf5WKWRDJaWJd5T8XeQR2XdSUillTL5g== Received: from CYZPR19CA0019.namprd19.prod.outlook.com (2603:10b6:930:8e::28) by SA1PR12MB8948.namprd12.prod.outlook.com (2603:10b6:806:38e::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.21; Sun, 31 Dec 2023 09:30:36 +0000 Received: from CY4PEPF0000FCC3.namprd03.prod.outlook.com (2603:10b6:930:8e:cafe::b8) by CYZPR19CA0019.outlook.office365.com (2603:10b6:930:8e::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.22 via Frontend Transport; Sun, 31 Dec 2023 09:30:36 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CY4PEPF0000FCC3.mail.protection.outlook.com (10.167.242.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.9 via Frontend Transport; Sun, 31 Dec 2023 09:30:36 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Sun, 31 Dec 2023 01:30:22 -0800 Received: from rnnvmail205.nvidia.com (10.129.68.10) by rnnvmail203.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Sun, 31 Dec 2023 01:30:21 -0800 Received: from vdi.nvidia.com (10.127.8.9) by mail.nvidia.com (10.129.68.10) with Microsoft SMTP Server id 15.2.986.41 via Frontend Transport; Sun, 31 Dec 2023 01:30:19 -0800 From: Avihai Horon To: CC: Juan Quintela , Peter Xu , "Fabiano Rosas" , Leonardo Bras , Li Zhijian , Avihai Horon Subject: [PATCH 01/11] migration: Remove migrate_max_downtime() declaration Date: Sun, 31 Dec 2023 11:30:06 +0200 Message-ID: <20231231093016.14204-2-avihaih@nvidia.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20231231093016.14204-1-avihaih@nvidia.com> References: <20231231093016.14204-1-avihaih@nvidia.com> MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000FCC3:EE_|SA1PR12MB8948:EE_ X-MS-Office365-Filtering-Correlation-Id: 218722c0-83af-426c-f0f9-08dc09e324ff X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +9p/Q8qSk+lWOQtrnFpOmNAq9vkvYKTPgQBBo6R4ZExZUUMsegokBV0VmD/nPELsV10bpQdVfVVlzM1SvdCh05G8MnOlYhd+IxzfaGER9Ft1btzgWQfO4HQtxCOfhW/lTHTdbNceYg4kIJ8O5JtzssOkJ3L0w9sfvAofRyMiO6S6jSmond/RS/OtlfIUV4G7F62PSe/QF1TifXKZHLiebq3mXLRx6dyj5DSBxhs2O7aJZu2QeUzGEiLG+8M32U52LjicTc4TGKWVxIyjJ3o2qheLfxJ4caNY7i4dWhl/sVO9eZx74QA9NtogvoRnCId09WlkuPT5cacM5hSZydVi0PMjOILk7OXH4LnVwojWHb1XU/qzKd9uU0IwIIqDcXwftA8AohbGg+JTRFM6PdlYUXt7K4y1Qac6VlUfND4gGqxebXfwKTkzvCaJiWiJ2LNP5TGiSekFzgzczFokOBDneYWcICSAPGMerrQ5DX0OzRKoXccoLSCTFPAoTUfa3fQLMviKIQV5Ouk9Z/Lwm/GHFzgyRd6P5f8e/Si0YmxAdB9Kxq2/bHaJX2zthaN8gMlx1iA3RRe4jlR8svsotWycJTBP+9OIb1bvFrDeeUtv7dsfj3fdsuAmndrf+86gc9dM9BQ2YKV7aD6Psj+f4OK6Wxqww6CmsBEwznld34MwoE2LXkL/bK9hpgC+/F6vzVKFwrAI7jLxfzkF+Kf5zLQE/GydoBqSqd2Tn76dgHzTHIRklt6cXuSGM1MNGp8tcbtO X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230031)(4636009)(376002)(136003)(396003)(39860400002)(346002)(230922051799003)(186009)(1800799012)(64100799003)(82310400011)(451199024)(36840700001)(40470700004)(46966006)(7696005)(82740400003)(478600001)(356005)(426003)(6916009)(86362001)(336012)(107886003)(7636003)(36756003)(70206006)(70586007)(6666004)(316002)(26005)(1076003)(83380400001)(40480700001)(8936002)(4326008)(8676002)(4744005)(5660300002)(54906003)(40460700003)(2906002)(41300700001)(36860700001)(47076005)(2616005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Dec 2023 09:30:36.1653 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 218722c0-83af-426c-f0f9-08dc09e324ff X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000FCC3.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB8948 Received-SPF: softfail client-ip=2a01:111:f400:fe5b::62c; envelope-from=avihaih@nvidia.com; helo=NAM12-BN8-obe.outbound.protection.outlook.com X-Spam_score_int: -47 X-Spam_score: -4.8 X-Spam_bar: ---- X-Spam_report: (-4.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-2.667, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org migrate_max_downtime() has been removed long ago, but its declaration was mistakenly left. Remove it. Signed-off-by: Avihai Horon Reviewed-by: Fabiano Rosas --- migration/migration.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/migration/migration.h b/migration/migration.h index cf2c9c88e0..b3c9288c38 100644 --- a/migration/migration.h +++ b/migration/migration.h @@ -480,8 +480,6 @@ void migration_incoming_process(void); bool migration_has_all_channels(void); -uint64_t migrate_max_downtime(void); - void migrate_set_error(MigrationState *s, const Error *error); bool migrate_has_error(MigrationState *s); From patchwork Sun Dec 31 09:30:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avihai Horon X-Patchwork-Id: 13507169 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6C33FC47079 for ; Sun, 31 Dec 2023 09:32:42 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rJs9m-0002DL-Ix; Sun, 31 Dec 2023 04:30:54 -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 1rJs9c-0002CB-I7 for qemu-devel@nongnu.org; Sun, 31 Dec 2023 04:30:45 -0500 Received: from mail-bn1nam02on20606.outbound.protection.outlook.com ([2a01:111:f400:7eb2::606] helo=NAM02-BN1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rJs9a-0008Kw-QZ for qemu-devel@nongnu.org; Sun, 31 Dec 2023 04:30:44 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f69Bkp7B35ZExfJyVk9hZIETNQobMjP0H9yV/T7gUTCKDHBNz2qEXVbSzGV65BKPxHz507aHsoAEq5A2YUGMiMOTkESivuUojPesspEzSt0zKsjiMzsGbqXEjbYZ4H8B3pmXYajUgxSnZQMWFWAVC/UOqzo+SjkXtcoiEkXcQLus8cR5fNufyE4WrDtuSLYpwTeLPlHvMqgwbjeuHZg8eO/I1z3J8U4NUX4NBWP7suF9PJSKHFoozJcy4yehFbAA6vdCee/bfkLAqTH7kqAsYkeFI/mbv2op4fRVc6ALVM1kU8PORFlFtVDK+2veHztAh5EyrzXS3AMNSBGlDSYNCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=dCtMpOL+kL48xKZQbBiJDmBJVuOLVM6GAtZub10c0Ls=; b=eDM6XdicpXHW6i/jCaLuya8IytGXq8BeFVE7ycHQhaObPw3Fx1JVgbN+yNcfNuBvizHYwtlyDTQsvf5jzf2s/GQzLFhbAN1KGVprH0gKH8x2b0GVXcYUQzRL6AyKhceb/LsJ61mqe6Xhu8Qtmcw12wdJnGwH1AcVSVP/iKmEeZv1uU2k11zUtSrkB0YPWGV5rtilDim407IdcGPg1aOZ5/b8wzegQfQ0ezjeVZGpdw6OOSQOF/2VuhFlgigLoDXvpMDtB6JRqev3TpGBoDVn08ek7mdeHUOIppAZWQyRCsLFm7eFSDtEMdkpN2gK2g9MdNmdC8XW8T20pJPeQ52oBQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=nongnu.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dCtMpOL+kL48xKZQbBiJDmBJVuOLVM6GAtZub10c0Ls=; b=i9yz3o5c/STu4rSGF2fP3NwuwygV7ty7dd49j1hh67O+M5vmZI+0menZsfaZ+9Laapmq5n32pIf9hyenb1/J3cYvqHO0OpOwBKp+7l/Ps8/0qFBw7AU9X3saxVze5Lsr5Xb9Oha8A9FBxUACZI5pxexAVqv8bttDEUAD0j9+D0FD8LDWhOh1uI8wTnplxs29H8TKw8kMmFQy8dFo6KbsE1wMB52Rl1L8Nt7m9IfHFtjgRG4c5tOE9+v0Mm3sITEMYCGwSJwhZ5LTcIb9mQbyvxC+K+qBQxDJwShjF+iCkH9p8rWnmjj8z0VzEM+rAQE2uI/DgHZWRlQ6GszwzL/NZw== Received: from CY8PR10CA0006.namprd10.prod.outlook.com (2603:10b6:930:4f::29) by BN9PR12MB5065.namprd12.prod.outlook.com (2603:10b6:408:132::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.23; Sun, 31 Dec 2023 09:30:38 +0000 Received: from CY4PEPF0000FCC5.namprd03.prod.outlook.com (2603:10b6:930:4f:cafe::4) by CY8PR10CA0006.outlook.office365.com (2603:10b6:930:4f::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.24 via Frontend Transport; Sun, 31 Dec 2023 09:30:37 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CY4PEPF0000FCC5.mail.protection.outlook.com (10.167.242.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.9 via Frontend Transport; Sun, 31 Dec 2023 09:30:37 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Sun, 31 Dec 2023 01:30:24 -0800 Received: from rnnvmail205.nvidia.com (10.129.68.10) by rnnvmail203.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Sun, 31 Dec 2023 01:30:24 -0800 Received: from vdi.nvidia.com (10.127.8.9) by mail.nvidia.com (10.129.68.10) with Microsoft SMTP Server id 15.2.986.41 via Frontend Transport; Sun, 31 Dec 2023 01:30:22 -0800 From: Avihai Horon To: CC: Juan Quintela , Peter Xu , "Fabiano Rosas" , Leonardo Bras , Li Zhijian , Avihai Horon Subject: [PATCH 02/11] migration: Remove nulling of hostname in migrate_init() Date: Sun, 31 Dec 2023 11:30:07 +0200 Message-ID: <20231231093016.14204-3-avihaih@nvidia.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20231231093016.14204-1-avihaih@nvidia.com> References: <20231231093016.14204-1-avihaih@nvidia.com> MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000FCC5:EE_|BN9PR12MB5065:EE_ X-MS-Office365-Filtering-Correlation-Id: f6ca53f5-30d5-432a-0add-08dc09e325cb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IrDgxt+3i2r8boxdfWLdOEmGtZNKYBudkrcQKNPM5TNsDQH1NsGpt06r6NlBGHlebdZrbtOEqqD4cJxEE0K80Bsp+jlpxUtYPWY7lvqG2xDsb43aN2tqx/cZR09niR5F5sW7Q3V1nhKidW8dW9pW1wy8sCkZE0FkK1dFMeDFvTgN8B/XfVG8bUy8hHo5RqBZRoomNBPzz2o2BrTGWcegI7sXUbQL22Ji/RJlZ2LI/RejfTD46uG8Il3y/isioiLA+Tzi2LadUyCgsTPUNatL/oA0+LF9dCdfJuTd/hO46ctA2lmbP7Q7Pf5xjo/viWOTgjwn0iytMAF0OVVfKxDfKDPz8u6D6pYyOL4kCaxR4Ho8iJoZm/PYehWxEI8vxhDEDKPuByclU1T9o6MtnUFx3DkEIA9eL/oZujq40lhI0F3A60fUhZOqrxV3wWAfQkqmPobOe0a3bq8xxnbSqNUXOC2w+X90/FgLKPfQz7XvCNZrDCl8mHHKuWM+XwlfzXEK3U454fCKEc97YoTsdRdF1o+hI96kHujCJR8RSyHAe7fCapaFFMUF02LZli46xwECO7N0V/1OEnin+xvC8QwIfglU1nNnkmui6a9VEjuA4t9B4GyMeaJhdvHqmzElN0Fp7GGki5dYXHxJSbRTTcnFvZy63qpf4m1+DBrU8sDfB3KZ9wQO4HNtyhtMNTbRtqZ7LiBXmWCxc//X/HXFyI1Ub3ly714U7ArBWmCbsNYh13/8UYIMNcLjA6OiZCBf17T3 X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230031)(4636009)(136003)(346002)(396003)(39860400002)(376002)(230922051799003)(1800799012)(186009)(64100799003)(82310400011)(451199024)(46966006)(40470700004)(36840700001)(36860700001)(478600001)(107886003)(40460700003)(41300700001)(82740400003)(356005)(7636003)(6916009)(36756003)(4326008)(86362001)(316002)(54906003)(70206006)(70586007)(6666004)(47076005)(7696005)(336012)(426003)(26005)(1076003)(40480700001)(83380400001)(8936002)(8676002)(2616005)(4744005)(2906002)(5660300002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Dec 2023 09:30:37.4964 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f6ca53f5-30d5-432a-0add-08dc09e325cb X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000FCC5.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN9PR12MB5065 Received-SPF: softfail client-ip=2a01:111:f400:7eb2::606; envelope-from=avihaih@nvidia.com; helo=NAM02-BN1-obe.outbound.protection.outlook.com X-Spam_score_int: -47 X-Spam_score: -4.8 X-Spam_bar: ---- X-Spam_report: (-4.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-2.667, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org MigrationState->hostname is set to NULL in migrate_init(). This is redundant because it is already freed and set to NULL in migrade_fd_cleanup(). Remove it. Signed-off-by: Avihai Horon Reviewed-by: Fabiano Rosas --- migration/migration.c | 1 - 1 file changed, 1 deletion(-) diff --git a/migration/migration.c b/migration/migration.c index 3ce04b2aaf..1e25d7966f 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -1588,7 +1588,6 @@ int migrate_init(MigrationState *s, Error **errp) s->migration_thread_running = false; error_free(s->error); s->error = NULL; - s->hostname = NULL; s->vmdesc = NULL; migrate_set_state(&s->state, MIGRATION_STATUS_NONE, MIGRATION_STATUS_SETUP); From patchwork Sun Dec 31 09:30:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Avihai Horon X-Patchwork-Id: 13507168 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 73563C47074 for ; Sun, 31 Dec 2023 09:32:41 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rJs9s-0002Fg-Gh; Sun, 31 Dec 2023 04:31:00 -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 1rJs9i-0002D3-7e for qemu-devel@nongnu.org; Sun, 31 Dec 2023 04:30:50 -0500 Received: from mail-mw2nam10on20601.outbound.protection.outlook.com ([2a01:111:f403:2412::601] helo=NAM10-MW2-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rJs9g-0008LL-BA for qemu-devel@nongnu.org; Sun, 31 Dec 2023 04:30:49 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bVkm4VazmeGpdPPJHcWs3/BfXMI+BGuP6PePT84xIcRdEOrUuqQmGv8XwI3uf/v4zJs/zKGSJ1Kqf0HhNDFwdpXdao4MyAwu703tNeXaRCcMSxOH8mnTq+9POWLFRTJDT0haddtqQRnX98kpihCZLqKkoTOfdQXqnTy1UNG5E/fgg6xO/sBWQ7g6yl20Mh533JMjnAV5J2AJKBhT9jnnUe8k0a2DevrUD3lcPimS6mt/jSeZWlPXXqr4i64hQnI4E0CTEwK4ciO4jsTqDeLAfthyRHQbMBheqdcApaDcLmK3bP0QevrHV+LdMLFvspeDsZdg3rtydA6Rry2/Ngw5ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=3fl/vu8Cqe8+KUjzLMOn+1F2M6P6XaxNe2THMJmQmGQ=; b=HHItAoqbtC7TpFVl2QxettnbNcFpvBsrJ9kvLjPHyajLXvmtW6Mc002ZUl0Ao3TUTHSKt7+/q8CBiALXjei+JqYQeJqfDwZvl+LxnqO0ODcfJEnobVasmq+p9Ri+RpAAiCGf/KDdakP3XwLKUsn6iZk70LMf6cDusz51E8cYPvx9NIYxuS6IeQHDn6y0Pazl3/cs6g0sd12sDGOWrx83O0zWU4DPAMKUn4T1xUW7SYbduosneroL1UHNfxjxwy2TPvd9kuvD6SD+I3ZIThuLSi7XOWs0ZGUESnsmV0dtDge/oU3DWeRXJyZoWMRYwXWuLbPNH+opkR26hxmP7+e6vA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=nongnu.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3fl/vu8Cqe8+KUjzLMOn+1F2M6P6XaxNe2THMJmQmGQ=; b=hlo4l+sPQZe3QdmkeWFvt0WaxceMfc/VB0W6eqpCSAH5syLMWLFReJ4rKPO9g2tx6XaFBPeiKCzqczq3lvtPGpXTEZ/OFRom2po5/kteyk9DAIvdGhsAQ8jWSy3+uzVOELACc2YLiq4ANSDN+DhH23mbWVMvkaaExspF40T+tb/JSQ6asstNyVNjxnb8Otd8hEjdABeJyBPgw6nxY08Bd+OMgH2dHajz/q76yFe+d0JlCnJkCYjdJFHZwhemw9LGGC5CaiIvU2m6IXYxLDGX8GgV502kR3wVBVJdJJDqAjy3bbvXn9/bJY5g80nJkO3+G8KOGS3raEOnDU+WYTiC+g== Received: from DM6PR07CA0096.namprd07.prod.outlook.com (2603:10b6:5:337::29) by CO6PR12MB5410.namprd12.prod.outlook.com (2603:10b6:5:35b::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.23; Sun, 31 Dec 2023 09:30:42 +0000 Received: from DS1PEPF0001709A.namprd05.prod.outlook.com (2603:10b6:5:337:cafe::b2) by DM6PR07CA0096.outlook.office365.com (2603:10b6:5:337::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.20 via Frontend Transport; Sun, 31 Dec 2023 09:30:42 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by DS1PEPF0001709A.mail.protection.outlook.com (10.167.18.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.9 via Frontend Transport; Sun, 31 Dec 2023 09:30:42 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Sun, 31 Dec 2023 01:30:27 -0800 Received: from rnnvmail205.nvidia.com (10.129.68.10) by rnnvmail203.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Sun, 31 Dec 2023 01:30:27 -0800 Received: from vdi.nvidia.com (10.127.8.9) by mail.nvidia.com (10.129.68.10) with Microsoft SMTP Server id 15.2.986.41 via Frontend Transport; Sun, 31 Dec 2023 01:30:25 -0800 From: Avihai Horon To: CC: Juan Quintela , Peter Xu , "Fabiano Rosas" , Leonardo Bras , Li Zhijian , Avihai Horon Subject: [PATCH 03/11] migration: Refactor migration_incoming_setup() Date: Sun, 31 Dec 2023 11:30:08 +0200 Message-ID: <20231231093016.14204-4-avihaih@nvidia.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20231231093016.14204-1-avihaih@nvidia.com> References: <20231231093016.14204-1-avihaih@nvidia.com> MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF0001709A:EE_|CO6PR12MB5410:EE_ X-MS-Office365-Filtering-Correlation-Id: 37ba47dd-d84d-4030-aa87-08dc09e32884 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nV61aqYo8QvlAVMDyexGVfOANAq2bvJ9TPxGLdCdDXUKA79u2hH1Qka1UXoHCVkHFRrf5/NQ5vTrddylfn0oBRB6Znwk8lZ/vqvG73zd0pMrqCCoV2w0XxTOg5wje2iP1kwEZl/zQPKuVscsgAX5/mDEPN135EIAPxIXC1cMsJJ80FTj9xaFFxcKam5h3pUIOkkDaKf6Pu27BhJxKZIDZ5S9c9HH7PsSfc0zxyAv5q8wPzlh1xHzKXjGLsWA7Nk/JkQzz+pN8vX6gg6gNoljq03EV32X/eGpbC7lI6ZtDxo88qm2NqU8Q05xzfHrpa2dhFfI7fr+DlP0JHpXyDPas0meKBZDt4/9xrn/opFOh5FANESHclmj2nWaK6tF85rAOBz7ttUnXtsZdBXOEOhOTECPI07iFcga9VH9ZpIsdtAb3uMRKgYGHqGfHnhGu80F2jWiYdU/HpT+cCcGXCH9yqvKPotnoM+TiSw2hHqUlEuPmwmMXnrCiQ7nQWcjtdfaSwUHVbKqF/tE6W9oMe12kPbsYJjbpFZTAwXR+xE1fh+JNVQp6gtAYGsUMRyf+8w6ItG5yhIcaIoXEDngY0lrXbSxvOBI0nfFToKOLjN5soIZElvu328WKVwIblQ8VX9xQr3SqW+25he9WyK9b/7131cBEkBnPkFY9+FLtdTNffo46ss6kJHtMiA/W2c/5QMtSLF+qlcoXo+D6JqqkUrY7t0lc32ouDEbp7xg5L1ke4OoZUhUnCFbkAsjqJ10vkpZ X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230031)(4636009)(346002)(376002)(396003)(136003)(39860400002)(230922051799003)(1800799012)(186009)(82310400011)(64100799003)(451199024)(40470700004)(46966006)(36840700001)(7636003)(356005)(82740400003)(36756003)(40460700003)(40480700001)(86362001)(336012)(107886003)(26005)(426003)(1076003)(2616005)(7696005)(6666004)(47076005)(54906003)(4326008)(478600001)(8676002)(316002)(8936002)(36860700001)(6916009)(70586007)(70206006)(83380400001)(41300700001)(5660300002)(2906002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Dec 2023 09:30:42.0370 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 37ba47dd-d84d-4030-aa87-08dc09e32884 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DS1PEPF0001709A.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR12MB5410 Received-SPF: softfail client-ip=2a01:111:f403:2412::601; envelope-from=avihaih@nvidia.com; helo=NAM10-MW2-obe.outbound.protection.outlook.com X-Spam_score_int: -47 X-Spam_score: -4.8 X-Spam_bar: ---- X-Spam_report: (-4.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-2.667, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Commit 6720c2b32725 ("migration: check magic value for deciding the mapping of channels") extracted the only code that could fail in migration_incoming_setup(). Now migration_incoming_setup() can't fail, so refactor it to return void and remove errp parameter. Signed-off-by: Avihai Horon Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Fabiano Rosas --- migration/migration.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index 1e25d7966f..55d77572d8 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -724,11 +724,8 @@ fail: /** * migration_incoming_setup: Setup incoming migration * @f: file for main migration channel - * @errp: where to put errors - * - * Returns: %true on success, %false on error. */ -static bool migration_incoming_setup(QEMUFile *f, Error **errp) +static void migration_incoming_setup(QEMUFile *f) { MigrationIncomingState *mis = migration_incoming_get_current(); @@ -736,7 +733,6 @@ static bool migration_incoming_setup(QEMUFile *f, Error **errp) mis->from_src_file = f; } qemu_file_set_blocking(f, false); - return true; } void migration_incoming_process(void) @@ -780,9 +776,7 @@ static bool postcopy_try_recover(void) void migration_fd_process_incoming(QEMUFile *f, Error **errp) { - if (!migration_incoming_setup(f, errp)) { - return; - } + migration_incoming_setup(f); if (postcopy_try_recover()) { return; } @@ -855,10 +849,7 @@ void migration_ioc_process_incoming(QIOChannel *ioc, Error **errp) if (default_channel) { f = qemu_file_new_input(ioc); - - if (!migration_incoming_setup(f, errp)) { - return; - } + migration_incoming_setup(f); } else { /* Multiple connections */ assert(migration_needs_multiple_sockets()); From patchwork Sun Dec 31 09:30:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avihai Horon X-Patchwork-Id: 13507165 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3A0DCC3DA6E for ; Sun, 31 Dec 2023 09:32:16 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rJs9n-0002En-Pz; Sun, 31 Dec 2023 04:30:55 -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 1rJs9i-0002D2-42 for qemu-devel@nongnu.org; Sun, 31 Dec 2023 04:30:50 -0500 Received: from mail-dm6nam11on20631.outbound.protection.outlook.com ([2a01:111:f400:7eaa::631] helo=NAM11-DM6-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rJs9e-0008LD-BQ for qemu-devel@nongnu.org; Sun, 31 Dec 2023 04:30:49 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CynSgTZ5BclloEealOsTV1vWAI3I4/OAA12DrxEFE6Ay4weQxff+o5Mjz1TMLwcufhfXxmqq7rhweWnYyJEWSxiSpttmwt5Av34wRrfwtwMSbV0783Jhfz1lMjr9nC6duiQL+f1chcIGDM8U/T5dczEcrdK+WRIiG6YdN8lKQ8h5JlXtyMu7mWfGyibCp+xj91AIK1A8QH2I0gFqIAIC3oZ/nvOE4DmIPZEq1hcVCOuxYPtHC4xvPLSkpIQeBTCj6ocIGSGo3CUXzII/9wLb8BXGabCQlOtjbuISIYEoDp28+ws8SpzgRgIdmxqXOH6s1rxF8w9g+jCLAK8ZK7AqlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=bTyLSZjwwhllyNwTgz19z0yMCTy1QGMjAmj7aEhcEqI=; b=gIXmGX/wZTm0mJdcpBpOc0hDtoYEXtUWPTwl3INMsKYRK1Xl/VC55bGoj6Utyevc+RHpEvrVwL1MXpo/QL/5GNXBI/q0c075XG6U7kq+UEoV/J9b5V6f/eoV5ajAUwsunvS+56ow5DxttQCbx4I1okasKZQmgJBuqWp995AtwJxoytbo8Yk2GvKNUEQezoTGnkTCg6fXUaLK4CMYSvELuPJwiOPZbzBss+aJFRV5FPQxsQF3olW+JKoNem5uuyZ/LebbZC1k3CGR8B9ezSXrSREns6QzJWpA61RuBxXK7SSF71uAlATpiz/5w2o5Aq23WKXGmopDil4I2kHg7YUgPA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=nongnu.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bTyLSZjwwhllyNwTgz19z0yMCTy1QGMjAmj7aEhcEqI=; b=rHGNADbGQ7T0GruljnSbYesmNCUyQ8MEyaFeh7Wu+PYA0p4Qr+P89HRaxUpvzBvvA0ciosalyH30KZs0YSpdLfoZeYGwEDo13fNKxH/kCY4Bumhs84b/z7D8WI+7CpM2jXtLPIVde7coNjGlZSHoMUdO+HBAUQIZWkHOdefj/Yp9mWTDpXqfQEZBvqVOaqppmk3CthL44AKFycvU26lesqQU7SGoMdHsgerZ3IlLav3fNRTT44FzUIq3U1eH8MpAUEPeHiEDx2v2E48bbrMymEZZftRqtF4/+W4JXgJNbM1Eop09QpGlDfJQ+YFJQ0rEIXhp/pVy0ZtFPJmcwArEFw== Received: from CYZPR19CA0015.namprd19.prod.outlook.com (2603:10b6:930:8e::11) by PH8PR12MB6867.namprd12.prod.outlook.com (2603:10b6:510:1ca::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.24; Sun, 31 Dec 2023 09:30:41 +0000 Received: from CY4PEPF0000FCC3.namprd03.prod.outlook.com (2603:10b6:930:8e:cafe::75) by CYZPR19CA0015.outlook.office365.com (2603:10b6:930:8e::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.22 via Frontend Transport; Sun, 31 Dec 2023 09:30:40 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CY4PEPF0000FCC3.mail.protection.outlook.com (10.167.242.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.9 via Frontend Transport; Sun, 31 Dec 2023 09:30:40 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Sun, 31 Dec 2023 01:30:30 -0800 Received: from rnnvmail205.nvidia.com (10.129.68.10) by rnnvmail203.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Sun, 31 Dec 2023 01:30:29 -0800 Received: from vdi.nvidia.com (10.127.8.9) by mail.nvidia.com (10.129.68.10) with Microsoft SMTP Server id 15.2.986.41 via Frontend Transport; Sun, 31 Dec 2023 01:30:27 -0800 From: Avihai Horon To: CC: Juan Quintela , Peter Xu , "Fabiano Rosas" , Leonardo Bras , Li Zhijian , Avihai Horon Subject: [PATCH 04/11] migration: Remove errp parameter in migration_fd_process_incoming() Date: Sun, 31 Dec 2023 11:30:09 +0200 Message-ID: <20231231093016.14204-5-avihaih@nvidia.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20231231093016.14204-1-avihaih@nvidia.com> References: <20231231093016.14204-1-avihaih@nvidia.com> MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000FCC3:EE_|PH8PR12MB6867:EE_ X-MS-Office365-Filtering-Correlation-Id: 42edb425-98ed-409e-6e53-08dc09e327c6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OB/4/9Tjt+ZJ1DlZjkRGXL4Zef9NZyLS1ivTAYZ7tMop17UUfY+dOJeUc6oShb8AUMkZcbED24Y+jSxCGcm65pT809a/t4zTHHvJkTpgFuBwg6ZyF/ssPI5ZXgDhXHTONZS5EHNUGBvfbJVv6bzlDLyiXPCntmZNskDwak/qozMFXWffCb1VXHJtl5ilQg8OkCnz9Ye9i+Nv8zzCGRuX/l8l3vF1lZE0rw+Z/O1yh7jevLxd/uAWb9n5sjGEcqNftHdta9pYxg8Nj1g9ctjaH2yuu3d69fLPIL7c6k0JeeHDSXA/xX/nk1ZkQM6etI+ZRQRllNq0KbKaJ9Dd2lxTXetw1BALaNQpV/b2ZDwMQrhj5h10lrKtnkeHZ9x9e8ghOT+x6vc007ssMNO8OZAVZRZPcNadsuJsE5auc3kn1QBnHiHaydllvIjuqvvpptLae/6Dh0OddEZAWYTLSkRV5yrJL8WhYSwROAYXmp6KUKoQ1zmNjgn6Jr0kIb/d7D8tie6ikHmxJaX8GOGd5iC8OUyBSZmHYMgwQOQg0JxNu7gf3EuLYvqHIvq799IPZSacgHcqe9h4/P/f2DlTgU/qXcg9pUuQ6g50Hoak3gwdukCgg/GGnjSaKAaxhPGWB0Say1y5nska9Sfl4+Vok3PhRRcNgecPGtAzwX5vf3i6aVoaU2PAFNSz+yc1xuuidYRIhlCKYxUvPdN41kLQ6pekBSi7rAWm9ci6ywYLcJffh/XGXIjEpgugVRS8FhgGwCKt X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230031)(4636009)(346002)(376002)(396003)(136003)(39860400002)(230922051799003)(1800799012)(186009)(82310400011)(64100799003)(451199024)(40470700004)(46966006)(36840700001)(7636003)(356005)(82740400003)(36756003)(40460700003)(40480700001)(86362001)(336012)(107886003)(26005)(426003)(1076003)(2616005)(7696005)(6666004)(47076005)(54906003)(4326008)(478600001)(8676002)(316002)(8936002)(36860700001)(6916009)(70586007)(70206006)(83380400001)(41300700001)(5660300002)(2906002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Dec 2023 09:30:40.8216 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 42edb425-98ed-409e-6e53-08dc09e327c6 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000FCC3.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR12MB6867 Received-SPF: softfail client-ip=2a01:111:f400:7eaa::631; envelope-from=avihaih@nvidia.com; helo=NAM11-DM6-obe.outbound.protection.outlook.com X-Spam_score_int: -47 X-Spam_score: -4.8 X-Spam_bar: ---- X-Spam_report: (-4.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-2.667, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Errp parameter in migration_fd_process_incoming() is unused. Remove it. Signed-off-by: Avihai Horon Reviewed-by: Fabiano Rosas --- migration/migration.h | 2 +- migration/migration.c | 2 +- migration/rdma.c | 6 +----- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/migration/migration.h b/migration/migration.h index b3c9288c38..17972dac34 100644 --- a/migration/migration.h +++ b/migration/migration.h @@ -474,7 +474,7 @@ struct MigrationState { void migrate_set_state(int *state, int old_state, int new_state); -void migration_fd_process_incoming(QEMUFile *f, Error **errp); +void migration_fd_process_incoming(QEMUFile *f); void migration_ioc_process_incoming(QIOChannel *ioc, Error **errp); void migration_incoming_process(void); diff --git a/migration/migration.c b/migration/migration.c index 55d77572d8..732e3dadd9 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -774,7 +774,7 @@ static bool postcopy_try_recover(void) return false; } -void migration_fd_process_incoming(QEMUFile *f, Error **errp) +void migration_fd_process_incoming(QEMUFile *f) { migration_incoming_setup(f); if (postcopy_try_recover()) { diff --git a/migration/rdma.c b/migration/rdma.c index 04debab5d9..94c0f871f0 100644 --- a/migration/rdma.c +++ b/migration/rdma.c @@ -4035,7 +4035,6 @@ static void rdma_accept_incoming_migration(void *opaque) { RDMAContext *rdma = opaque; QEMUFile *f; - Error *local_err = NULL; trace_qemu_rdma_accept_incoming_migration(); if (qemu_rdma_accept(rdma) < 0) { @@ -4057,10 +4056,7 @@ static void rdma_accept_incoming_migration(void *opaque) } rdma->migration_started_on_destination = 1; - migration_fd_process_incoming(f, &local_err); - if (local_err) { - error_reportf_err(local_err, "RDMA ERROR:"); - } + migration_fd_process_incoming(f); } void rdma_start_incoming_migration(InetSocketAddress *host_port, From patchwork Sun Dec 31 09:30:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avihai Horon X-Patchwork-Id: 13507171 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7AE52C4707B for ; Sun, 31 Dec 2023 09:32:42 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rJs9s-0002Er-37; Sun, 31 Dec 2023 04:31:00 -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 1rJs9j-0002DE-LP for qemu-devel@nongnu.org; Sun, 31 Dec 2023 04:30:53 -0500 Received: from mail-mw2nam10on20601.outbound.protection.outlook.com ([2a01:111:f403:2412::601] helo=NAM10-MW2-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rJs9i-0008Lb-8I for qemu-devel@nongnu.org; Sun, 31 Dec 2023 04:30:51 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DkEM9aZ9yvLLFAf2wMvP76MGvCp2T2AlpNlnuATVfXONgSrsVyB3HL46L9V2D+xc0CKK9JRt6lUWe7EvUUxi9LpsVotX98WI1MZv9ttD30OYAIze9ZKjFELaJLVzYden00eNNbCYbALg/KpXg1YtVQsQDqJ8TnQ4E4/G5EjRrksit3sssBWEEEftRNDOKNwBtDed4yqWMsSboSvjXiJvtLBAOfGFYbCcoUZ6oHLA6A6L3VvVE6o0Rp9tiIB+azwvoevmX8PgLN/EByVp4Gxt3YXixiZvMOe6bUuEm5253sEKXBPChwsja03JRaCrhGAU9PTPfaBfpSnndh5GBTbztQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=E42zdn25+nfLIPeNKPO2eTdbrr9Fh7hBrlg3JnGglJ4=; b=NJ49noLectGmGqPDJAodEl656hazxknx7To+GcFTQW1tz0gM2mlWZqc0ZHzV/nkiqvPuTXBU9gD345oqgOu5IOZZcsrBX1SY4zrjjEfyZmth0DSAMJ1M1+Y5qehouRX7j3ZDLge8SJEfx2xspyLPc+Yt6gF/ANQDVZXnM0YSO+BQZXBLIorKgZeqJCka2+wr8bQ3qeBMMiKKNPGiElHzo3zvx7POdsIx4Cj6r5MhWyY3KLIesQy26fLwrutRQlRQOrEzcX9SQgEGU/2jzMCMpZid77y8+N+fponW+W1SkzdaRUGjs4yXRze7QU7QKulCvvYyB8YU17vleEQAS6Rtnw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=nongnu.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=E42zdn25+nfLIPeNKPO2eTdbrr9Fh7hBrlg3JnGglJ4=; b=j8vZWLIrZhLOnEJmjc24FkE3IEMEGh8nxT1yMNCYWbFINv4Z2i2x28f8/qpltXocdf7/OuN5Cg6VDE1R92I+4B85WrCqWJBkBNNVhPf+W0WfT8bPOYthBwHsG74PFl+Q/H1LWbow+j8uIr/ejKIFMV2XjMv/kn4Ybnk+2d2dn5bgBtIZJEDT5+3kpCreS1QyfhpabfN3zk/mDTS4RmiyzEFW2XHEAKMu/mgoBGfzRA0sSil/CQXZm/71DtQhkzbJeQgcKhrZslwrw9jBmFtMPvIeIca1ymz8JbCEW38irEEZKELJgN2LdEd3HQcRUlCRaXOH/LOt2qeZaX6F0np2vA== Received: from DS7PR03CA0072.namprd03.prod.outlook.com (2603:10b6:5:3bb::17) by DM4PR12MB5295.namprd12.prod.outlook.com (2603:10b6:5:39f::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.23; Sun, 31 Dec 2023 09:30:46 +0000 Received: from CY4PEPF0000FCBF.namprd03.prod.outlook.com (2603:10b6:5:3bb:cafe::d2) by DS7PR03CA0072.outlook.office365.com (2603:10b6:5:3bb::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.20 via Frontend Transport; Sun, 31 Dec 2023 09:30:46 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CY4PEPF0000FCBF.mail.protection.outlook.com (10.167.242.101) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.9 via Frontend Transport; Sun, 31 Dec 2023 09:30:46 +0000 Received: from rnnvmail205.nvidia.com (10.129.68.10) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Sun, 31 Dec 2023 01:30:32 -0800 Received: from rnnvmail205.nvidia.com (10.129.68.10) by rnnvmail205.nvidia.com (10.129.68.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Sun, 31 Dec 2023 01:30:32 -0800 Received: from vdi.nvidia.com (10.127.8.9) by mail.nvidia.com (10.129.68.10) with Microsoft SMTP Server id 15.2.986.41 via Frontend Transport; Sun, 31 Dec 2023 01:30:30 -0800 From: Avihai Horon To: CC: Juan Quintela , Peter Xu , "Fabiano Rosas" , Leonardo Bras , Li Zhijian , Avihai Horon Subject: [PATCH 05/11] migration/multifd: Fix error message in multifd_recv_initial_packet() Date: Sun, 31 Dec 2023 11:30:10 +0200 Message-ID: <20231231093016.14204-6-avihaih@nvidia.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20231231093016.14204-1-avihaih@nvidia.com> References: <20231231093016.14204-1-avihaih@nvidia.com> MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000FCBF:EE_|DM4PR12MB5295:EE_ X-MS-Office365-Filtering-Correlation-Id: 42dbc632-e294-4109-0104-08dc09e32ae6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: grmkKLvCSpswyhtL0MFzA0HQIMET329CwzAFeRlncREQDhLaBXIFmC+Sp7V1vDqx2vC4vHPg/5+Ljpx1tfLrcrXTg6iYMi1AwqS6TKBZuxFpacEGTxCcCFmlGQsynUlGeL8GCSeEcHLe1hxkhYgdpvoSzzAClokNzpBgVgx0YNJYBHB7+c9uKrssTdwCBZ/ciSIFmgcEr8OT7Q/UyscUX1JelAecBFqYrZj+ISxN6un8wLlVNpIPjpQ/V2YqNrB8nsra0RA6dTniW4qVAdJ8BJiFaU5sF8xuJwglQH0ls6cOpMbSezeAN40xb4qCw+hSzgbubi0IuTkhHeo2yLhILO19E+fXQhsmu2VHq3tE4fmRHVWttRxV9EuzeTg7ySqRegYgOO91rvJKcMlBBXs2ilx8bHAWW0tmGnamcOcBmVg530f2vlG249NYBvuj7qiYrfLjOJXNAIKOkweyGaV9PP+zWe4btxL5/gkVVaP1C2faIPWAb/G9+X0gStREf0DV4S657r5kjosyvOyH0ONq0F07aOoZeanGVUCJFyQ5Q85A4nBMz9bJURgNmUe0qSzhLp9svWxFljH2fxbvD2hGp20+X7d5wJvZ0uOVggqvlc82Bdy90LKuWi6hZtA7SMFjO7PKyhZfxmTOiruKP7aEYP6pu2HZbFHxGU56QPlfQcBBLW3XLn9j+oeltmIJiOrs2ZIKOB/L37p65rDQg4C42m4E0j0iQhqY/meVvoU8mcftoPlPuIKfGAOnl7kqAEvb X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230031)(4636009)(396003)(376002)(346002)(39860400002)(136003)(230922051799003)(1800799012)(451199024)(64100799003)(186009)(82310400011)(36840700001)(46966006)(40470700004)(336012)(426003)(107886003)(26005)(83380400001)(1076003)(2616005)(6666004)(7696005)(36860700001)(47076005)(15650500001)(5660300002)(4326008)(4744005)(41300700001)(2906002)(478600001)(316002)(8676002)(8936002)(54906003)(70586007)(70206006)(6916009)(86362001)(36756003)(7636003)(356005)(82740400003)(40480700001)(40460700003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Dec 2023 09:30:46.0616 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 42dbc632-e294-4109-0104-08dc09e32ae6 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000FCBF.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5295 Received-SPF: softfail client-ip=2a01:111:f403:2412::601; envelope-from=avihaih@nvidia.com; helo=NAM10-MW2-obe.outbound.protection.outlook.com X-Spam_score_int: -47 X-Spam_score: -4.8 X-Spam_bar: ---- X-Spam_report: (-4.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-2.667, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org In multifd_recv_initial_packet(), if MultiFDInit_t->id is greater than the configured number of multifd channels, an irrelevant error message about multifd version is printed. Change the error message to a relevant one about the channel id. Signed-off-by: Avihai Horon Reviewed-by: Fabiano Rosas --- migration/multifd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/migration/multifd.c b/migration/multifd.c index 409460684f..a6204fc72f 100644 --- a/migration/multifd.c +++ b/migration/multifd.c @@ -228,8 +228,8 @@ static int multifd_recv_initial_packet(QIOChannel *c, Error **errp) } if (msg.id > migrate_multifd_channels()) { - error_setg(errp, "multifd: received channel version %u " - "expected %u", msg.version, MULTIFD_VERSION); + error_setg(errp, "multifd: received channel id %u is greater than " + "number of channels %u", msg.id, migrate_multifd_channels()); return -1; } From patchwork Sun Dec 31 09:30:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Avihai Horon X-Patchwork-Id: 13507162 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 22000C3DA6E for ; Sun, 31 Dec 2023 09:31:59 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rJs9t-0002Hp-A8; Sun, 31 Dec 2023 04:31:01 -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 1rJs9s-0002F9-3g for qemu-devel@nongnu.org; Sun, 31 Dec 2023 04:31:00 -0500 Received: from mail-mw2nam04on20607.outbound.protection.outlook.com ([2a01:111:f400:7e8c::607] helo=NAM04-MW2-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rJs9q-0008MQ-33 for qemu-devel@nongnu.org; Sun, 31 Dec 2023 04:30:59 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OUS/C27bbT1/JGgpvGtmqT3DuvcAnR48Fx1sGZDX0eoa/j5iCZeLFCW5eRjJkhP7YMxhaPnAAY2KSxv/vZSWuItWDZfbXQuXk/86F9bN0RzzGMUuiYeWEdSyTLQ6hJauCr0DTxRZfVaZ3dMv5FGi7j1uzECKaecuOTtjXFEQn7qR71yRUvUutpl5qkg5YUmFy2QLIF/nk7XErKPWjvjqnaJ3YFNdKv8lUd+8ZOZYHnBOVzoFv5GYlUJDELATAgxrcPKUv6kS0AxF8kFcycjvqyxrXXA7uafDLQ95jo+FiC4o67/9Pl6LPvpUf69d7QfihDLMzWupKC4RvuXnIjR+qA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=C7bw+w3VI+IUjmhnR3XMJ/dv+Ndf5bfY8a4eE0di+rk=; b=SBCzeKC138OQTbz4574krOqtPPb8tbD0jw1VevKl4rFnHS3LRWXIftx9dvRn4Ecoy83JsxTswZbpNmawzVbran5wm9DvTGrAfXDyd2CLJdpcxNUDQa3C9foAijbQcDPIvlwMCwIiVj97G9xQq9YHeWBxfi2Bc9KIxO6By7Z/iDMoXFoYgjHPnr897JGIUE/sTIcWtkGX478C/VwtWU2NdcIMO3gB15suoyw1kbgdeLZXztgHg1QSWhb9Pq9rHb/wAvmLzybCFTXt11jLt05KJRvMUxMR02uhAQ3EkcdgVRrej7k7ubHVX1EdD0sjU1Q/pi6fTOmEwOFxbfTGsMeLyA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=nongnu.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=C7bw+w3VI+IUjmhnR3XMJ/dv+Ndf5bfY8a4eE0di+rk=; b=QPYlrdmQoPLD+RC59I7GGK+TjiFn7M8kNQNMpdejUJLIYc7mYJw0/jijw4J6t7qMVz+Ia+q2kHxuKl0uMANIt1IPuf3LAkN2y3Uui5TjNjY8q7SIDX8mkVkSnQekCngbZwrSPc4slH5ir+PQKpsTAxuvOPwMlsCpjPgRGaFh6MrtlQxy2SgtCOzhIeT6Z9Ip9IXLIivrFL8EpEoYoE2qsYWUnmcc2OgJkWIaIR0RyZ0eJqxBAz8UBgsvwJEi6GlsfFWaNFTE3QPKROeST8I8BIF2bqtjAGhqCd6R/ONERWjqEQj8miLrrfa2GO/ISPsqzhkF6Pw635FOqtoFHpezxA== Received: from DM6PR07CA0095.namprd07.prod.outlook.com (2603:10b6:5:337::28) by PH7PR12MB6659.namprd12.prod.outlook.com (2603:10b6:510:210::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.21; Sun, 31 Dec 2023 09:30:51 +0000 Received: from DS1PEPF0001709A.namprd05.prod.outlook.com (2603:10b6:5:337:cafe::b5) by DM6PR07CA0095.outlook.office365.com (2603:10b6:5:337::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.20 via Frontend Transport; Sun, 31 Dec 2023 09:30:50 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by DS1PEPF0001709A.mail.protection.outlook.com (10.167.18.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.9 via Frontend Transport; Sun, 31 Dec 2023 09:30:50 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Sun, 31 Dec 2023 01:30:35 -0800 Received: from rnnvmail205.nvidia.com (10.129.68.10) by rnnvmail203.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Sun, 31 Dec 2023 01:30:35 -0800 Received: from vdi.nvidia.com (10.127.8.9) by mail.nvidia.com (10.129.68.10) with Microsoft SMTP Server id 15.2.986.41 via Frontend Transport; Sun, 31 Dec 2023 01:30:33 -0800 From: Avihai Horon To: CC: Juan Quintela , Peter Xu , "Fabiano Rosas" , Leonardo Bras , Li Zhijian , Avihai Horon Subject: [PATCH 06/11] migration/multifd: Simplify multifd_channel_connect() if else statement Date: Sun, 31 Dec 2023 11:30:11 +0200 Message-ID: <20231231093016.14204-7-avihaih@nvidia.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20231231093016.14204-1-avihaih@nvidia.com> References: <20231231093016.14204-1-avihaih@nvidia.com> MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF0001709A:EE_|PH7PR12MB6659:EE_ X-MS-Office365-Filtering-Correlation-Id: 49dc058b-01eb-468f-f4aa-08dc09e32dc2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Uk/o5tF/8ur2rLIugkjW8HH62RBZec6jlg4j++hzuC+9sVpkv3fIEL9XMF7WDr3+ZF1bRHE0y3U77aqxqHmVTfNSO46CtIF6TcOSrKRODyfMV9EvT6nLEcLHi9QasrE818+GMfHORiLmhs7q1o/9s3NEwvDUDwbKsblVwigSZghBACsIVEGEVEnur2bl/a9VOWwQRNavuNza2bVAhqpEgFp36bygov3T1BKqSgvSnInJJfwC7P/ul1XH/YBDZiX31hEm+dxj6v9NzBwzSewkNKqOsKGrNMddhdV4d35QrCh5D/sv5e74PNej8J4m40g/kr17kPJynAOEYOlCS/od0oBxVZzJqUR10r3qb41GVjWeNCqP1l1FU8pRXnMwt3kk8wJLiwSukZNK2h3WqyEro65kvozWJpEVV/kgF+saAxKtmUlB9wOF7Flv2NUmSXQs+Y0RckTGVgPP+B7g7btSZSO9RaC7GLI1NyVz+Ms/La4dU//eYQUhWpfnb8VD8URKOo5VVlHaS1HR0wQrJK19Eo/8lE0pnpzmUavUBprVJ/53p2Omc7OeZKZBtzRHY8adynsDu2w4MqujV6nsY9jvGOihOzpM6WacsDFHOByjkLLcAEafnrhKN8/39LIO72evtRSeFyVyWw3JZtcFEqvTjkNyYFhDimbUrJChcnwYQfuNzUeUr81pxHhiDwfB5NCSJ7y3c/1sg1RBd/MxTfM1jPH3Lbn/xac6+rgYeSPrV/GUzrYE43qeYACqDabGnMH8 X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230031)(4636009)(346002)(39860400002)(396003)(376002)(136003)(230922051799003)(1800799012)(186009)(82310400011)(451199024)(64100799003)(36840700001)(40470700004)(46966006)(7696005)(54906003)(6916009)(356005)(40480700001)(7636003)(6666004)(70586007)(70206006)(40460700003)(316002)(478600001)(8676002)(8936002)(5660300002)(4326008)(107886003)(82740400003)(36860700001)(86362001)(2616005)(83380400001)(36756003)(47076005)(336012)(426003)(26005)(1076003)(2906002)(41300700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Dec 2023 09:30:50.8182 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 49dc058b-01eb-468f-f4aa-08dc09e32dc2 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DS1PEPF0001709A.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6659 Received-SPF: softfail client-ip=2a01:111:f400:7e8c::607; envelope-from=avihaih@nvidia.com; helo=NAM04-MW2-obe.outbound.protection.outlook.com X-Spam_score_int: -47 X-Spam_score: -4.8 X-Spam_bar: ---- X-Spam_report: (-4.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-2.667, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org The else branch in multifd_channel_connect() is redundant because when the if branch is taken the function returns. Simplify the code by removing the else branch. Signed-off-by: Avihai Horon Reviewed-by: Philippe Mathieu-Daudé --- migration/multifd.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/migration/multifd.c b/migration/multifd.c index a6204fc72f..55d5fd55f8 100644 --- a/migration/multifd.c +++ b/migration/multifd.c @@ -847,14 +847,13 @@ static bool multifd_channel_connect(MultiFDSendParams *p, * so we mustn't call multifd_send_thread until then */ return multifd_tls_channel_connect(p, ioc, errp); - - } else { - migration_ioc_register_yank(ioc); - p->registered_yank = true; - p->c = ioc; - qemu_thread_create(&p->thread, p->name, multifd_send_thread, p, - QEMU_THREAD_JOINABLE); } + + migration_ioc_register_yank(ioc); + p->registered_yank = true; + p->c = ioc; + qemu_thread_create(&p->thread, p->name, multifd_send_thread, p, + QEMU_THREAD_JOINABLE); return true; } From patchwork Sun Dec 31 09:30:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avihai Horon X-Patchwork-Id: 13507166 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DB7C8C3DA6E for ; Sun, 31 Dec 2023 09:32:30 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rJs9w-0002Is-1L; Sun, 31 Dec 2023 04:31:04 -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 1rJs9t-0002Hs-Az for qemu-devel@nongnu.org; Sun, 31 Dec 2023 04:31:01 -0500 Received: from mail-mw2nam10on20601.outbound.protection.outlook.com ([2a01:111:f403:2412::601] helo=NAM10-MW2-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rJs9r-0008MX-TJ for qemu-devel@nongnu.org; Sun, 31 Dec 2023 04:31:01 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dTeZTriNMssuuNRZtCPcgnTEmLUeoxAQY9MqZDObdmAcEgYlhFrdgXAiGzhaGQel5Hr37Nj2TEMn2CFqp4n00Q7fnPONuEFpIC7+Gmd+HaNqEOCtLllYhxUOe09+MCPEBhulsQayMYfI8AIq4Vo+mVuseDv0c651dJ04w3qjBGOmUGRITfv7t4S10tC4+W+KZKUYgltswcyKoCYDvrbBCZ6f1ji89bsv8JoWthnFw42u0HfKBq+GlkbpGxXGJmmzvVvBsNsFco9hd4232VnODNp6kO8+6aN5wecw6g/+r4xgpwV/PzYCqFqLkh39C2MMw+zb6ivXEEN6LiVr6gN3iQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=IhmNg25SQ2zKpGEDKbEY4cfEtXiZ/4UMe/FxWEJOd64=; b=RjGzbNVrjezepKngTTCN7iUXqfq3O/3crTti0qyLM13XvvN8wszsj+LJLfwrKrViF4LZNe3smQcxe+uTFx2AOP4HAUC7g1TflYK4w3qzCaMAmCKmq+Go9wTnuWF+IXyZP7Al8ClMsxknkkFMzKMP9betxBwO4Apx7VWEa3bJpapP7K1snBde6skyvUBMSx9huJH8z9DZu60s5Q717SLLeLsu/uVSju6qROjX2ykf0DTTTcYvwHAifC8zMjsuWBLtG0QdbNtGjebdawBtDMdc0KQZY/0EYAcMK9/4saWROMb3pciyyNsbuBlFDVZYRhftsDvBqw8DcbvWS0mgPOvB0Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=nongnu.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IhmNg25SQ2zKpGEDKbEY4cfEtXiZ/4UMe/FxWEJOd64=; b=gehMEdLhEyrdZcvwTsAnZLSohkzVlG456mIEOQMvVeFDps0eM1lNqSD1l9WWmqKkbAxwCm0vh4Mh6GahVuZKhfTOesVblWMT2wpxzSuF9ji8j2dybDWLDhHe1UTNJbveFS1WMTsQhq915UhN7+wMW9iZ8fuFj5ZAqwPj9dsiFwMGafSyJu6xSJ2Jt6LfX3K9IaoPHGdhjAp+KEn8p8FxOlI30E+HuwY9DS7Qw+CEekCIVJiQ+Pb2ljplg2ZWI9zOcyxZzal15HPp+8jjQmyM7plkVvQAY5SG9oO12F/xperNAahNgkIAgs2d+PalPZYW8vO+DwHVSbtqOk9VvsjxLw== Received: from DS7PR03CA0017.namprd03.prod.outlook.com (2603:10b6:5:3b8::22) by PH7PR12MB7940.namprd12.prod.outlook.com (2603:10b6:510:275::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.24; Sun, 31 Dec 2023 09:30:55 +0000 Received: from CY4PEPF0000FCC2.namprd03.prod.outlook.com (2603:10b6:5:3b8:cafe::a7) by DS7PR03CA0017.outlook.office365.com (2603:10b6:5:3b8::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.20 via Frontend Transport; Sun, 31 Dec 2023 09:30:53 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CY4PEPF0000FCC2.mail.protection.outlook.com (10.167.242.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.9 via Frontend Transport; Sun, 31 Dec 2023 09:30:52 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Sun, 31 Dec 2023 01:30:38 -0800 Received: from rnnvmail205.nvidia.com (10.129.68.10) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Sun, 31 Dec 2023 01:30:37 -0800 Received: from vdi.nvidia.com (10.127.8.9) by mail.nvidia.com (10.129.68.10) with Microsoft SMTP Server id 15.2.986.41 via Frontend Transport; Sun, 31 Dec 2023 01:30:35 -0800 From: Avihai Horon To: CC: Juan Quintela , Peter Xu , "Fabiano Rosas" , Leonardo Bras , Li Zhijian , Avihai Horon Subject: [PATCH 07/11] migration/multifd: Fix leaking of Error in TLS error flow Date: Sun, 31 Dec 2023 11:30:12 +0200 Message-ID: <20231231093016.14204-8-avihaih@nvidia.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20231231093016.14204-1-avihaih@nvidia.com> References: <20231231093016.14204-1-avihaih@nvidia.com> MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000FCC2:EE_|PH7PR12MB7940:EE_ X-MS-Office365-Filtering-Correlation-Id: 6ca1edbb-ce16-49b8-6074-08dc09e32ee9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hswXKpxilCk1gXqjVWVCwlsf4FfDikYWcqyTFOacDoz6CyWTOhq6ENzm5CxWMyD2yd3fyfHIvYaaHLghzKXw9457uWOaeL0RFq60Soz3rjy/NwNRNMLcAinQ8+bInEvBklv6j5j8cfPkeUkHgg1ZcjIZQYUtIe0uOlQQrMp5xi71tJA9EBXtLpIDUrNi07DkxaVBH0hkekxK5kTsPcULa7iXEvtgTY4qTEZmtkGtpVYlImhheGMB5viqxjh7P6egUBLMSadM23MsUwCZBtqgY0cd2yTi0fjMAGF3Mp8HedWejGMiD2TIs/GWRDOmYO5o1cFh6xCHadY8meTenqHuo8Cz74J2I+B7OHqIxfSkmrhwEEOqt0+2b8ustTCWLWDeFCxlzbLTgUvAF20XExa5G3mPTkVUvOJmBeh43GeN5vDiHu1P1mhWWwF4yOC+uf+Yx2rPEbivVYtvgWE9d5sejOD7NW9bvNznlQDkjgv9Fzgo8wiUAVWzgdN34+Sa4mP2gwzSxe3oYU2kMI+zEMMDOipz0GpAavxU89yA6FnmM4OfGMBfSboWlM3x2jlI2i/aORvw5OxXJTyaoAF2x3Mxi085P2kuHMXBcDa4zMUdwBl2fKLgWkM9yjPARn6vkVLJRM8HWZuSjxx7PA3BF3vVPkpiVKJU1spO3pMG0nx1Z5kMZMM4UHj4k8HeGRbwJ2gEB/GDyvQ0AnDzv9Ne4rUpz3C3JWZ5Kvx0jqbOEc/b7yBtJxdfSCDIrVCc2R18KqPU X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230031)(4636009)(136003)(346002)(39860400002)(396003)(376002)(230922051799003)(64100799003)(186009)(82310400011)(451199024)(1800799012)(40470700004)(46966006)(36840700001)(40480700001)(40460700003)(336012)(2616005)(107886003)(426003)(1076003)(26005)(86362001)(7636003)(36756003)(82740400003)(356005)(47076005)(4326008)(5660300002)(7696005)(6666004)(36860700001)(54906003)(8936002)(8676002)(70206006)(70586007)(316002)(6916009)(2906002)(41300700001)(478600001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Dec 2023 09:30:52.7946 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6ca1edbb-ce16-49b8-6074-08dc09e32ee9 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000FCC2.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB7940 Received-SPF: softfail client-ip=2a01:111:f403:2412::601; envelope-from=avihaih@nvidia.com; helo=NAM10-MW2-obe.outbound.protection.outlook.com X-Spam_score_int: -47 X-Spam_score: -4.8 X-Spam_bar: ---- X-Spam_report: (-4.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-2.667, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org If there is an error in multifd TLS handshake task, multifd_tls_outgoing_handshake() retrieves the error with qio_task_propagate_error() but never frees it. Fix it by freeing the obtained Error. In addition, the error is not reported at all, so report it with migrate_set_error(). Fixes: 29647140157a ("migration/tls: add support for multifd tls-handshake") Signed-off-by: Avihai Horon Reviewed-by: Fabiano Rosas --- migration/multifd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/migration/multifd.c b/migration/multifd.c index 55d5fd55f8..9ac24866ad 100644 --- a/migration/multifd.c +++ b/migration/multifd.c @@ -787,6 +787,7 @@ static void multifd_tls_outgoing_handshake(QIOTask *task, trace_multifd_tls_outgoing_handshake_error(ioc, error_get_pretty(err)); + migrate_set_error(migrate_get_current(), err); /* * Error happen, mark multifd_send_thread status as 'quit' although it * is not created, and then tell who pay attention to me. @@ -794,6 +795,7 @@ static void multifd_tls_outgoing_handshake(QIOTask *task, p->quit = true; qemu_sem_post(&multifd_send_state->channels_ready); qemu_sem_post(&p->sem_sync); + error_free(err); } static void *multifd_tls_handshake_thread(void *opaque) From patchwork Sun Dec 31 09:30:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avihai Horon X-Patchwork-Id: 13507164 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8C507C3DA6E for ; Sun, 31 Dec 2023 09:32:08 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rJs9y-0002Ju-6U; Sun, 31 Dec 2023 04:31:06 -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 1rJs9x-0002Jg-6h for qemu-devel@nongnu.org; Sun, 31 Dec 2023 04:31:05 -0500 Received: from mail-bn7nam10on20601.outbound.protection.outlook.com ([2a01:111:f403:2009::601] helo=NAM10-BN7-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rJs9v-0008Mo-GR for qemu-devel@nongnu.org; Sun, 31 Dec 2023 04:31:04 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d5lPePv0I2wKjHaNXWA5Qh5rMKPXHQq6YcAiUYEr0WEwCtagNG3OSTUY9ddBAV6ZosRKOV/Qrye7yT+oRd8dTxaMc4mbagQj9h6SDWRPxgLOKOMZnrwWQnLI43B/FxCOOnhhKz7UaYr3XdPCqMYVuoLVH6NZ7+ylxa24FZKFzWHhoLET21zXwyOMmM4W4/gQ1rj6zPtSI9wnbGtFFqGRC/PM3w5pnG/JUuiHIeUlK3fstCIK6jW/2FMd+sMZQCVlBdn/1SFUgCAkxt0dHODoJ/ZOtAlfxi/pXaDmRhCDaj5OmOc3JETlUpGzN2NwD+ztUJ+EUx3q6tmPH7LKprXT7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ZdDmB9KpRrH2AQ0tZ21aZr5lp2apV2SVGxjHqJcRA7o=; b=dfX4n6ID5xjkzkIYiscNtyMQM/2STDQrXBXJmoNzTL3A7NjrfSBqt1jKOCohJl93TVWxAlDp/Uul6jOShY8Zzr06G6wZaCFtpg7L/btwQHFj+yVJ5mHBHhdan3VbV4DBrJSlbeq0efud5ZQGtr0UuHji7XGpGm3YyvBVGEiBfDFhJJ4X6V71W75T0J33fEmIJwQyhlAm4bGlJ9my97vb5P5M9PbuO626MGSVGq1c0Cvx8iJP6IdMgahiobbaPq9WajmmSVJG8VYC9eOQ1QXAHYOu+4Lkpib/9RwkIfYUykABGdjsX0xxb5XAQnnp1M26XvIBWMVwc04Rgoe9HDfc4w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=nongnu.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZdDmB9KpRrH2AQ0tZ21aZr5lp2apV2SVGxjHqJcRA7o=; b=ft3FRvt5aD3LxdTkJI6rz/nNXt6VPTlR51ryPDE3rHMASnFxX4sGcv6n503p8ueiocJ/M2t1PBmJmBNGpEozIUyuogSSkrJTx9ozr39AnBgNXio2RDTlSkiw+xc+tG+Wz8PzU7aZme7XMpo5yNJlfb+kKKuv4Y/eFkQ/3TrCXEu1xAakXMZxa0SuZpLmQafVcGigvu3E500kU8CRFOlFgZmKCcvRgaBirHGfbakEc5p/ahK8zHONzdkkBUE7TDy8V2LhmwMCD52avtEMfXASGk5AfpOzJQNo5kWJDO+1RA2vmju9C38rT/KAff9+OpUV5hvPcwoWpa9o+SpkO7iyyA== Received: from DM6PR04CA0005.namprd04.prod.outlook.com (2603:10b6:5:334::10) by SN7PR12MB7420.namprd12.prod.outlook.com (2603:10b6:806:2a7::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.24; Sun, 31 Dec 2023 09:30:57 +0000 Received: from DS1PEPF00017098.namprd05.prod.outlook.com (2603:10b6:5:334:cafe::ad) by DM6PR04CA0005.outlook.office365.com (2603:10b6:5:334::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.21 via Frontend Transport; Sun, 31 Dec 2023 09:30:56 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by DS1PEPF00017098.mail.protection.outlook.com (10.167.18.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.9 via Frontend Transport; Sun, 31 Dec 2023 09:30:56 +0000 Received: from rnnvmail204.nvidia.com (10.129.68.6) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Sun, 31 Dec 2023 01:30:40 -0800 Received: from rnnvmail205.nvidia.com (10.129.68.10) by rnnvmail204.nvidia.com (10.129.68.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Sun, 31 Dec 2023 01:30:40 -0800 Received: from vdi.nvidia.com (10.127.8.9) by mail.nvidia.com (10.129.68.10) with Microsoft SMTP Server id 15.2.986.41 via Frontend Transport; Sun, 31 Dec 2023 01:30:38 -0800 From: Avihai Horon To: CC: Juan Quintela , Peter Xu , "Fabiano Rosas" , Leonardo Bras , Li Zhijian , Avihai Horon Subject: [PATCH 08/11] migration/multifd: Remove error_setg() in migration_ioc_process_incoming() Date: Sun, 31 Dec 2023 11:30:13 +0200 Message-ID: <20231231093016.14204-9-avihaih@nvidia.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20231231093016.14204-1-avihaih@nvidia.com> References: <20231231093016.14204-1-avihaih@nvidia.com> MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF00017098:EE_|SN7PR12MB7420:EE_ X-MS-Office365-Filtering-Correlation-Id: 6553112e-8174-49cb-f5de-08dc09e3313b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 23hZWGzj6q5Y+hOoyYE9CWJuHew0k6ORjYN4IWMtzq9a+OxabhoQIfwCQA3tvz778Ux/1gHGn4l2SycMQJymw9DwVRsTzJyOEpIMD+mv66Lb6U8HhNxPoHGwnULO1SSHe+cJ0uV3ZbTqmKv08iKIxae4Doj87loNRzcMFzA6eC38Ydxigf9FIP3PMETFToC89+D9ykzbpezR0C/uTyboKFfvOpdQzp181pa8GG+g0MBV8ogpGnOlJ90bo9VA8qPPvacIJO4vyTiK7jTPfjhSofL+eb15TXW0fh3dQW3Fp3+DqO7Yi+DMZKK46G0EgunFkud7pMktW5uPX0wM+Q4/lxLEHPuCa9/ks75oa2+G3QADFrOeOiU+N+KBVX4RR40Mtdjp6aseZzVrHIKUwBb1d2Mzyii3qze1UMGzSrJSoMqeeipNODsNSArgssx3hMlKcIA4b/RSW8kD8i8ZwI3mAkX9mVi3NW8cOvou4tN5vsxFr/4v6OnHzu6oh/5Z4UcE+e1UAAlwyFBDc2ZOI1fvLHffxJeh41ZZrw3NdWTDrm5zj/DYz98b5MFvOsUyX0eHzmC1Ed4QzJMvi6h26b6TggkAVrNILTzRMIg9+z6FUXuhNSw9IaTIJ9+dnYAllQJykMjF6Yz8Qc1EP27z0aF9Rgoqo0fSgDT1mPQxBohZVBfj83ghscqFd20+vt11ihXzNwqq3LJi++X9fgny8AIwTBTw3A3dpfx74qt3n4fwW0G39HirqbIfoyi+ggEHc15t X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230031)(4636009)(136003)(346002)(396003)(39860400002)(376002)(230922051799003)(1800799012)(186009)(64100799003)(82310400011)(451199024)(46966006)(40470700004)(36840700001)(36860700001)(478600001)(107886003)(40460700003)(41300700001)(82740400003)(356005)(7636003)(6916009)(36756003)(4326008)(86362001)(316002)(54906003)(70206006)(70586007)(6666004)(47076005)(7696005)(336012)(426003)(26005)(1076003)(40480700001)(83380400001)(8936002)(8676002)(2616005)(4744005)(2906002)(5660300002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Dec 2023 09:30:56.6600 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6553112e-8174-49cb-f5de-08dc09e3313b X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DS1PEPF00017098.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB7420 Received-SPF: softfail client-ip=2a01:111:f403:2009::601; envelope-from=avihaih@nvidia.com; helo=NAM10-BN7-obe.outbound.protection.outlook.com X-Spam_score_int: -47 X-Spam_score: -4.8 X-Spam_bar: ---- X-Spam_report: (-4.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-2.667, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org If multifd_load_setup() fails in migration_ioc_process_incoming(), error_setg() is called with errp. This will lead to an assert because in that case errp already contains an error. Fix it by removing the redundant error_setg(). Fixes: 6720c2b32725 ("migration: check magic value for deciding the mapping of channels") Signed-off-by: Avihai Horon Reviewed-by: Fabiano Rosas --- migration/migration.c | 1 - 1 file changed, 1 deletion(-) diff --git a/migration/migration.c b/migration/migration.c index 732e3dadd9..b0c3b4c23a 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -843,7 +843,6 @@ void migration_ioc_process_incoming(QIOChannel *ioc, Error **errp) } if (multifd_load_setup(errp) != 0) { - error_setg(errp, "Failed to setup multifd channels"); return; } From patchwork Sun Dec 31 09:30:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Avihai Horon X-Patchwork-Id: 13507170 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 19963C3DA6E for ; Sun, 31 Dec 2023 09:32:43 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rJsA6-0002Nr-2A; Sun, 31 Dec 2023 04:31:14 -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 1rJsA4-0002NC-8F for qemu-devel@nongnu.org; Sun, 31 Dec 2023 04:31:12 -0500 Received: from mail-co1nam11on20601.outbound.protection.outlook.com ([2a01:111:f403:2416::601] helo=NAM11-CO1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rJs9x-0008Mt-5W for qemu-devel@nongnu.org; Sun, 31 Dec 2023 04:31:12 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oP+hvJwrEl2hC0wpw2E8Z7CBdNUkmPSVJIdr6LUpwHtaFd2WR8Mj8AZ0kciRhFDqT3faGMhrryNH7JcWwNbuXVKEhSsl/Z8w3CHeiymLVLTp+2itNVmQfZzbz0KMD5C32MFZNT8Q7uool3K6bs5qVx0T3rSMGjpb1pghIQxUnszOE4klKEoGsppIaq3INLrSNcrPGT735isPCWdfX3yoiYwP9ycXrGlDTXthYgkrO6b952+dYeidZ2AbnooejCrKEmrXvHZlP0XqrwNK1GfMfM6HOoxq6H3fSfiZrNY6fNU5tdkDVD2pD+EaGUCLqimFibFGkNLAOUDtJzS9akKerQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=CYe5CAtagiSzoe1ZtZytJGDHbG6roK6CmwNc/PwW1n4=; b=ZSu306lQxppMrfSm+jvHSEFgBEFn9rYmQ03/fc5NPzVbAFie7Yxj4Uixb1hNgQWbDg8h/4DxFpXGzTnQeqm5Rze7F5dNoi596Zw3oOUJ4HCIsfD2BVcwoaNokm+SLr3xDgPc4Otcng8+dNQdkbfx3R+fn20RB9nJfNGo5EzEdxGpdfqJHqdOdyaT7a0lyp0Um2g3x566Gh41HqJjbKeJF1S0JvHQBlFZiy/ZrIivADbp0N0RLbjYYPYvQnTEAuQ/xUlSSa/AZTm3AWxNHkWKPnfdIT22wenWvh/w8M0PkNi383jOyWUbTecj4Qp0E6K2d3wG7CBo+5CqPsOefV+nCQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=nongnu.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CYe5CAtagiSzoe1ZtZytJGDHbG6roK6CmwNc/PwW1n4=; b=Os+5Xq18Ki6jSqkj7wvInc6fxzVEk+b4NWb+JHuz1ofOsFGi1RY9ulGzh22EzjrV6GChh0bpAwn3ASpUZQSEuYOWtgFdDwzaJQfbndssFgiuNjiNDP/hK+3OhocpwbndoK6SOTc0ADeJV+EA7Hn55fLSK/IMNgXmbxZvw037Wk11nLo5aZGDxQECE/ql/VwaAoS2lPRau+kNxdE4Db/qNbFtr1ygkUg+m2SP6g3z+Bk25oB0BoGEOE7vl33CuR3C4WGxF2x6cBzPK4SSyLqO2ZwRI+mCOZk0HnwGDDu002APyN1sWoogv91Nt0lOxmx2xQO/xaEFoItN3CDNitThvQ== Received: from DM6PR04CA0005.namprd04.prod.outlook.com (2603:10b6:5:334::10) by SJ0PR12MB5488.namprd12.prod.outlook.com (2603:10b6:a03:3ad::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.23; Sun, 31 Dec 2023 09:30:59 +0000 Received: from DS1PEPF0001709D.namprd05.prod.outlook.com (2603:10b6:5:334:cafe::9d) by DM6PR04CA0005.outlook.office365.com (2603:10b6:5:334::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.21 via Frontend Transport; Sun, 31 Dec 2023 09:30:58 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by DS1PEPF0001709D.mail.protection.outlook.com (10.167.18.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.9 via Frontend Transport; Sun, 31 Dec 2023 09:30:58 +0000 Received: from rnnvmail202.nvidia.com (10.129.68.7) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Sun, 31 Dec 2023 01:30:43 -0800 Received: from rnnvmail205.nvidia.com (10.129.68.10) by rnnvmail202.nvidia.com (10.129.68.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Sun, 31 Dec 2023 01:30:42 -0800 Received: from vdi.nvidia.com (10.127.8.9) by mail.nvidia.com (10.129.68.10) with Microsoft SMTP Server id 15.2.986.41 via Frontend Transport; Sun, 31 Dec 2023 01:30:40 -0800 From: Avihai Horon To: CC: Juan Quintela , Peter Xu , "Fabiano Rosas" , Leonardo Bras , Li Zhijian , Avihai Horon Subject: [PATCH 09/11] migration: Fix migration_channel_read_peek() error path Date: Sun, 31 Dec 2023 11:30:14 +0200 Message-ID: <20231231093016.14204-10-avihaih@nvidia.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20231231093016.14204-1-avihaih@nvidia.com> References: <20231231093016.14204-1-avihaih@nvidia.com> MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF0001709D:EE_|SJ0PR12MB5488:EE_ X-MS-Office365-Filtering-Correlation-Id: 75083d16-353a-4aa2-b975-08dc09e33251 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0Wcco9iwMGdfUTg9napRtOTIS1n6kyHkjyqf5PuojSLTtlZoWw2zQO8m95G/VFvwqXFrJl/+qJ653DqR/YOO8DXxGlOCBPGSNVkleBB6GOWvoAN7gnU+GiVYoKnItYM1eCl78e0u7tVM6vZsvPC5o75390uY++q59R8ZhMVwGRH2R6DH+kKrymw2Iv43/cnDoMd2a3Z5dz5HjrLBax7Cqkzqs7C+RL84xwdOm0Xpz7Dlwrb2U7YBBFLFOa0+4XGoJfpokSM68rlDcW8MCb8RyrWHvpO7ar2mk+4wVcKA0EyGyTnjcIxKUFlE+RtOhlAr7GkgU4+vtJRj8k8wR9sIYWJrAtIqOpKf0cZzuMA2FPtnG2meHUayDIF5qpkuY6V05RAfZFDDRgpSelyuiqA7S1Pds1ZE2wDhscmgBvMu2PM28G/GBGl4EwQEuEP9QG5AYX9WT10uSttdE2nMA1Yeek0K8y5YFLy8CLnwlKZNhEDbTby0OOC3x6xvXw+2gHj8Y3w92799mTmkTsnZq34agUX91OnU4f/acFUv3MTeerzjgvFbTuUFvjalH/LD7VTVE3wNOmQlur2/f2PT8NQRMpoQDNZOAkB0Ziya50t1XeXmECNSsFMxgfhurEIspdYILOyKWXGZYdfWNvkj6V3FOS1x+/SFcSFxbBRH91XdeswgJXH0a+n0fRPB8GgKOnmwBVlemGOAF+J6c3+dL33kYZOTCK1+yeTP/EXTG6+urscQaRu+qkd6+9wnTTpBWkBI X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230031)(4636009)(396003)(376002)(346002)(136003)(39860400002)(230922051799003)(451199024)(64100799003)(186009)(82310400011)(1800799012)(36840700001)(46966006)(40470700004)(336012)(426003)(107886003)(26005)(1076003)(83380400001)(6666004)(7696005)(2616005)(36860700001)(47076005)(5660300002)(4326008)(41300700001)(2906002)(478600001)(316002)(8676002)(8936002)(54906003)(70586007)(70206006)(6916009)(86362001)(7636003)(36756003)(82740400003)(356005)(40480700001)(40460700003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Dec 2023 09:30:58.4648 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 75083d16-353a-4aa2-b975-08dc09e33251 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DS1PEPF0001709D.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB5488 Received-SPF: softfail client-ip=2a01:111:f403:2416::601; envelope-from=avihaih@nvidia.com; helo=NAM11-CO1-obe.outbound.protection.outlook.com X-Spam_score_int: -47 X-Spam_score: -4.8 X-Spam_bar: ---- X-Spam_report: (-4.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-2.667, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org migration_channel_read_peek() calls qio_channel_readv_full() and handles both cases of return value == 0 and return value < 0 the same way, by calling error_setg() with errp. However, if return value < 0, errp is already set, so calling error_setg() with errp will lead to an assert. Fix it by handling these cases separately, calling error_setg() with errp only in return value == 0 case. Fixes: 6720c2b32725 ("migration: check magic value for deciding the mapping of channels") Signed-off-by: Avihai Horon Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Fabiano Rosas --- migration/channel.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/migration/channel.c b/migration/channel.c index ca3319a309..f9de064f3b 100644 --- a/migration/channel.c +++ b/migration/channel.c @@ -117,9 +117,12 @@ int migration_channel_read_peek(QIOChannel *ioc, len = qio_channel_readv_full(ioc, &iov, 1, NULL, NULL, QIO_CHANNEL_READ_FLAG_MSG_PEEK, errp); - if (len <= 0 && len != QIO_CHANNEL_ERR_BLOCK) { - error_setg(errp, - "Failed to peek at channel"); + if (len < 0 && len != QIO_CHANNEL_ERR_BLOCK) { + return -1; + } + + if (len == 0) { + error_setg(errp, "Failed to peek at channel"); return -1; } From patchwork Sun Dec 31 09:30:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avihai Horon X-Patchwork-Id: 13507163 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 75402C4706F for ; Sun, 31 Dec 2023 09:31:59 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rJsA3-0002Mn-Pi; Sun, 31 Dec 2023 04:31:11 -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 1rJsA1-0002LL-GM for qemu-devel@nongnu.org; Sun, 31 Dec 2023 04:31:09 -0500 Received: from mail-dm6nam12on20623.outbound.protection.outlook.com ([2a01:111:f400:fe59::623] helo=NAM12-DM6-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rJs9w-0008Ms-UZ for qemu-devel@nongnu.org; Sun, 31 Dec 2023 04:31:09 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Cifvy++qw50FzuOG9uWgvxYE5d7TH1E7l/jeYoSrzo/1kXtsGKXtNsdBsANc6tt02Bjwjqz7ORL8W+WeF915yKPOyX19GqmP9Qd8Syx1m9KwuO/wzAJCCl2VNhe6LTbabTnkMEZFGcLUD0yvJ0PAz3gCcBk8OZ/1+jRajvBjA8RJuJ1R6XZlGmfKEHviBkJxwtsojDDqox8Dw3Wcqqoub+19BremMKFr9XgQn0EaYnfNhI0905ydE1mUyr5G5/cLiPLK6sBPRHzTp5UUHtTlMjnBURwNDcTi8/yOuR4DqliOu2XrI7T0XinQF3d1b1PM8OXeQ78+wGMU1NJG3CUgZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=IWMsZM95l5nlsUbOW9+dmWUpqq9ysd3uV+sBrnEvUyc=; b=Mx+9dPHpB1px4L9PpNPgepf5djIOkIgTzVQp4kClOWDrXZW08jw/PWzyX6ax/K8TLJSy58bbNVNswp3BgPG7AaV09GFBoSJfsypt6BqZK9CPDpf0de3js6mdi65blDsjwqaqCCOqJmZDG+80s/CltVgpgUUvKTtz5ur+Mx+n7P/spyhIBsaxAKB3iKHecpxVtNDQCbMouQoS0n1cw15FUsJ0Z3ExSryO3o8kf+wwea50qweMkcSmoev0H7GQ68wJZpX41Wh2Ig/DBHRtt6nVDDI9O51jkuheSSXydztanMK2X+7c5GLME3aceUmRpSk8q2tr0gudcAFkUyxIgue0xA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=nongnu.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IWMsZM95l5nlsUbOW9+dmWUpqq9ysd3uV+sBrnEvUyc=; b=Y/+7oHhDKTh6Royj0eodFwDqJDcTKoKeEUwQccHUATZXiOtY0z4/5CCcwAxvF5n+7akNpYuf/+bU95kK0GVf4hPOQhaBF7SwN8HN6knGV5fM4Dx9acJbQJGlA5wHjQuCdEk34ff3UlYZM2AJaVKHRHm34k2ISZxMytmohcpSgePpFko+hLbozdqLsT1s3PnHGW5BL6myil6uFoB77nclgj7mihVi+tw2WWdbYYqwUHjFvIW0uNPytaxr9VMiIKMWBTnq+wdDb8Tp0DBcGtpEH1FUHjGKYANK3OppkY/WkDUeiO9WtqvxCetODjucp7qUAYl1ag6IPSyaDz6ai1NrkA== Received: from DM6PR07CA0075.namprd07.prod.outlook.com (2603:10b6:5:337::8) by LV2PR12MB5775.namprd12.prod.outlook.com (2603:10b6:408:179::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.23; Sun, 31 Dec 2023 09:31:00 +0000 Received: from DS1PEPF0001709A.namprd05.prod.outlook.com (2603:10b6:5:337:cafe::8c) by DM6PR07CA0075.outlook.office365.com (2603:10b6:5:337::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.18 via Frontend Transport; Sun, 31 Dec 2023 09:31:00 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by DS1PEPF0001709A.mail.protection.outlook.com (10.167.18.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.9 via Frontend Transport; Sun, 31 Dec 2023 09:31:00 +0000 Received: from rnnvmail202.nvidia.com (10.129.68.7) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Sun, 31 Dec 2023 01:30:46 -0800 Received: from rnnvmail205.nvidia.com (10.129.68.10) by rnnvmail202.nvidia.com (10.129.68.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Sun, 31 Dec 2023 01:30:45 -0800 Received: from vdi.nvidia.com (10.127.8.9) by mail.nvidia.com (10.129.68.10) with Microsoft SMTP Server id 15.2.986.41 via Frontend Transport; Sun, 31 Dec 2023 01:30:43 -0800 From: Avihai Horon To: CC: Juan Quintela , Peter Xu , "Fabiano Rosas" , Leonardo Bras , Li Zhijian , Avihai Horon Subject: [PATCH 10/11] migration: Remove unnecessary usage of local Error Date: Sun, 31 Dec 2023 11:30:15 +0200 Message-ID: <20231231093016.14204-11-avihaih@nvidia.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20231231093016.14204-1-avihaih@nvidia.com> References: <20231231093016.14204-1-avihaih@nvidia.com> MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF0001709A:EE_|LV2PR12MB5775:EE_ X-MS-Office365-Filtering-Correlation-Id: b5db7a50-a3eb-46b4-8705-08dc09e3338b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Sjq8fd82xEnuxcZ79A6Eu1H/NcZxVegB2iNQjdS7GRQbfpfF6lqdzGkYfRlByFyicvQngLak9CvfZnfcdp9+IkrZGoil8YIRrN49JIgp2bVBo+4OdrxG87WjlpAzYQ21PIFbUKZvZmJgAg3atziDoig4HTp+aoYd+c6udKnm44fhO9pmNDoPb62qTe1JaNhN32qomQHBidNXf4cQRlIgbrlElGT96QAIHNNweXAZVpbhxydcNRyvdA1veS018qhPmLmjNkIsqiiGgsKAIuo6V10q4Fzja5Et4/TS5ieQnimVZRxfPTmVNRAEizHcUPYzUvzsNj4yaqaw5E5/22AIdBXgYpH8SVLR2xa/mEq1TcS/pfVz/Mu8OzPgil+vq4To9dZHIg9Oirq7rH74o0LGGzGWbbVFrnIEHR9aCMQAER5P7+PoHoncT/CCR94GgoEU757blzHcKEn7yaat0L3dF4SlreUAicG0LtkaHa3v/UfKTSggHGyv1ZvgQSQNfUCSExvoH1QgFhJN/M1cxc0h16oXK1xV9L50uxDme0C7HglKyeU9YjD3eGEZz+lZxralzKlMRBBvhy8Tps717iBVkMlokgH2B8SplCgkPBSSGnp/8VB+refUfMCtdU7jnSSoAwCmXA8nT+qGS6FJSCD22ihrDsfEZYXA6qBD7bb9sMR32IWq+K19RgIF1s3YgYMv/IuYNfMvfn4dWCqkSKFB3v0XF0KNiFmUpei7TFdPxupPR041SDBuW/emeo8jTI0r X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230031)(4636009)(396003)(39860400002)(346002)(376002)(136003)(230922051799003)(82310400011)(186009)(64100799003)(1800799012)(451199024)(46966006)(36840700001)(40480700001)(41300700001)(2906002)(5660300002)(8676002)(4326008)(316002)(6916009)(54906003)(70206006)(70586007)(8936002)(36756003)(86362001)(82740400003)(7636003)(356005)(478600001)(7696005)(6666004)(47076005)(83380400001)(26005)(107886003)(1076003)(426003)(36860700001)(2616005)(336012); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Dec 2023 09:31:00.5213 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b5db7a50-a3eb-46b4-8705-08dc09e3338b X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DS1PEPF0001709A.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV2PR12MB5775 Received-SPF: softfail client-ip=2a01:111:f400:fe59::623; envelope-from=avihaih@nvidia.com; helo=NAM12-DM6-obe.outbound.protection.outlook.com X-Spam_score_int: -37 X-Spam_score: -3.8 X-Spam_bar: --- X-Spam_report: (-3.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-2.667, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FORGED_SPF_HELO=1, SPF_HELO_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_TEMPERROR=0.01 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org According to Error API, usage of ERRP_GUARD() or a local Error instead of errp is needed if errp is passed to void functions, where it is later dereferenced to see if an error occurred. There are several places in migration.c that use local Error although it is not needed. Change these places to use errp directly. Signed-off-by: Avihai Horon Reviewed-by: Fabiano Rosas --- migration/migration.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index b0c3b4c23a..fc7f4fd263 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -830,10 +830,9 @@ void migration_ioc_process_incoming(QIOChannel *ioc, Error **errp) * issue is not possible. */ ret = migration_channel_read_peek(ioc, (void *)&channel_magic, - sizeof(channel_magic), &local_err); + sizeof(channel_magic), errp); if (ret != 0) { - error_propagate(errp, local_err); return; } @@ -1825,8 +1824,6 @@ bool migration_is_blocked(Error **errp) static bool migrate_prepare(MigrationState *s, bool blk, bool blk_inc, bool resume, Error **errp) { - Error *local_err = NULL; - if (blk_inc) { warn_report("parameter 'inc' is deprecated;" " use blockdev-mirror with NBD instead"); @@ -1896,8 +1893,7 @@ static bool migrate_prepare(MigrationState *s, bool blk, bool blk_inc, "current migration capabilities"); return false; } - if (!migrate_cap_set(MIGRATION_CAPABILITY_BLOCK, true, &local_err)) { - error_propagate(errp, local_err); + if (!migrate_cap_set(MIGRATION_CAPABILITY_BLOCK, true, errp)) { return false; } s->must_remove_block_options = true; From patchwork Sun Dec 31 09:30:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Avihai Horon X-Patchwork-Id: 13507167 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6E285C3DA6E for ; Sun, 31 Dec 2023 09:32:40 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rJsA4-0002NR-M4; Sun, 31 Dec 2023 04:31:12 -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 1rJsA2-0002MW-To for qemu-devel@nongnu.org; Sun, 31 Dec 2023 04:31:10 -0500 Received: from mail-bn8nam11on20601.outbound.protection.outlook.com ([2a01:111:f400:7eae::601] helo=NAM11-BN8-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rJs9x-0008My-Ge for qemu-devel@nongnu.org; Sun, 31 Dec 2023 04:31:10 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kT3FKoE+eHxvZYMFbd6XmLhKxlEcFsVTWCqO9d0cozrriLQKeV5sEdS4GUzyNvJiFDyXzZqbLCdYWcfcv4N7PlCOvYPYGSwNJHqRK3zThGQWoA8l+TzhOzrXmYmA+SF+A5GNJwwDNRlHfaQ6ujgGp+SO1dbcxdUmtAOTdi8YveWA5aADas51bU/NbXa78HruSVA+kMHAFwSQ9goxkbwALo+XMVw6nVK1htaYuoCFofoNCSArAAGPDBmt3XbnqihjbKNXDLxFkWNEkrIFHgZxFPqrZ8Y6HIOAnnaMYj8l7JlNMiQl3c6yZBN1k8OX9CkqN1eZXaTFN5t4kpcaVdYAog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=T+NB4u+Lh8zA5QvMfHDwCiyztTARD7M8hs83TUcnxik=; b=LqhU5jVBf2lNT2ivb7Ky/PzTkVMjj9XyZNhvCtdb9z4A9cN+WwmuaxhXdZ5AcXLXuTI775juGCb9cJIrrEyNv+MlMFRJ4m08Uj5nmWsmDItG7a3jJclcMivNYW3OATxJjz137ihGTM20YwnaBn8kvZEabAN2sUWPd3sxIeWaGKjzYwxreRe+G4YWMP2HUas9ZlCpXrV40gLVJWeRrpGBaVnHRig17sVWh+Fb+TqicAgalKDsgERfqFLmMdZhAXy67l8XawttOfev197qRWQWewlWA7cnjtO34vXJdQ1POlN/IbKXNBzffQLsBvmMZa/glLefcVdt0K2PVogLLER09A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=nongnu.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=T+NB4u+Lh8zA5QvMfHDwCiyztTARD7M8hs83TUcnxik=; b=OxlDmovGLtF6gVCHJ5gdT9yjw4DxxDkYanpmVnp4HK8EKCmywdGdkE8ur5OYYqH2zoYJNS2RyvjiCgcS7/ZVAinle4wuNZuBEBQrOwHwTIGZsVUziK7jOQL4T+csksjGzfelGVmQCaU8RVnGGS9LAqVlLt33lgyGZX/k0ayagv+YtVZ5CiswwoK2o5dRh8LYHa5qTeAkATV5t+OwAsqfDLlSh1IW5dpcva8qocbs8dmgOuJm/8xjyMYaapJlzS+93mehvt2aYsXTkzxlkR2t6WgxCCz5g1r76vsIO20SC8R3gYjyx7mx0T/AeYkrEWaIeyrHlsgs3kh8E3Zr3e9Z8g== Received: from DS7PR03CA0024.namprd03.prod.outlook.com (2603:10b6:5:3b8::29) by MW4PR12MB7359.namprd12.prod.outlook.com (2603:10b6:303:222::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.23; Sun, 31 Dec 2023 09:31:01 +0000 Received: from CY4PEPF0000FCC2.namprd03.prod.outlook.com (2603:10b6:5:3b8:cafe::dc) by DS7PR03CA0024.outlook.office365.com (2603:10b6:5:3b8::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.20 via Frontend Transport; Sun, 31 Dec 2023 09:31:01 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CY4PEPF0000FCC2.mail.protection.outlook.com (10.167.242.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.9 via Frontend Transport; Sun, 31 Dec 2023 09:31:01 +0000 Received: from rnnvmail202.nvidia.com (10.129.68.7) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Sun, 31 Dec 2023 01:30:48 -0800 Received: from rnnvmail205.nvidia.com (10.129.68.10) by rnnvmail202.nvidia.com (10.129.68.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Sun, 31 Dec 2023 01:30:48 -0800 Received: from vdi.nvidia.com (10.127.8.9) by mail.nvidia.com (10.129.68.10) with Microsoft SMTP Server id 15.2.986.41 via Frontend Transport; Sun, 31 Dec 2023 01:30:46 -0800 From: Avihai Horon To: CC: Juan Quintela , Peter Xu , "Fabiano Rosas" , Leonardo Bras , Li Zhijian , Avihai Horon Subject: [PATCH 11/11] migration/multifd: Remove unnecessary usage of local Error Date: Sun, 31 Dec 2023 11:30:16 +0200 Message-ID: <20231231093016.14204-12-avihaih@nvidia.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20231231093016.14204-1-avihaih@nvidia.com> References: <20231231093016.14204-1-avihaih@nvidia.com> MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000FCC2:EE_|MW4PR12MB7359:EE_ X-MS-Office365-Filtering-Correlation-Id: b9dcd5bb-2f9a-4b16-c12d-08dc09e333dd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: e9uiIaTp/rk8BXOWl/yPWfOh+Lg32xItOiqt057ZF/DHEf7Y1JlFS24ZvXWVJw2RmIP2h+yHPml4pVfUoFounV5MVR/cYsCSRke2I7o2Nwcd+tCY0IRDlVVcm5ZWqY5OThAVhP64XFXWTbYmSmwtZNTPl07WQaCFPh81tb+eJjV+6qzJjxXusKlwAXaZbwZLJiYDR9REOgJ+JYZEH/hF95iXeYltgKsD+bO6nnRWkVgfCPj9WaMQBAYUv1Mlbq7MWmr9j8j7UmVjEv89JdYY9q2kcuyQp46Y9mworHiCF8wSUWhmpMr5okxaf2rNF76ZgFiqTYuc2j7C48LjVDw9DukfObSlyEwKW5rfrlR+uNQ5kyamtI8bM28iKNTMl9bG7ZAKz+tWeHTWjLPwC659bgt+J007XH9HNIe/tCTdrqgYDZlCWLzT4tRdWG2l2HwGAaS10wwi836bpF90t0T1HoVBvsAXWEmry3kZsJ0wDTKHiJWnL+/wdrK90Y1AKrBZPvJT5TH8cm+jvvlBWmNYRjqDtd6ySFOXiunq6TtFLLKbkPcbK6gJb9oXZDgNhYK0L1lQoZV+k1IkswRbSr4Lrw0cMYi7auxm+8yXxQlMsneF/PIq996WakLFSsB4bWUSDj3t1NiJT/3Ftd33rVDcozeIVPrPAj3NTx+gKyjQa0BUck5+o1KHc4OS0DChhGCXYA+WZ36j0/Cgsfup1K21DyymHlJmwCPP0MR902TMiIfL49BucpV5+s8oA595jxHMxX7wXdBoMu9i3XRP5yhNopj/Md48PwmL49BeehcuM/8= X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230031)(4636009)(39860400002)(396003)(346002)(376002)(136003)(230922051799003)(1800799012)(64100799003)(186009)(82310400011)(451199024)(36840700001)(40470700004)(46966006)(47076005)(7696005)(40480700001)(6916009)(7636003)(4326008)(86362001)(316002)(54906003)(40460700003)(8936002)(8676002)(70206006)(36756003)(356005)(70586007)(36860700001)(6666004)(5660300002)(478600001)(2616005)(107886003)(1076003)(26005)(41300700001)(426003)(336012)(2906002)(83380400001)(82740400003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Dec 2023 09:31:01.1071 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b9dcd5bb-2f9a-4b16-c12d-08dc09e333dd X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000FCC2.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB7359 Received-SPF: softfail client-ip=2a01:111:f400:7eae::601; envelope-from=avihaih@nvidia.com; helo=NAM11-BN8-obe.outbound.protection.outlook.com X-Spam_score_int: -47 X-Spam_score: -4.8 X-Spam_bar: ---- X-Spam_report: (-4.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-2.667, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org According to Error API, usage of ERRP_GUARD() or a local Error instead of errp is needed if errp is passed to void functions, where it is later dereferenced to see if an error occurred. There are several places in multifd.c that use local Error although it is not needed. Change these places to use errp directly. Signed-off-by: Avihai Horon Reviewed-by: Philippe Mathieu-Daudé --- migration/multifd.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/migration/multifd.c b/migration/multifd.c index 9ac24866ad..9f353aecfa 100644 --- a/migration/multifd.c +++ b/migration/multifd.c @@ -951,12 +951,10 @@ int multifd_save_setup(Error **errp) for (i = 0; i < thread_count; i++) { MultiFDSendParams *p = &multifd_send_state->params[i]; - Error *local_err = NULL; int ret; - ret = multifd_send_state->ops->send_setup(p, &local_err); + ret = multifd_send_state->ops->send_setup(p, errp); if (ret) { - error_propagate(errp, local_err); return ret; } } @@ -1195,12 +1193,10 @@ int multifd_load_setup(Error **errp) for (i = 0; i < thread_count; i++) { MultiFDRecvParams *p = &multifd_recv_state->params[i]; - Error *local_err = NULL; int ret; - ret = multifd_recv_state->ops->recv_setup(p, &local_err); + ret = multifd_recv_state->ops->recv_setup(p, errp); if (ret) { - error_propagate(errp, local_err); return ret; } }