patch 'app/testpmd: fix indirect action flush' has been queued to stable release 23.11.2
Xueming Li
xuemingl at nvidia.com
Fri Jul 12 12:43:56 CEST 2024
Hi,
FYI, your patch has been queued to stable release 23.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 07/14/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=2f51a0fdfb6152de1186000634aba86be17d6bcc
Thanks.
Xueming Li <xuemingl at nvidia.com>
---
>From 2f51a0fdfb6152de1186000634aba86be17d6bcc Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz at nvidia.com>
Date: Mon, 25 Mar 2024 12:58:26 +0200
Subject: [PATCH] app/testpmd: fix indirect action flush
Cc: Xueming Li <xuemingl at nvidia.com>
[ upstream commit ecf408d2aa5e8952aac956b001f3ff1de1af1df0 ]
The memory of the indirect action handles should be freed after
being destroyed in the flush. The behavior needs to be consistent
with the single handle destroy port_action_handle_destroy().
Or else, there would be some memory leak when closing / detaching a
port without quitting the application. In the meanwhile, since the
action handles are already destroyed, it makes no sense to hold the
indirect action software resources anymore.
Fixes: f7352c176bbf ("app/testpmd: fix use of indirect action after port close")
Signed-off-by: Bing Zhao <bingz at nvidia.com>
Reviewed-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
Acked-by: Ferruh Yigit <ferruh.yigit at amd.com>
---
app/test-pmd/config.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 6d605556ff..c7d3a968c1 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1891,8 +1891,7 @@ port_action_handle_flush(portid_t port_id)
/* Poisoning to make sure PMDs update it in case of error. */
memset(&error, 0x44, sizeof(error));
if (pia->handle != NULL) {
- ret = pia->type ==
- RTE_FLOW_ACTION_TYPE_INDIRECT_LIST ?
+ ret = pia->type == RTE_FLOW_ACTION_TYPE_INDIRECT_LIST ?
rte_flow_action_list_handle_destroy
(port_id, pia->list_handle, &error) :
rte_flow_action_handle_destroy
@@ -1902,11 +1901,9 @@ port_action_handle_flush(portid_t port_id)
pia->id);
ret = port_flow_complain(&error);
}
- tmp = &pia->next;
- } else {
- *tmp = pia->next;
- free(pia);
}
+ *tmp = pia->next;
+ free(pia);
}
return ret;
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-12 18:40:14.793739845 +0800
+++ 0010-app-testpmd-fix-indirect-action-flush.patch 2024-07-12 18:40:13.916594250 +0800
@@ -1 +1 @@
-From ecf408d2aa5e8952aac956b001f3ff1de1af1df0 Mon Sep 17 00:00:00 2001
+From 2f51a0fdfb6152de1186000634aba86be17d6bcc Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit ecf408d2aa5e8952aac956b001f3ff1de1af1df0 ]
@@ -16 +18,0 @@
-Cc: stable at dpdk.org
@@ -26 +28 @@
-index ba1007ace6..f62ba90c87 100644
+index 6d605556ff..c7d3a968c1 100644
@@ -29 +31 @@
-@@ -1918,8 +1918,7 @@ port_action_handle_flush(portid_t port_id)
+@@ -1891,8 +1891,7 @@ port_action_handle_flush(portid_t port_id)
@@ -39 +41 @@
-@@ -1929,11 +1928,9 @@ port_action_handle_flush(portid_t port_id)
+@@ -1902,11 +1901,9 @@ port_action_handle_flush(portid_t port_id)
More information about the stable
mailing list