[dpdk-dev] [PATCH] app/testpmd: remove warning on flex flow flush
David Marchand
david.marchand at redhat.com
Tue Nov 2 19:38:48 CET 2021
Building DPDK without JSON, warnings get displayed when stopping testpmd
without entering any flex flow rule.
Fixes: 59f3a8acbcdb ("app/testpmd: add flex item commands")
Signed-off-by: David Marchand <david.marchand at redhat.com>
---
app/test-pmd/cmd_flex_item.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/app/test-pmd/cmd_flex_item.c b/app/test-pmd/cmd_flex_item.c
index 45103e45a8..337dcdd565 100644
--- a/app/test-pmd/cmd_flex_item.c
+++ b/app/test-pmd/cmd_flex_item.c
@@ -415,6 +415,8 @@ port_flex_item_flush(portid_t port_id)
uint16_t i;
for (i = 0; i < FLEX_MAX_PARSERS_NUM; i++) {
+ if (flex_items[port_id][i] == NULL)
+ continue;
flex_item_destroy(port_id, i);
flex_items[port_id][i] = NULL;
}
--
2.23.0
More information about the dev
mailing list