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

luca.boccassi at gmail.com luca.boccassi at gmail.com
Fri Feb 5 12:16:00 CET 2021


Hi,

FYI, your patch has been queued to stable release 20.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 02/07/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/bluca/dpdk-stable

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

Thanks.

Luca Boccassi

---
>From 3e33fc7c8b0f68d34f3053daafd591245e712f25 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 33a060dffd..2b60f6c5d3 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2734,6 +2734,9 @@ stop_port(portid_t pid)
 			}
 		}
 
+		if (port->flow_list)
+			port_flow_flush(pi);
+
 		if (rte_eth_dev_stop(pi) != 0)
 			RTE_LOG(ERR, EAL, "rte_eth_dev_stop failed for port %u\n",
 				pi);
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:32.579515480 +0000
+++ 0074-app-testpmd-release-flows-left-before-port-stop.patch	2021-02-05 11:18:28.850691949 +0000
@@ -1 +1 @@
-From 0f93edbf7c874480e21e365f527fecdb305984b9 Mon Sep 17 00:00:00 2001
+From 3e33fc7c8b0f68d34f3053daafd591245e712f25 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0f93edbf7c874480e21e365f527fecdb305984b9 ]
+
@@ -14,2 +15,0 @@
-
-Cc: stable at dpdk.org


More information about the stable mailing list