patch 'app/testpmd: fix aged flow destroy' has been queued to stable release 21.11.9
Kevin Traynor
ktraynor at redhat.com
Wed Nov 27 18:19:02 CET 2024
Hi,
FYI, your patch has been queued to stable release 21.11.9
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/02/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://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/bfc927a8beaa2bd9f4355fc96ccadcd61f63ab11
Thanks.
Kevin
---
>From bfc927a8beaa2bd9f4355fc96ccadcd61f63ab11 Mon Sep 17 00:00:00 2001
From: Danylo Vodopianov <dvo-plv at napatech.com>
Date: Mon, 18 Nov 2024 19:03:23 +0100
Subject: [PATCH] app/testpmd: fix aged flow destroy
[ upstream commit 098f949f8a70f7618f5390f9c1e9edfb9e5469c4 ]
port_flow_destroy() function never assumed that rule array can be freed
when it's executing, and port_flow_aged() just violated that assumption.
In case of flow async create failure, it tries to do a cleanup, but it
wrongly removes a 1st flow (with id 0). pf->id is not set at this
moment and it always is 0, thus 1st flow is removed. A local copy of
flow->id must be used to call of port_flow_destroy() to avoid access
and processing of flow->id after the flow is removed.
Fixes: de956d5ecf08 ("app/testpmd: support age shared action context")
Signed-off-by: Danylo Vodopianov <dvo-plv at napatech.com>
Acked-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
---
app/test-pmd/config.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index e060a1de49..aa979e886f 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -2451,6 +2451,8 @@ port_flow_aged(portid_t port_id, uint8_t destroy)
type = (enum age_action_context_type *)contexts[idx];
switch (*type) {
- case ACTION_AGE_CONTEXT_TYPE_FLOW:
+ case ACTION_AGE_CONTEXT_TYPE_FLOW: {
+ uint32_t flow_id;
ctx.pf = container_of(type, struct port_flow, age_type);
+ flow_id = ctx.pf->id;
printf("%-20s\t%" PRIu32 "\t%" PRIu32 "\t%" PRIu32
"\t%c%c%c\t\n",
@@ -2463,7 +2465,8 @@ port_flow_aged(portid_t port_id, uint8_t destroy)
ctx.pf->rule.attr->transfer ? 't' : '-');
if (destroy && !port_flow_destroy(port_id, 1,
- &ctx.pf->id))
+ &flow_id))
total++;
break;
+ }
case ACTION_AGE_CONTEXT_TYPE_INDIRECT_ACTION:
ctx.pia = container_of(type,
--
2.47.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-11-27 17:17:41.872956512 +0000
+++ 0115-app-testpmd-fix-aged-flow-destroy.patch 2024-11-27 17:17:38.349270016 +0000
@@ -1 +1 @@
-From 098f949f8a70f7618f5390f9c1e9edfb9e5469c4 Mon Sep 17 00:00:00 2001
+From bfc927a8beaa2bd9f4355fc96ccadcd61f63ab11 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 098f949f8a70f7618f5390f9c1e9edfb9e5469c4 ]
+
@@ -16 +17,0 @@
-Cc: stable at dpdk.org
@@ -25 +26 @@
-index c831166431..28d45568ac 100644
+index e060a1de49..aa979e886f 100644
@@ -28 +29 @@
-@@ -4161,6 +4161,8 @@ port_flow_aged(portid_t port_id, uint8_t destroy)
+@@ -2451,6 +2451,8 @@ port_flow_aged(portid_t port_id, uint8_t destroy)
@@ -33 +34 @@
-+ uint64_t flow_id;
++ uint32_t flow_id;
@@ -36 +37 @@
- printf("%-20s\t%" PRIu64 "\t%" PRIu32 "\t%" PRIu32
+ printf("%-20s\t%" PRIu32 "\t%" PRIu32 "\t%" PRIu32
@@ -38 +39 @@
-@@ -4173,7 +4175,8 @@ port_flow_aged(portid_t port_id, uint8_t destroy)
+@@ -2463,7 +2465,8 @@ port_flow_aged(portid_t port_id, uint8_t destroy)
@@ -41,2 +42,2 @@
-- &ctx.pf->id, false))
-+ &flow_id, false))
+- &ctx.pf->id))
++ &flow_id))
More information about the stable
mailing list