From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 64E8341D8D for ; Mon, 27 Feb 2023 08:06:08 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5C2D840A84; Mon, 27 Feb 2023 08:06:08 +0100 (CET) Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2082.outbound.protection.outlook.com [40.107.102.82]) by mails.dpdk.org (Postfix) with ESMTP id 78A6E40A7D for ; Mon, 27 Feb 2023 08:06:07 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=npDEzjl/SZEg+6BLk+1kbJk8bpNo/99MZMUxb2lOe0CdqTRUOnBtUNZUZpGwU0KQzGkItLFLALcDuncLZpOqpC/maWbsBciV0aJwTu5Ps4hq6DkJBUHIZ2ewkde2GB+bwlYR9NzSgbO0gCUYIXr1M9wGFrwaLyyInulVu6AoYl8KkIxYiA0ovI4VPf0hMY6i4oKkFyHYnkMEbnr/EiuORCqOb0iL+cxQkUm8Q0JDbn6m7zSVicXvW8X2Ti0jbapSDrKchI2A3ZEVMWbMy6HDCRgu1WS5HhuVp6JMa9jjShe9EYXOtRuT+ufWGQY5BMBa5lpvxtBPjlerbuTUhLGB0g== 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=mQNyAx6ah1Z0A+ZLYnRYGOa3b85EBeWTKCoiJZ5zbng=; b=KtEmr6hyYp+1lbzr/L56XfxAPqh7hoxMmM0y345jjIWEcLvc7bxl98TYN6GEDd9e31797MFD7c6g1EO2lOxFyeGtyQA6pva92HpEAm4jOFxzjSCRPDgyn2FokiA1oBGWiWVVdIOcwKDCcbZHVjAk2xlDcRC65WtiT5FPoh0LqwLrO5slUvjRJ/JNK/ScazCYrIu/2D+KNMjVjZ0PYuCKTvKJsUFwvZAsf41R561oQm1tgV1PtJGNS65dlkRfDPRLiEMFaslYfKWmoZe1NkxnxYUgmJhr7NxE9Mp77eRQHrRr+VXVxN2694PHeasqVkv6sCV4YLNctgOggnnQ95LY5Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=intel.com 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 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=mQNyAx6ah1Z0A+ZLYnRYGOa3b85EBeWTKCoiJZ5zbng=; b=JVGipmNtOPk4ONmyMRx4u1lf2MrEyunESpzjXnj6dyakK7E4MEsagLVbBRchmbgoLJG+Ujej9dRFITGsE1ftqZxBRkEOv/AkE8aUcPBHEHWdONCi2L/xFfQVuB32PO8FLAnfDhoA7mzQjnWuDmgg8w+QpDV4TEdURs6o6+E/YcRO0/bV9qxRLVLwVqwTzoz2Tk00CwszaDDQYSnT3FQ64SgcQBmB4Hlw2Jr1W+AYC8VA2jqYtvr+pgCyFDy7kYd3/x+L8/tsRHlHZgE2ePw3kQzyqU85PwwPcr+T126TKVhZO62DM8IwFy+bf4IT2AoyBKdykxLoRjyowSvpxiFadw== Received: from BN8PR07CA0002.namprd07.prod.outlook.com (2603:10b6:408:ac::15) by MN2PR12MB4080.namprd12.prod.outlook.com (2603:10b6:208:1d9::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.29; Mon, 27 Feb 2023 07:06:05 +0000 Received: from BN8NAM11FT021.eop-nam11.prod.protection.outlook.com (2603:10b6:408:ac:cafe::98) by BN8PR07CA0002.outlook.office365.com (2603:10b6:408:ac::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.28 via Frontend Transport; Mon, 27 Feb 2023 07:06:05 +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 BN8NAM11FT021.mail.protection.outlook.com (10.13.177.114) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.14 via Frontend Transport; Mon, 27 Feb 2023 07:06:05 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) 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.36; Sun, 26 Feb 2023 23:05:46 -0800 Received: from nvidia.com (10.126.231.37) 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.37; Sun, 26 Feb 2023 23:05:43 -0800 From: Xueming Li To: Andy Pei CC: Maxime Coquelin , dpdk stable Subject: patch 'vdpa/ifc: fix reconnection in SW-assisted live migration' has been queued to stable release 22.11.2 Date: Mon, 27 Feb 2023 14:59:09 +0800 Message-ID: <20230227070107.15664-41-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230227070107.15664-1-xuemingl@nvidia.com> References: <20230227062349.13764-1-xuemingl@nvidia.com> <20230227070107.15664-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.37] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT021:EE_|MN2PR12MB4080:EE_ X-MS-Office365-Filtering-Correlation-Id: 8565d4a3-9a56-4fea-2828-08db189117e1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oMnCUuclwckLjx2uyOlnIHGu7Shk+KmQTjwcKC8nhPXjGrfXiqcd2+yL42KsUBD3b5IdrtTPMOb7Tg3lstsi8wtjx/5WPo4B0VwiOUDvKYuTzG85mp9k0ysazy2DcPxVNdngpI3/J4EqTgNIPZvNaiqOvwdEGnOVGtknNP6kTXYkGiw9oLGeJONzQ+Uoi8xuFNFOBkTAz2oE2l8BE1VjR0i65Bf3PlGJtUFRjEtbBnVmzJnOUDcsZO+LWD9h6t6mDkqjWn8y2Ynz91jXLneZF9rAHWNmjw0EVldvCT5n8tdsLJQHr0+OV0iYiGzLkph+I2SLz5uwR3Hg3SQ508G2L8gzFQjwz0ebXM5gqV/YJJkuaKdzVI/fYxobBnYrwHnOzepMr/pl50wi3Sgdi9WusmbkPesXeihY7WU0BwrlCoCrzxCMD+Eff0fKgu5qjq2NRIp22LVTVkHcpAJixmqNNB8DbYsQ+gjgjQzkKURr+uc/of/lBexllSUEVPimqt8i76rLoz0iNt8JkuwEEAsmSM3xGOAXiqTLYanyFruk0uaAhDlKXGXcbUHsXaBBTsj8x/hdfVI5JQc1EfEcq7vEyMXsMMNt/hoeEMghjvS8EujMGE8Mir6CvQumpyx7y8eNrvqByaJhMdSxLtDJ3Et4YkYdknrFcnOptIWT+VepDt4FvWG6h5CY12FUVEncKpF5qKwcYoqgdoB5dKp3tIGa1IlNzIINhZJXXuYOquxm3VC3wZOQOUN9qlqwMa16WZ4SaCQa/c0sQ0lOzVP5p6ENLSnqIQzl4qNu/gUYas7UoFHhDXEwT0FNZG3glRgIFxLg 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:(13230025)(4636009)(376002)(346002)(396003)(39860400002)(136003)(451199018)(40470700004)(36840700001)(46966006)(5660300002)(40460700003)(36756003)(86362001)(55016003)(40480700001)(8936002)(478600001)(47076005)(426003)(2616005)(336012)(82310400005)(6666004)(7696005)(966005)(6286002)(16526019)(186003)(53546011)(1076003)(70206006)(70586007)(26005)(54906003)(41300700001)(356005)(8676002)(6916009)(4326008)(34020700004)(36860700001)(82740400003)(7636003)(316002)(2906002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Feb 2023 07:06:05.0826 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8565d4a3-9a56-4fea-2828-08db189117e1 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: BN8NAM11FT021.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4080 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 22.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 03/01/23. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=72820dd60fcdd138a2aa7e66181b8a8e7c6e32a7 Thanks. Xueming Li --- >From 72820dd60fcdd138a2aa7e66181b8a8e7c6e32a7 Mon Sep 17 00:00:00 2001 From: Andy Pei Date: Mon, 12 Dec 2022 15:12:45 +0800 Subject: [PATCH] vdpa/ifc: fix reconnection in SW-assisted live migration Cc: Xueming Li [ upstream commit ef3be7e237dd707f46870b09b93f88f8ee5e75c6 ] In the case using argument "sw-live-migration=1" to enable SW assisted live migration, we take QEMU as front end for example, after source VM migrates to destination VM, we keep vdpa process for source VM there, we kill the QEMU process for source VM, and restart the QEMU process for source VM. In this case, vdpa driver will not perform DMA map and data path will not work properly. The above case works fine in the case "sw-live-migration=0". The root cause is that current code driver does not set running flag to 0. Driver treats device as ruuning and does not perform DMA map. Fixes: 4bb531e152d3 ("net/ifc: support SW assisted VDPA live migration") Signed-off-by: Andy Pei Reviewed-by: Maxime Coquelin --- drivers/vdpa/ifc/ifcvf_vdpa.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/vdpa/ifc/ifcvf_vdpa.c b/drivers/vdpa/ifc/ifcvf_vdpa.c index 9468f66638..35520ea3ae 100644 --- a/drivers/vdpa/ifc/ifcvf_vdpa.c +++ b/drivers/vdpa/ifc/ifcvf_vdpa.c @@ -1044,6 +1044,8 @@ ifcvf_sw_fallback_switchover(struct ifcvf_internal *internal) vdpa_disable_vfio_intr(internal); + rte_atomic32_set(&internal->running, 0); + ret = rte_vhost_host_notifier_ctrl(vid, RTE_VHOST_QUEUE_ALL, false); if (ret && ret != -ENOTSUP) goto error; -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-02-27 14:08:42.257545900 +0800 +++ 0042-vdpa-ifc-fix-reconnection-in-SW-assisted-live-migrat.patch 2023-02-27 14:08:40.749237000 +0800 @@ -1 +1 @@ -From ef3be7e237dd707f46870b09b93f88f8ee5e75c6 Mon Sep 17 00:00:00 2001 +From 72820dd60fcdd138a2aa7e66181b8a8e7c6e32a7 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit ef3be7e237dd707f46870b09b93f88f8ee5e75c6 ] @@ -19 +21,0 @@ -Cc: stable@dpdk.org