From: Bruce Richardson Date: Fri, 15 Jan 2021 11:10:45 +0000 (+0000) Subject: metrics: fix variable declaration in header X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=701283309404e394693fba46ed71834593af808e;p=dpdk.git metrics: fix variable declaration in header The global variable "tel_met_data" was declared in a header file, rather than in a C file, leading to duplicate definitions if more than one C file included the header. Fixes: c5b7197f662e ("telemetry: move some functions to metrics library") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson Reviewed-by: David Marchand --- diff --git a/lib/librte_metrics/rte_metrics_telemetry.c b/lib/librte_metrics/rte_metrics_telemetry.c index 901cbeb0a3..b8ee56ef01 100644 --- a/lib/librte_metrics/rte_metrics_telemetry.c +++ b/lib/librte_metrics/rte_metrics_telemetry.c @@ -13,6 +13,8 @@ #include "rte_metrics.h" #include "rte_metrics_telemetry.h" +struct telemetry_metrics_data tel_met_data; + int metrics_log_level; /* Logging Macros */ diff --git a/lib/librte_metrics/rte_metrics_telemetry.h b/lib/librte_metrics/rte_metrics_telemetry.h index 3435a55425..5dbb32ca0c 100644 --- a/lib/librte_metrics/rte_metrics_telemetry.h +++ b/lib/librte_metrics/rte_metrics_telemetry.h @@ -34,8 +34,6 @@ struct telemetry_metrics_data { int metrics_register_done; }; -struct telemetry_metrics_data tel_met_data; - __rte_experimental int32_t rte_metrics_tel_reg_all_ethdev(int *metrics_register_done, int *reg_index_list);