summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmit Gupta <agupta3@marvell.com>2019-08-07 18:42:09 +0530
committerThomas Monjalon <thomas@monjalon.net>2019-08-08 12:13:05 +0200
commit8b36297d15f90265b50fae211157dff573513359 (patch)
treef4ad5c3f89e269de46b8fdce8610773218328d41
parentde4473d911323ae1d26581c2f85abee5d1aaeb81 (diff)
downloaddpdk-8b36297d15f90265b50fae211157dff573513359.zip
dpdk-8b36297d15f90265b50fae211157dff573513359.tar.gz
dpdk-8b36297d15f90265b50fae211157dff573513359.tar.xz
app/testpmd: fix latency stats deinit on signal
On receiving signal, testpmd showing warning as "LATENCY_STATS: failed to remove Rx/Tx callback" because rte_latencystats_uninit is called without checking if latencystats is enabled or not. After this fix, rte_latencystats_uninit will be called only if latencystats is enabled. Fixes: 62d3216d6194 ("app/testpmd: add latency statistics calculation") Cc: stable@dpdk.org Signed-off-by: Amit Gupta <agupta3@marvell.com> Acked-by: Jerin Jacob <jerinj@marvell.com> Tested-by: Jerin Jacob <jerinj@marvell.com>
-rw-r--r--app/test-pmd/testpmd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index a461cef..e8e2a39 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -3212,7 +3212,8 @@ signal_handler(int signum)
rte_pdump_uninit();
#endif
#ifdef RTE_LIBRTE_LATENCY_STATS
- rte_latencystats_uninit();
+ if (latencystats_enabled != 0)
+ rte_latencystats_uninit();
#endif
force_quit();
/* Set flag to indicate the force termination. */