On 1/14/2021 7:15 AM, bugzi...@dpdk.org wrote:
https://bugs.dpdk.org/show_bug.cgi?id=613
Bug ID: 613
Summary: [21.02] rule lost after port stopped
Product: DPDK
Version: unspecified
Hardware: x86
OS: Linux
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: testpmd
Assignee: dev@dpdk.org
Reporter: qinx....@intel.com
Target Milestone: ---
create a rule in testpmd, stop port and then flow list port find that rule
lost.
Environment
DPDK version: Use make showversion or for a non-released version: git remote -v
&& git show-ref --heads
21.02.0-rc0:0144eeafd1467937a379a7dc005bcb0579b0ae5e
Other software versions: name/version for QEMU, OVS, etc. Repeat as required.
OS: CentOS8.3
Compiler: gcc version 8.3.1 20191121 (Red Hat 8.3.1-5)
Hardware platform: Intel(R) Xeon(R) CPU E5-2699 v3 @ 2.30GHz
NIC hardware: Ethernet Controller E810-C for SFP 1593
NIC firmware: 2.30 0x80004dcf 1.2839.0
NIC driver: 1.3.0_dirty
Pkg: ice-comms_1.3.24.0
[reproduce steps]
1. bind to vfio-pci and create 2 vfs
usertools/dpdk-devbind.py --force --bind=vfio-pci 0000:03:00.0
echo 2 > /sys/bus/pci/devices/0000:03:00.0/sriov_numvfs
2. start testpmd
x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1,2,3,4 -n 4 -a
0000:03:01.0,cap=dcf -a 0000:03:01.1 --file-prefix=dpdk_1965_20210114114229
-- -i
3. create a rule
testpmd> flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src
is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / udp src is 25 dst is 23 /
end actions vf id 1 / end
Flow rule #1 created
4. list rule
testpmd> flow list 0
ID Group Prio Attr Rule
0 0 0 i-- ETH IPV4 UDP => VF
5.stop port 0
testpmd> port stop 0
Stopping ports...
Checking link statuses...
Done
6.list rule
testpmd> flow list 0
testpmd>
Actual Result: rule lost after port stopped
Expected Result: The result of rule list is the same as step 4.
Regression
Is this issue a regression: (Y)
Version the regression was introduced: Specify git id if known.
commit 0f93edbf7c874480e21e365f527fecdb305984b9
Author: Gregory Etelson <getel...@nvidia.com>
Date: Thu Nov 26 18:43:02 2020 +0200
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: sta...@dpdk.org
Signed-off-by: Gregory Etelson <getel...@nvidia.com>
Acked-by: Ori Kam <or...@nvidia.com>
Acked-by: Ajit Khaparde <ajit.khapa...@broadcom.com>
cc'ed Gregory & Ori.