metrics_initialized shall be reset in deinit function.
This is currently causing issue in running metrics_autotest
multiple times.
Fixes:
07c1b6925b65 ("telemetry: invert dependency on metrics library")
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: David Marchand <david.marchand@redhat.com>
{
struct rte_metrics_data_s *stats;
const struct rte_memzone *memzone;
+ int ret;
if (rte_eal_process_type() != RTE_PROC_PRIMARY)
return -EINVAL;
stats = memzone->addr;
memset(stats, 0, sizeof(struct rte_metrics_data_s));
- return rte_memzone_free(memzone);
-
+ ret = rte_memzone_free(memzone);
+ if (ret == 0)
+ metrics_initialized = 0;
+ return ret;
}
int