summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmit Gupta <agupta3@marvell.com>2019-08-07 18:42:09 +0530
committerKevin Traynor <ktraynor@redhat.com>2019-09-13 10:37:20 +0100
commit674a7051518386ae4e9c708410c0eb85897701af (patch)
tree2b6005229c02638f9221b08f66e54cb5e83a5bfe
parentd72296ec9756c07add4805e6344c6966d6495726 (diff)
downloaddpdk-stable-674a7051518386ae4e9c708410c0eb85897701af.zip
dpdk-stable-674a7051518386ae4e9c708410c0eb85897701af.tar.gz
dpdk-stable-674a7051518386ae4e9c708410c0eb85897701af.tar.xz
app/testpmd: fix latency stats deinit on signal
[ upstream commit 8b36297d15f90265b50fae211157dff573513359 ] 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") 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 41283b4..83b5e42 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -3078,7 +3078,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. */