[v2,32/33] testpmd: force flow flush

Message ID 20220413160932.2074781-33-kevinx.liu@intel.com (mailing list archive)
State Superseded, archived
Headers
Series support full function of DCF |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Kevin Liu April 13, 2022, 4:09 p.m. UTC
  From: Qi Zhang <qi.z.zhang@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@intel.com>
Signed-off-by: Kevin Liu <kevinx.liu@intel.com>
---
 app/test-pmd/config.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
  

Patch

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;