Thread (6 messages) 6 messages, 4 authors, 2020-11-17

Re: [dpdk-dev] [PATCH] app/testpmd: fix flow rules list after port stop

From: Ferruh Yigit <hidden>
Date: 2020-08-25 15:51:42

Possibly related (same subject, not in this thread)

On 8/20/2020 9:40 AM, Gregory Etelson wrote:
Hello,

Is this patch scheduled for merge with dpdk.org ?
Please update me.

Regards,
Gregory
quoted
-----Original Message-----
From: Gregory Etelson <redacted>
Sent: Monday, August 10, 2020 19:15
To: dev@dpdk.org
Cc: Gregory Etelson <redacted>; Matan Azrad
[off-list ref]; Raslan Darawsheh [off-list ref];
stable@dpdk.org; Ori Kam [off-list ref]; Wenzhuo Lu
[off-list ref]; Beilei Xing [off-list ref]; Bernard
Iremonger [off-list ref]
Subject: [PATCH] app/testpmd: fix flow rules list after port stop

According to current RTE API, port flow rules must not be kept after port
stop.
Hi Gregory, Ori,

Can you please point where this is documented?
quoted
Testpmd did not flush port flow rules after `port stop' command was called.
As the result, after the port was restarted, it showed bogus flow rules.
There are two issues,

1) According what I see in the rte_flow documentation, not sure if the "port
stop" should clear the rules:
"
PMDs, not applications, are responsible for maintaining flow rules configuration
when stopping and restarting a port or performing other actions which may affect
them. They can only be destroyed explicitly by applications.
"

As I tested with i40e, it keeps the rules after stop/start, cc'ing @Jeff,
@Beilei & @Qi if this is done intentionally.


2) From the perspective of the testers, users of the testpmd. If they are
testing a complex set of filter rules, stopping and starting the port flushing
all rules may be troublesome.
Since there is explicit command to remove a rte_flow rule or to remove them all,
user may prefer to call it when required to delete the rules, instead of this is
done implicitly in port stop.

Btw, this is based on PMD should handle the rules on stop/start, we need to
agree on it first, but even that is not the case, we are in the application
domain now and we can apply the rules back again in the 'start' if it serves
better to the user.

quoted
Fixes: ce8d561418d4 ("app/testpmd: add port configuration settings")

Cc: stable@dpdk.org

Signed-off-by: Gregory Etelson <redacted>
Acked-by: Ori Kam <redacted>
---
 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
7842c3b781..4ba5c41c6e 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2627,6 +2627,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.25.1
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help