[dpdk-dev] [PATCH 1/2] lib/metrics: fix to reset the init flag
David Marchand
david.marchand at redhat.com
Tue May 19 11:31:54 CEST 2020
On Wed, May 13, 2020 at 12:39 PM Hemant Agrawal <hemant.agrawal at nxp.com> wrote:
>
> metrics_initialized shall be reset in deinit function
> This is currently causing issue in running
> metrics_autotest mulutiple times
>
> Fixes: 07c1b6925b65 ("telemetry: invert dependency on metrics library")
>
> Signed-off-by: Hemant Agrawal <hemant.agrawal at nxp.com>
> ---
> lib/librte_metrics/rte_metrics.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/lib/librte_metrics/rte_metrics.c b/lib/librte_metrics/rte_metrics.c
> index e07670219..f570cf226 100644
> --- a/lib/librte_metrics/rte_metrics.c
> +++ b/lib/librte_metrics/rte_metrics.c
> @@ -96,6 +96,8 @@ rte_metrics_deinit(void)
> stats = memzone->addr;
> memset(stats, 0, sizeof(struct rte_metrics_data_s));
>
> + metrics_initialized = 0;
> +
> return rte_memzone_free(memzone);
Should this flag be reset only if rte_memzone_free succeeds?
--
David Marchand
More information about the dev
mailing list