summaryrefslogtreecommitdiffstats
path: root/src/vlib/stats/init.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2022-04-06 12:06:41 +0200
committerOle Tr�an <otroan@employees.org>2022-04-06 11:25:03 +0000
commiteecec8ceba7dcd572ff557726e7e253488b13656 (patch)
treee7964d2e0798bf9248acc9a1ef3c0ae055a3aee4 /src/vlib/stats/init.c
parent8271dfdff3cf65e3b077e149d4600bd90d2b4b03 (diff)
stats: avoid linear search for empty entry
Type: improvement Change-Id: Ie4cdc6d8906da3d1cd18a8f1d7076283546d3003 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlib/stats/init.c')
-rw-r--r--src/vlib/stats/init.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/vlib/stats/init.c b/src/vlib/stats/init.c
index 3cfbd2dbd66..2a7b6f53c53 100644
--- a/src/vlib/stats/init.c
+++ b/src/vlib/stats/init.c
@@ -98,6 +98,7 @@ vlib_stats_init (vlib_main_t *vm)
/* Set up the name to counter-vector hash table */
sm->directory_vector = 0;
+ sm->dir_vector_first_free_elt = CLIB_U32_MAX;
shared_header->epoch = 1;