From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C66E2A0A02; Thu, 14 Jan 2021 08:15:03 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 92603140EBA; Thu, 14 Jan 2021 08:15:03 +0100 (CET) Received: from inbox.dpdk.org (xvm-172-178.dc0.ghst.net [95.142.172.178]) by mails.dpdk.org (Postfix) with ESMTP id CFF27140CF5 for ; Thu, 14 Jan 2021 08:15:01 +0100 (CET) Received: by inbox.dpdk.org (Postfix, from userid 33) id AFEF3A0A03; Thu, 14 Jan 2021 08:15:01 +0100 (CET) From: bugzilla@dpdk.org To: dev@dpdk.org Date: Thu, 14 Jan 2021 07:15:01 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: DPDK X-Bugzilla-Component: testpmd X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: qinx.sun@intel.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: dev@dpdk.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.dpdk.org/ Auto-Submitted: auto-generated X-Auto-Response-Suppress: All MIME-Version: 1.0 Subject: [dpdk-dev] [Bug 613] [21.02] rule lost after port stopped X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" https://bugs.dpdk.org/show_bug.cgi?id=3D613 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.sun@intel.com Target Milestone: --- create a rule in testpmd, stop port and then flow list port find that rule lost.=20 Environment DPDK version: Use make showversion or for a non-released version: git remot= e -v && git show-ref --heads 21.02.0-rc0:0144eeafd1467937a379a7dc005bcb0579b0ae5e Other software versions: name/version for QEMU, OVS, etc. Repeat as require= d. OS: CentOS8.3=C2=A0 Compiler: gcc version 8.3.1 20191121 (Red Hat 8.3.1-5) Hardware platform:=C2=A0Intel(R) Xeon(R) CPU E5-2699 v3 @ 2.30GHz NIC hardware: Ethernet Controller E810-C for SFP 1593 NIC firmware:=C2=A02.30 0x80004dcf 1.2839.0 NIC driver:=C2=A01.3.0_dirty Pkg:=C2=A0ice-comms_1.3.24.0 [reproduce steps] 1. bind to vfio-pci and create 2 vfs usertools/dpdk-devbind.py --force --bind=3Dvfio-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=3Ddcf -a 0000:03:01.1 --file-prefix=3Ddpdk_1965_202101141= 14229=20=20 -- -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 =3D> VF 5.stop port 0=20 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 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: stable@dpdk.org Signed-off-by: Gregory Etelson Acked-by: Ori Kam Acked-by: Ajit Khaparde --=20 You are receiving this mail because: You are the assignee for the bug.=