patch 'vdpa/mlx5: fix interrupt trash that leads to crash' has been queued to stable release 21.11.2
Kevin Traynor
ktraynor at redhat.com
Wed May 25 18:28:03 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/879fb64517212c99ecfbafc055be135e9201a28a
Thanks.
Kevin
---
>From 879fb64517212c99ecfbafc055be135e9201a28a Mon Sep 17 00:00:00 2001
From: Xueming Li <xuemingl at nvidia.com>
Date: Sun, 8 May 2022 17:25:48 +0300
Subject: [PATCH] vdpa/mlx5: fix interrupt trash that leads to crash
[ upstream commit 66a439c5d7c166347adc799fcc928058e16ac23d ]
Disable interrupt unregister timeout to avoid invalid FD caused
interrupt thread segment fault.
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 | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c b/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c
index 2f32aef67f..c1a25becdd 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c
+++ b/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c
@@ -18,5 +18,5 @@
static void
-mlx5_vdpa_virtq_handler(void *cb_arg)
+mlx5_vdpa_virtq_kick_handler(void *cb_arg)
{
struct mlx5_vdpa_virtq *virtq = cb_arg;
@@ -60,18 +60,14 @@ mlx5_vdpa_virtq_unset(struct mlx5_vdpa_virtq *virtq)
{
unsigned int i;
- int retries = MLX5_VDPA_INTR_RETRIES;
int ret = -EAGAIN;
- if (rte_intr_fd_get(virtq->intr_handle) != -1) {
- while (retries-- && ret == -EAGAIN) {
+ if (rte_intr_fd_get(virtq->intr_handle) >= 0) {
+ while (ret == -EAGAIN) {
ret = rte_intr_callback_unregister(virtq->intr_handle,
- mlx5_vdpa_virtq_handler,
- virtq);
+ mlx5_vdpa_virtq_kick_handler, virtq);
if (ret == -EAGAIN) {
- DRV_LOG(DEBUG, "Try again to unregister fd %d "
- "of virtq %d interrupt, retries = %d.",
- rte_intr_fd_get(virtq->intr_handle),
- (int)virtq->index, retries);
-
+ DRV_LOG(DEBUG, "Try again to unregister fd %d of virtq %hu interrupt",
+ rte_intr_fd_get(virtq->intr_handle),
+ virtq->index);
usleep(MLX5_VDPA_INTR_RETRIES_USEC);
}
@@ -361,5 +357,5 @@ mlx5_vdpa_virtq_setup(struct mlx5_vdpa_priv *priv, int index)
if (rte_intr_callback_register(virtq->intr_handle,
- mlx5_vdpa_virtq_handler,
+ mlx5_vdpa_virtq_kick_handler,
virtq)) {
rte_intr_fd_set(virtq->intr_handle, -1);
--
2.34.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-05-25 17:26:58.886958447 +0100
+++ 0011-vdpa-mlx5-fix-interrupt-trash-that-leads-to-crash.patch 2022-05-25 17:26:58.544828298 +0100
@@ -1 +1 @@
-From 66a439c5d7c166347adc799fcc928058e16ac23d Mon Sep 17 00:00:00 2001
+From 879fb64517212c99ecfbafc055be135e9201a28a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 66a439c5d7c166347adc799fcc928058e16ac23d ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -19 +20 @@
-index 3416797d28..2e517beda2 100644
+index 2f32aef67f..c1a25becdd 100644
@@ -54 +55 @@
-@@ -360,5 +356,5 @@ mlx5_vdpa_virtq_setup(struct mlx5_vdpa_priv *priv, int index)
+@@ -361,5 +357,5 @@ mlx5_vdpa_virtq_setup(struct mlx5_vdpa_priv *priv, int index)
More information about the stable
mailing list