[PATCH v3 21/22] testpmd: force flow flush

Kevin Liu kevinx.liu at intel.com
Wed Apr 13 19:10:29 CEST 2022


From: Qi Zhang <qi.z.zhang at intel.com>

For mdcf, rte_flow_flush is still need to be invoked even there are
no flows be created in current instance.

Signed-off-by: Qi Zhang <qi.z.zhang at intel.com>
Signed-off-by: Kevin Liu <kevinx.liu at intel.com>
---
 app/test-pmd/config.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index cc8e7aa138..3d40e3e43d 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -2923,15 +2923,15 @@ port_flow_flush(portid_t port_id)
 
 	port = &ports[port_id];
 
-	if (port->flow_list == NULL)
-		return ret;
-
 	/* Poisoning to make sure PMDs update it in case of error. */
 	memset(&error, 0x44, sizeof(error));
 	if (rte_flow_flush(port_id, &error)) {
 		port_flow_complain(&error);
 	}
 
+	if (port->flow_list == NULL)
+		return ret;
+
 	while (port->flow_list) {
 		struct port_flow *pf = port->flow_list->next;
 
-- 
2.33.1



More information about the dev mailing list