[dpdk-stable] patch 'app/testpmd: release flows left before port stop' has been queued to stable release 19.11.7

Christian Ehrhardt christian.ehrhardt at canonical.com
Thu Feb 4 12:29:40 CET 2021


Hi,

FYI, your patch has been queued to stable release 19.11.7

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/ba53d40b4eb900d12beeb707c3cb163e421e6e85

Thanks.

Christian Ehrhardt <christian.ehrhardt at canonical.com>

---
>From ba53d40b4eb900d12beeb707c3cb163e421e6e85 Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson at nvidia.com>
Date: Thu, 26 Nov 2020 18:43:02 +0200
Subject: [PATCH] app/testpmd: release flows left before port stop

[ upstream commit 0f93edbf7c874480e21e365f527fecdb305984b9 ]

According to RTE flow user guide, PMD will not keep flow rules after
port stop. Application resources that refer to flow rules become
obsolete after port stop and must not be used.
Testpmd maintains linked list of active flows for each port. Entries in
that list are allocated dynamically and must be explicitly released to
prevent memory leak.
The patch releases testpmd port flow_list that holds remaining flows
before port is stopped.

Signed-off-by: Gregory Etelson <getelson at nvidia.com>
Acked-by: Ori Kam <orika at nvidia.com>
Acked-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
---
 app/test-pmd/testpmd.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index f93e459ccf..0797e634fe 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2552,6 +2552,9 @@ stop_port(portid_t pid)
 						RTE_PORT_HANDLING) == 0)
 			continue;
 
+		if (port->flow_list)
+			port_flow_flush(pi);
+
 		rte_eth_dev_stop(pi);
 
 		if (rte_atomic16_cmpset(&(port->port_status),
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:33.127196864 +0100
+++ 0125-app-testpmd-release-flows-left-before-port-stop.patch	2021-02-04 12:04:28.190789883 +0100
@@ -1 +1 @@
-From 0f93edbf7c874480e21e365f527fecdb305984b9 Mon Sep 17 00:00:00 2001
+From ba53d40b4eb900d12beeb707c3cb163e421e6e85 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0f93edbf7c874480e21e365f527fecdb305984b9 ]
+
@@ -15,2 +16,0 @@
-Cc: stable at dpdk.org
-
@@ -25 +25 @@
-index 33a060dffd..2b60f6c5d3 100644
+index f93e459ccf..0797e634fe 100644
@@ -28,3 +28,3 @@
-@@ -2734,6 +2734,9 @@ stop_port(portid_t pid)
- 			}
- 		}
+@@ -2552,6 +2552,9 @@ stop_port(portid_t pid)
+ 						RTE_PORT_HANDLING) == 0)
+ 			continue;
@@ -35,3 +35,3 @@
- 		if (rte_eth_dev_stop(pi) != 0)
- 			RTE_LOG(ERR, EAL, "rte_eth_dev_stop failed for port %u\n",
- 				pi);
+ 		rte_eth_dev_stop(pi);
+ 
+ 		if (rte_atomic16_cmpset(&(port->port_status),


More information about the stable mailing list