stats: add vlib_stats_free_string_vector

Type: improvement
Change-Id: Ifa9f908b24b5fe867826601d32eeb4f0d639fbeb
Signed-off-by: Damjan Marion <damarion@cisco.com>
This commit is contained in:
Damjan Marion
2022-05-06 12:39:10 +02:00
committed by Beno�t Ganne
parent 6d953240bc
commit 0530d09f9e
2 changed files with 8 additions and 0 deletions

View File

@ -348,6 +348,13 @@ vlib_stats_set_string_vector (vlib_stats_string_vector_t *svp,
vlib_stats_segment_unlock ();
}
void
vlib_stats_free_string_vector (vlib_stats_string_vector_t *sv)
{
vlib_stats_header_t *sh = vec_header (*sv);
vlib_stats_remove_entry (sh->entry_index);
}
u32
vlib_stats_add_counter_vector (char *fmt, ...)
{

View File

@ -144,6 +144,7 @@ typedef u8 **vlib_stats_string_vector_t;
vlib_stats_string_vector_t vlib_stats_add_string_vector (char *fmt, ...);
void vlib_stats_set_string_vector (vlib_stats_string_vector_t *sv, u32 index,
char *fmt, ...);
void vlib_stats_free_string_vector (vlib_stats_string_vector_t *sv);
/* symlink */
u32 vlib_stats_add_symlink (u32 entry_index, u32 vector_index, char *fmt, ...);