patch 'vhost: cleanup resubmit info before inflight setup' has been queued to stable release 23.11.2
Xueming Li
xuemingl at nvidia.com
Fri Jul 12 12:44:38 CEST 2024
Hi,
FYI, your patch has been queued to stable release 23.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 07/14/24. 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=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=d119ad0b29f26b96da7ecefa0ce07c8ed6a14dff
Thanks.
Xueming Li <xuemingl at nvidia.com>
---
>From d119ad0b29f26b96da7ecefa0ce07c8ed6a14dff Mon Sep 17 00:00:00 2001
From: Haoqian He <haoqian.he at smartx.com>
Date: Fri, 26 Apr 2024 07:09:46 -0400
Subject: [PATCH] vhost: cleanup resubmit info before inflight setup
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl at nvidia.com>
[ upstream commit e4a01eea66326c58593906e189b376605a0ec606 ]
This patch fixes a potential VM hang bug when the VM reboots after
vhost live recovery due to missing cleanup virtqueue resubmit info.
Specifically, if inflight IO that should be resubmitted during
the latest vhost reconnection has not been submitted yet while
VM rebooting, so GET_VRING_BASE would not wait for the inflight
IO, at this time the resubmit info has been. When the VM restarts,
SET_VRING_KICK will resubmit the inflight IO (If resubmit info
is not null, function set_vring_kick will return without updating
resubmit info).
It’s an error, any stale inflight IO should not be resubmitted
after the VM restart.
The solution is to clean up virtqueue resubmit info when function
set_inflight_fd before function set_vring_kick.
Fixes: ad0a4ae491fe ("vhost: checkout resubmit inflight information")
Signed-off-by: Haoqian He <haoqian.he at smartx.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
---
.mailmap | 1 +
lib/vhost/vhost_user.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/.mailmap b/.mailmap
index e1ce4e1b1b..b0eda8e8af 100644
--- a/.mailmap
+++ b/.mailmap
@@ -489,6 +489,7 @@ Hanoch Haim <hhaim at cisco.com>
Hanumanth Pothula <hpothula at marvell.com>
Hao Chen <chenh at yusur.tech> <chenhao164 at huawei.com>
Hao Wu <hao.wu at intel.com>
+Haoqian He <haoqian.he at smartx.com>
Hari Kumar Vemula <hari.kumarx.vemula at intel.com>
Harini Ramakrishnan <harini.ramakrishnan at microsoft.com>
Hariprasad Govindharajan <hariprasad.govindharajan at intel.com>
diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
index a323ce5fbf..f8e42dd619 100644
--- a/lib/vhost/vhost_user.c
+++ b/lib/vhost/vhost_user.c
@@ -1799,6 +1799,7 @@ vhost_user_set_inflight_fd(struct virtio_net **pdev,
if (!vq)
continue;
+ cleanup_vq_inflight(dev, vq);
if (vq_is_packed(dev)) {
vq->inflight_packed = addr;
vq->inflight_packed->desc_num = queue_size;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-12 18:40:16.550820633 +0800
+++ 0052-vhost-cleanup-resubmit-info-before-inflight-setup.patch 2024-07-12 18:40:14.096594228 +0800
@@ -1 +1 @@
-From e4a01eea66326c58593906e189b376605a0ec606 Mon Sep 17 00:00:00 2001
+From d119ad0b29f26b96da7ecefa0ce07c8ed6a14dff Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit e4a01eea66326c58593906e189b376605a0ec606 ]
@@ -27 +29,0 @@
-Cc: stable at dpdk.org
@@ -37 +39 @@
-index ed63605a15..ff20619bfb 100644
+index e1ce4e1b1b..b0eda8e8af 100644
@@ -40 +42 @@
-@@ -495,6 +495,7 @@ Hanoch Haim <hhaim at cisco.com>
+@@ -489,6 +489,7 @@ Hanoch Haim <hhaim at cisco.com>
@@ -49 +51 @@
-index 414192500e..7c54afc5fb 100644
+index a323ce5fbf..f8e42dd619 100644
@@ -52 +54 @@
-@@ -1871,6 +1871,7 @@ vhost_user_set_inflight_fd(struct virtio_net **pdev,
+@@ -1799,6 +1799,7 @@ vhost_user_set_inflight_fd(struct virtio_net **pdev,
More information about the stable
mailing list