patch 'vdpa/mlx5: fix dead loop when process interrupted' has been queued to stable release 21.11.2
Kevin Traynor
ktraynor at redhat.com
Wed May 25 18:28:04 CEST 2022
Hi,
FYI, your patch has been queued to stable release 21.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 05/30/22. 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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/d24d6395d642237cc9177c270eacb6b57f8b9c14
Thanks.
Kevin
---
>From d24d6395d642237cc9177c270eacb6b57f8b9c14 Mon Sep 17 00:00:00 2001
From: Xueming Li <xuemingl at nvidia.com>
Date: Sun, 8 May 2022 17:25:49 +0300
Subject: [PATCH] vdpa/mlx5: fix dead loop when process interrupted
[ upstream commit 301ef4a18586ae1763206d7e75d9eddb58a7d05e ]
In Ctrl+C handling, sometimes kick handling thread gets endless EGAIN
error and fall into dead lock.
Kick happens frequently in real system due to busy traffic or retry
mechanism. This patch simplifies kick firmware anyway and skip setting
hardware notifier due to potential device error, notifier could be set
in next successful kick request.
Fixes: 62c813706e41 ("vdpa/mlx5: map doorbell")
Signed-off-by: Xueming Li <xuemingl at nvidia.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
---
drivers/vdpa/mlx5/mlx5_vdpa_virtq.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c b/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c
index c1a25becdd..0ef7ed0e4a 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c
+++ b/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c
@@ -24,9 +24,9 @@ mlx5_vdpa_virtq_kick_handler(void *cb_arg)
uint64_t buf;
int nbytes;
+ int retry;
if (rte_intr_fd_get(virtq->intr_handle) < 0)
return;
-
- do {
+ for (retry = 0; retry < 3; ++retry) {
nbytes = read(rte_intr_fd_get(virtq->intr_handle), &buf,
8);
@@ -40,5 +40,7 @@ mlx5_vdpa_virtq_kick_handler(void *cb_arg)
}
break;
- } while (1);
+ }
+ if (nbytes < 0)
+ return;
rte_write32(virtq->index, priv->virtq_db_addr);
if (virtq->notifier_state == MLX5_VDPA_NOTIFIER_STATE_DISABLED) {
--
2.34.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-05-25 17:26:58.906993168 +0100
+++ 0012-vdpa-mlx5-fix-dead-loop-when-process-interrupted.patch 2022-05-25 17:26:58.545828299 +0100
@@ -1 +1 @@
-From 301ef4a18586ae1763206d7e75d9eddb58a7d05e Mon Sep 17 00:00:00 2001
+From d24d6395d642237cc9177c270eacb6b57f8b9c14 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 301ef4a18586ae1763206d7e75d9eddb58a7d05e ]
+
@@ -15 +16,0 @@
-Cc: stable at dpdk.org
@@ -24 +25 @@
-index 2e517beda2..2696d54b41 100644
+index c1a25becdd..0ef7ed0e4a 100644
More information about the stable
mailing list