lib/latencystats: free up the memzone
PATCH 1/1 lib/latencystats: free up the memzone
Free up the memzone allocated during therte_latencystats_init().
Fixes 5cd3cac9ed ("latency: added new library for latency stats")
Signed-off-by Reshma Pattan <[email protected]>
--- lib/librte_latencystats/rte_latencystats.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
lib/librte_latencystats/rte_latencystats.c +7 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2017 Intel Corporation +* Copyright(c) 2018 Intel Corporation */ #include <unistd.h>
@@ -265,6 +265,7 @@ rte_latencystats_uninit(void)uint16_t qid;int ret =0 ;struct rxtx_cbs *cbs =NULL ; +const struct rte_memzone *mz =NULL ;/** De register Rx/Tx callbacks */ RTE_ETH_FOREACH_DEV (pid) {
@@ -288,6 +289,11 @@ rte_latencystats_uninit(void) } } +/* free up the memzone */ + mz =rte_memzone_lookup (MZ_RTE_LATENCY_STATS ); +if (mz) +rte_memzone_free (mz); +return 0 ; }
Signature · 1 line
2.14.4
Quoted 8 lines · Reshma Pattan
Free up the memzone allocated during the
rte_latencystats_init().Fixes 5cd3cac9ed ("latency: added new library for latency stats")Signed-off-by Reshma Pattan <[email protected]>
Acked-by Remy Horton <[email protected]>
Thomas Monjalon
Applied01/08/2018 12:36, Remy Horton:
Quoted 12 lines · Reshma Pattan
Quoted 8 lines
Free up the memzone allocated during the
rte_latencystats_init().Fixes 5cd3cac9ed ("latency: added new library for latency stats")Signed-off-by Reshma Pattan <[email protected]>Acked-by Remy Horton <[email protected]>
Applied, thanks