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 2BA3C41D4F for ; Thu, 23 Feb 2023 10:38:02 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 27A5B43150; Thu, 23 Feb 2023 10:38:02 +0100 (CET) Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) by mails.dpdk.org (Postfix) with ESMTP id 5D5E7427E9 for ; Thu, 23 Feb 2023 10:38:00 +0100 (CET) Received: by mail-wr1-f49.google.com with SMTP id i11so3966542wrp.5 for ; Thu, 23 Feb 2023 01:38:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VJVCVS57p1v0GkSrciXEDUzPq96kth8cAereeBvbEQ4=; b=G5As4jG8nKVwOA2xvZif0MV685qnvspr+k09NHHvpSYgGNdL/8sv4g+0TaLwPNSA5D +ifLWsJA9Ei+CUSdbS1SUM1VOJCTtfQbopmpbYIMyAy8hr9Zv2FXuKg04EqPEnjGrnW1 C7gEd/zqK4Q0kz3qqyn1PZ1buX5P3fYa1dhW+imogahxAaOYZo0EO4LgEu3Q+jQaEBYD DyJGzc+14LwB57UKlG4/gGHfF0JHWBoaxgtqHIHsew8MlFP62+hCDGQ+uquPkJklwYuI Z4rE12R1URJMO7Px/1x8cEYceZUphU+jJiKd81XMd4LMRr24SF3erW8vqFlnHrpdIguU baEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VJVCVS57p1v0GkSrciXEDUzPq96kth8cAereeBvbEQ4=; b=4omPBLrnlgcXUJi/htyVPsGd8PdzrJVxoIGh0RQ9hJgdOVsrxHj/lL3pesDOb15q4Q ulten/mN6mQ2wkMjfmjRi/PAHMix/JJKZFw8ofHc/JOcNPdLHJ93O87sAHg40xe++goF 8mbDzi4YvQoVEFdik8osP/oJwF0IdOHP9d/PdcIv1hRukk/uoATRmIMgBEC5JVFfc3YR WRtEt6OMmFAcGVFt6RwuIV+SyUL7J0JE8QoNT+02LF8K/6drJSg7jGRRsg+MlkSzR8UQ X+R0vHb0jYeg75rymFKqrAj7FJ9x2y9RQoYYtXZ8r71vjDIvGVN/u6j/+nyBVaPseBmJ w4qQ== X-Gm-Message-State: AO0yUKXvWtiVsCsOIboX5vB1KLZsX4itTjNJSkcT8cjm5VZp0gB5SuJP cxmJmsnLKBm6sotQm1kwa7E= X-Google-Smtp-Source: AK7set+plyu9dn3lDKzKPn+NS8qYlHNP5G1Zfa+D3OcbJlhhsIVuAF7RVi51z7NiXgH84kukt31ZAA== X-Received: by 2002:a5d:5646:0:b0:2c3:da3f:1def with SMTP id j6-20020a5d5646000000b002c3da3f1defmr10674219wrw.7.1677145080110; Thu, 23 Feb 2023 01:38:00 -0800 (PST) Received: from localhost ([137.220.119.58]) by smtp.gmail.com with ESMTPSA id b13-20020a05600c4e0d00b003e8dc7a03basm5463668wmq.41.2023.02.23.01.37.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Feb 2023 01:37:59 -0800 (PST) From: luca.boccassi@gmail.com 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 20.11.8 Date: Thu, 23 Feb 2023 09:36:19 +0000 Message-Id: <20230223093715.3926893-15-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230223093715.3926893-1-luca.boccassi@gmail.com> References: <20230223093715.3926893-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 20.11.8 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/25/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://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/eb73764d1146069bb3ffbcfb88e0928ef9c4b525 Thanks. Luca Boccassi --- >From eb73764d1146069bb3ffbcfb88e0928ef9c4b525 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 [ 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 371be23ace..360dd4b034 100644 --- a/drivers/vdpa/ifc/ifcvf_vdpa.c +++ b/drivers/vdpa/ifc/ifcvf_vdpa.c @@ -842,6 +842,8 @@ ifcvf_sw_fallback_switchover(struct ifcvf_internal *internal) vdpa_ifcvf_stop(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.39.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-02-23 09:36:28.892812648 +0000 +++ 0015-vdpa-ifc-fix-reconnection-in-SW-assisted-live-migrat.patch 2023-02-23 09:36:28.186169203 +0000 @@ -1 +1 @@ -From ef3be7e237dd707f46870b09b93f88f8ee5e75c6 Mon Sep 17 00:00:00 2001 +From eb73764d1146069bb3ffbcfb88e0928ef9c4b525 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit ef3be7e237dd707f46870b09b93f88f8ee5e75c6 ] + @@ -19 +20,0 @@ -Cc: stable@dpdk.org @@ -28 +29 @@ -index 9468f66638..35520ea3ae 100644 +index 371be23ace..360dd4b034 100644 @@ -31,2 +32,2 @@ -@@ -1044,6 +1044,8 @@ ifcvf_sw_fallback_switchover(struct ifcvf_internal *internal) - +@@ -842,6 +842,8 @@ ifcvf_sw_fallback_switchover(struct ifcvf_internal *internal) + vdpa_ifcvf_stop(internal);