patch 'net/ena/base: restructure interrupt handling' has been queued to stable release 23.11.1

Xueming Li xuemingl at nvidia.com
Sat Apr 13 14:49:25 CEST 2024


Hi,

FYI, your patch has been queued to stable release 23.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 04/15/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=aa850bad00f408ad4d680023dd8c952e062606b1

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From aa850bad00f408ad4d680023dd8c952e062606b1 Mon Sep 17 00:00:00 2001
From: Shai Brandes <shaibran at amazon.com>
Date: Tue, 12 Mar 2024 20:07:00 +0200
Subject: [PATCH] net/ena/base: restructure interrupt handling
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 553653ccc18c1ed9fb0406e1b0130e945d5ab30f ]

When invoking an admin command, in interrupt mode, if the interrupt
is received after timeout and also after the calling function finished
running, the response will be written into a memory that is no longer
valid.

Fixes: 99ecfbf845b3 ("ena: import communication layer")

Signed-off-by: Shai Brandes <shaibran at amazon.com>
Reviewed-by: Amit Bernstein <amitbern at amazon.com>
---
 drivers/net/ena/base/ena_com.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ena/base/ena_com.c b/drivers/net/ena/base/ena_com.c
index 31c37b0ab3..57ccde9545 100644
--- a/drivers/net/ena/base/ena_com.c
+++ b/drivers/net/ena/base/ena_com.c
@@ -179,6 +179,7 @@ static int ena_com_admin_init_aenq(struct ena_com_dev *ena_dev,
 static void comp_ctxt_release(struct ena_com_admin_queue *queue,
 				     struct ena_comp_ctx *comp_ctx)
 {
+	comp_ctx->user_cqe = NULL;
 	comp_ctx->occupied = false;
 	ATOMIC32_DEC(&queue->outstanding_cmds);
 }
@@ -472,6 +473,9 @@ static void ena_com_handle_single_admin_completion(struct ena_com_admin_queue *a
 		return;
 	}
 
+	if (!comp_ctx->occupied)
+		return;
+
 	comp_ctx->status = ENA_CMD_COMPLETED;
 	comp_ctx->comp_status = cqe->acq_common_descriptor.status;
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-04-13 20:43:07.600492132 +0800
+++ 0085-net-ena-base-restructure-interrupt-handling.patch	2024-04-13 20:43:05.037753879 +0800
@@ -1 +1 @@
-From 553653ccc18c1ed9fb0406e1b0130e945d5ab30f Mon Sep 17 00:00:00 2001
+From aa850bad00f408ad4d680023dd8c952e062606b1 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 553653ccc18c1ed9fb0406e1b0130e945d5ab30f ]
@@ -12 +14,0 @@
-Cc: stable at dpdk.org
@@ -21 +23 @@
-index fb3ad27d0a..a0c88b1a0e 100644
+index 31c37b0ab3..57ccde9545 100644
@@ -24 +26 @@
-@@ -181,6 +181,7 @@ static int ena_com_admin_init_aenq(struct ena_com_dev *ena_dev,
+@@ -179,6 +179,7 @@ static int ena_com_admin_init_aenq(struct ena_com_dev *ena_dev,
@@ -32 +34 @@
-@@ -474,6 +475,9 @@ static void ena_com_handle_single_admin_completion(struct ena_com_admin_queue *a
+@@ -472,6 +473,9 @@ static void ena_com_handle_single_admin_completion(struct ena_com_admin_queue *a


More information about the stable mailing list