[dpdk-stable] [dpdk-dev] [PATCH] app/testpmd: fix latencystats deinit on signal

Jerin Jacob Kollanukkaran jerinj at marvell.com
Thu Aug 8 10:54:14 CEST 2019


> -----Original Message-----
> From: dev <dev-bounces at dpdk.org> On Behalf Of agupta3 at marvell.com
> Sent: Wednesday, August 7, 2019 6:42 PM
> To: Wenzhuo Lu <wenzhuo.lu at intel.com>; Jingjing Wu
> <jingjing.wu at intel.com>; Bernard Iremonger <bernard.iremonger at intel.com>
> Cc: dev at dpdk.org; stable at dpdk.org; Amit Gupta <agupta3 at marvell.com>
> Subject: [dpdk-dev] [PATCH] app/testpmd: fix latencystats deinit on signal
> 
> From: Amit Gupta <agupta3 at marvell.com>
> 
> 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 onlyif latencystats is enabled.
> 
> Fixes: 62d3216d6194 ("app/testpmd: add latency statistics calculation")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Amit Gupta <agupta3 at marvell.com>

Acked-by: Jerin Jacob <jerinj at marvell.com>
Tested-by: Jerin Jacob <jerinj at marvell.com>

> ---
>  app/test-pmd/testpmd.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> 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 @@ uint8_t port_is_bonding_slave(portid_t slave_pid)
>  		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. */
> --
> 1.8.3.1



More information about the stable mailing list