[dpdk-stable] [PATCH 18.11] app/testpmd: fix xstats clear

Kevin Traynor ktraynor at redhat.com
Wed Sep 16 11:58:44 CEST 2020


rte_eth_xstats_reset() was mistakenly removed from
nic_xstats_clear() in fixed commit during rebasing.

This caused the xstats not be be cleared when
'clear port xstats all' was executed from the testpmd
command line.

Fix by adding back rte_eth_xstats_reset().

Fixes: 3e64dd9f527d ("app/testpmd: fix stats error message")

Cc: Wei Hu (Xavier) <xavier.huwei at huawei.com>
Signed-off-by: Kevin Traynor <ktraynor at redhat.com>
---
 app/test-pmd/config.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 3b588e2042..3d854099d2 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -319,4 +319,5 @@ nic_xstats_clear(portid_t port_id)
 		return;
 	}
+	rte_eth_xstats_reset(port_id);
 
 	ret = rte_eth_stats_get(port_id, &ports[port_id].stats);
-- 
2.26.2



More information about the stable mailing list