patch 'app/testpmd: fix async flow create failure handling' has been queued to stable release 23.11.1

Xueming Li xuemingl at nvidia.com
Sat Apr 13 14:48:18 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=4a1ffc9b02bcda814389a53b914cdad06e03f872

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 4a1ffc9b02bcda814389a53b914cdad06e03f872 Mon Sep 17 00:00:00 2001
From: Dariusz Sosnowski <dsosnowski at nvidia.com>
Date: Wed, 28 Feb 2024 19:57:07 +0100
Subject: [PATCH] app/testpmd: fix async flow create failure handling
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 0da12ecba770873851a3a63dc08052271a350aeb ]

In case of an error when an asynchronous flow create operation was
enqueued, test-pmd attempted to enqueue a flow destroy operation
of that flow rule.
However, this was incorrect because:

- Flow rule index was used to enqueue a flow destroy operation.
  This flow rule index was not yet initialized, so flow rule number 0
  was always destroyed as a result.
- Since rte_flow_async_create() does not return a handle on error,
  then there is no flow rule to destroy.

test-pmd only needs to free internal memory allocated for
storing a flow rule. Any flow destroy operation is not needed
in this case.

Fixes: ecdc927b99f2 ("app/testpmd: add async flow create/destroy operations")

Signed-off-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
Acked-by: Ori Kam <orika at nvidia.com>
---
 app/test-pmd/config.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 2c4dedd603..7c24e401ec 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -2789,8 +2789,7 @@ port_queue_flow_create(portid_t port_id, queueid_t queue_id,
 		flow = rte_flow_async_create_by_index(port_id, queue_id, &op_attr, pt->table,
 			rule_idx, actions, actions_idx, job, &error);
 	if (!flow) {
-		uint64_t flow_id = pf->id;
-		port_queue_flow_destroy(port_id, queue_id, true, 1, &flow_id);
+		free(pf);
 		free(job);
 		return port_flow_complain(&error);
 	}
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-04-13 20:43:05.724984282 +0800
+++ 0018-app-testpmd-fix-async-flow-create-failure-handling.patch	2024-04-13 20:43:04.927754023 +0800
@@ -1 +1 @@
-From 0da12ecba770873851a3a63dc08052271a350aeb Mon Sep 17 00:00:00 2001
+From 4a1ffc9b02bcda814389a53b914cdad06e03f872 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 0da12ecba770873851a3a63dc08052271a350aeb ]
@@ -22 +24,0 @@
-Cc: stable at dpdk.org
@@ -31 +33 @@
-index cd2a436cd7..968d2164ab 100644
+index 2c4dedd603..7c24e401ec 100644
@@ -34 +36 @@
-@@ -2856,8 +2856,7 @@ port_queue_flow_create(portid_t port_id, queueid_t queue_id,
+@@ -2789,8 +2789,7 @@ port_queue_flow_create(portid_t port_id, queueid_t queue_id,


More information about the stable mailing list