summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRay Kinsella <mdr@ashroe.eu>2021-05-27 15:59:39 +0100
committerOle Tr�an <otroan@employees.org>2021-08-31 12:13:49 +0000
commitc30157811e4c8e870d2680b08ecd3a38dff2d53b (patch)
treee41c653316ffedca9ca82dffb03b5fd18630ddd9
parent40ba69271b27beca78eb8e4dbc5b13c05100299a (diff)
stats: stat_validate_counter_vector3 non-static
Make stat_validate_counter_vector3 usable outside of stats segement. Is used by the perfmon plugin to allocate a 2-dimension array of values. Type: improvement Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: If4be2e14ba718c20bf939d162e580880eab1a6cb
-rw-r--r--src/vpp/stats/stat_segment.h3
-rw-r--r--src/vpp/stats/stat_segment_provider.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/vpp/stats/stat_segment.h b/src/vpp/stats/stat_segment.h
index f5862a684e4..2858003bb73 100644
--- a/src/vpp/stats/stat_segment.h
+++ b/src/vpp/stats/stat_segment.h
@@ -111,6 +111,9 @@ void stat_segment_set_state_counter (u32 index, u64 value);
void stat_segment_poll_add (u32 vector_index, stat_segment_update_fn update_fn,
u32 caller_index, u32 interval);
+counter_t **stat_validate_counter_vector3 (counter_t **counters, u32 max1,
+ u32 max2);
+
u32 stat_segment_new_entry (u8 *name, stat_directory_type_t t);
void vlib_stats_register_mem_heap (clib_mem_heap_t *heap);
void vlib_stat_segment_lock (void);
diff --git a/src/vpp/stats/stat_segment_provider.c b/src/vpp/stats/stat_segment_provider.c
index 766261ce0e0..30e03be45b9 100644
--- a/src/vpp/stats/stat_segment_provider.c
+++ b/src/vpp/stats/stat_segment_provider.c
@@ -63,7 +63,7 @@ stat_provider_mem_usage_update_fn (stat_segment_directory_entry_t *e,
cb[STAT_MEM_RELEASABLE] = usage.bytes_overhead;
}
-static counter_t **
+counter_t **
stat_validate_counter_vector3 (counter_t **counters, u32 max1, u32 max2)
{
stat_segment_main_t *sm = &stat_segment_main;