Skip to content

Commit

Permalink
metrics: fix variable declaration in header
Browse files Browse the repository at this point in the history
[ upstream commit 7012833 ]

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: c5b7197 ("telemetry: move some functions to metrics library")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
  • Loading branch information
bruce-richardson authored and bluca committed Feb 4, 2021
1 parent 1bc86cf commit 6946b6c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 2 additions & 0 deletions lib/librte_metrics/rte_metrics_telemetry.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
2 changes: 0 additions & 2 deletions lib/librte_metrics/rte_metrics_telemetry.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 6946b6c

Please sign in to comment.