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

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Mar 14 01:09:12 CET 2024


Hi,

FYI, your patch has been queued to stable release 22.11.5

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/1b8a6de75f270592ace73d65dba3fdc9394b359e

Thanks.

Luca Boccassi

---
>From 1b8a6de75f270592ace73d65dba3fdc9394b359e 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

[ 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 e8a647a393..dca5431b98 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -2700,8 +2700,7 @@ port_queue_flow_create(portid_t port_id, queueid_t queue_id,
 	flow = rte_flow_async_create(port_id, queue_id, &op_attr, pt->table,
 		pattern, pattern_idx, actions, actions_idx, job, &error);
 	if (!flow) {
-		uint32_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.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:21.504778957 +0000
+++ 0016-app-testpmd-fix-async-flow-create-failure-handling.patch	2024-03-14 00:09:20.585614666 +0000
@@ -1 +1 @@
-From 0da12ecba770873851a3a63dc08052271a350aeb Mon Sep 17 00:00:00 2001
+From 1b8a6de75f270592ace73d65dba3fdc9394b359e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0da12ecba770873851a3a63dc08052271a350aeb ]
+
@@ -22 +23,0 @@
-Cc: stable at dpdk.org
@@ -31 +32 @@
-index cd2a436cd7..968d2164ab 100644
+index e8a647a393..dca5431b98 100644
@@ -34,3 +35,3 @@
-@@ -2856,8 +2856,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);
+@@ -2700,8 +2700,7 @@ port_queue_flow_create(portid_t port_id, queueid_t queue_id,
+ 	flow = rte_flow_async_create(port_id, queue_id, &op_attr, pt->table,
+ 		pattern, pattern_idx, actions, actions_idx, job, &error);
@@ -38 +39 @@
--		uint64_t flow_id = pf->id;
+-		uint32_t flow_id = pf->id;


More information about the stable mailing list