diff options
author | Ole Troan <ot@cisco.com> | 2020-04-21 17:54:41 +0200 |
---|---|---|
committer | Andrew Yourtchenko <ayourtch@gmail.com> | 2020-08-18 08:50:04 +0000 |
commit | 6a974ff25e7a0ea6ad65c3e1285fd3bd0a25c1de (patch) | |
tree | 559a5056b4d8dd93047d08c37a5ccfe354fa9558 /src/vlib/counter.h | |
parent | 16845adf79f2dcd2fc33147713fa5d4ae9c1beaa (diff) |
stats: add apis to delete simple/combined counters
vlib_free_simple_counter()
vlib_free_combined_counter()
Frees the name and two dimensional vector from the stats segment.
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: If1becf7d09520ba41a3d59e2df94958ecfcf6948
(cherry picked from commit a568a19b2956ed8b94b11c2ef041412473dc8442)
Diffstat (limited to 'src/vlib/counter.h')
-rw-r--r-- | src/vlib/counter.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vlib/counter.h b/src/vlib/counter.h index 092bd00c879..e9978ba25f5 100644 --- a/src/vlib/counter.h +++ b/src/vlib/counter.h @@ -304,6 +304,8 @@ vlib_zero_combined_counter (vlib_combined_counter_main_t * cm, u32 index) void vlib_validate_simple_counter (vlib_simple_counter_main_t * cm, u32 index); +void vlib_free_simple_counter (vlib_simple_counter_main_t * cm); + /** validate a combined counter @param cm - (vlib_combined_counter_main_t *) pointer to the counter collection @@ -312,6 +314,7 @@ void vlib_validate_simple_counter (vlib_simple_counter_main_t * cm, void vlib_validate_combined_counter (vlib_combined_counter_main_t * cm, u32 index); +void vlib_free_combined_counter (vlib_combined_counter_main_t * cm); /** Obtain the number of simple or combined counters allocated. A macro which reduces to to vec_len(cm->maxi), the answer in either |