diff mbox series

[14/20] metrics: fix variable declaration in header

Message ID 20210114110606.21142-15-bruce.richardson@intel.com (mailing list archive)
State Superseded, archived
Delegated to: David Marchand
Headers show
Series ensure headers have correct includes | expand


Context Check Description
ci/checkpatch success coding style OK

Commit Message

Bruce Richardson Jan. 14, 2021, 11:06 a.m. UTC
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 <bruce.richardson@intel.com>
 lib/librte_metrics/rte_metrics_telemetry.c | 2 ++
 lib/librte_metrics/rte_metrics_telemetry.h | 2 --
 2 files changed, 2 insertions(+), 2 deletions(-)
diff mbox series


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;
 int32_t rte_metrics_tel_reg_all_ethdev(int *metrics_register_done,
 		int *reg_index_list);