app/testpmd: release flows left before port stop
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: speech_white <humin29@huawei.com>
This commit is contained in:
parent
a17b054a57
commit
effa2043c4
40
0233-app-testpmd-release-flows-left-before-port-stop.patch
Normal file
40
0233-app-testpmd-release-flows-left-before-port-stop.patch
Normal file
@ -0,0 +1,40 @@
|
||||
From b71d309637e90a67f7814604f3a17b696b6304ce Mon Sep 17 00:00:00 2001
|
||||
From: Gregory Etelson <getelson@nvidia.com>
|
||||
Date: Thu, 26 Nov 2020 18:43:02 +0200
|
||||
Subject: [PATCH] app/testpmd: release flows left before port stop
|
||||
|
||||
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.
|
||||
|
||||
Cc: stable@dpdk.org
|
||||
|
||||
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
|
||||
Acked-by: Ori Kam <orika@nvidia.com>
|
||||
Acked-by: Ajit Khaparde <ajit.khaparde@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 60636830b..7bede14ce 100644
|
||||
--- a/app/test-pmd/testpmd.c
|
||||
+++ b/app/test-pmd/testpmd.c
|
||||
@@ -2768,6 +2768,9 @@ stop_port(portid_t pid)
|
||||
}
|
||||
}
|
||||
|
||||
+ if (port->flow_list)
|
||||
+ port_flow_flush(pi);
|
||||
+
|
||||
if (eth_dev_stop_mp(pi) != 0)
|
||||
RTE_LOG(ERR, EAL, "rte_eth_dev_stop failed for port %u\n",
|
||||
pi);
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
Name: dpdk
|
||||
Version: 20.11
|
||||
Release: 13
|
||||
Release: 14
|
||||
Packager: packaging@6wind.com
|
||||
URL: http://dpdk.org
|
||||
%global source_version 20.11
|
||||
@ -239,6 +239,7 @@ Patch229: 0229-net-hns3-add-runtime-config-for-mailbox-limit-time.patch
|
||||
Patch230: 0230-net-hns3-fix-mailbox-communication-with-HW.patch
|
||||
Patch231: 0231-app-testpmd-support-multi-process.patch
|
||||
Patch232: 0232-app-testpmd-fix-key-for-RSS-flow-rule.patch
|
||||
Patch233: 0233-app-testpmd-release-flows-left-before-port-stop.patch
|
||||
|
||||
Summary: Data Plane Development Kit core
|
||||
Group: System Environment/Libraries
|
||||
@ -377,6 +378,9 @@ strip -g $RPM_BUILD_ROOT/lib/modules/${namer}/extra/dpdk/rte_kni.ko
|
||||
/usr/sbin/depmod
|
||||
|
||||
%changelog
|
||||
* Wed Nov 10 2021 Min Hu <humin29@huawei.com> - 20.11-14
|
||||
- release flows left before port stop
|
||||
|
||||
* Mon Nov 08 2021 Min Hu <humin29@huawei.com> - 20.11-13
|
||||
- fix PMD cannot get the RSS key.
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user