From 70449b9b9bf8dbe3b4aa4d9af35c759789b03fe1 Mon Sep 17 00:00:00 2001 From: Steven Luong Date: Wed, 20 Nov 2019 11:20:08 -0800 Subject: vlib: address vlib_error_t scaling issue Encoding the vpp node index into the vlib_error_t as a 10-bit quantity limits us to 1K graph nodes. Unfortunately, a few nodes need 6 bit per-node error codes. Only a very few nodes have so many counters. It turns out that there are about 2K total error counters in the system, which is (approximately) the maximum error heap index. The current (index,code) encoding limits the number of interfaces to around 250, since each interface has two associated graph nodes and we have about 500 "normal, interior" graph node This patch adds an error-index to node-index map, so we can store error heap indices directly in the vlib_buffer_t. Type: refactor Signed-off-by: Steven Luong Change-Id: Ic2e91a5b344c9df3b98b264cacda246e06092a94 --- src/vlib/threads.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/vlib/threads.c') diff --git a/src/vlib/threads.c b/src/vlib/threads.c index 56f9d790ee6..5bd94760456 100644 --- a/src/vlib/threads.c +++ b/src/vlib/threads.c @@ -856,6 +856,7 @@ start_workers (vlib_main_t * vm) /* zap the (per worker) frame freelists, etc */ nm_clone->frame_sizes = 0; nm_clone->frame_size_hash = hash_create (0, sizeof (uword)); + nm_clone->node_by_error = nm->node_by_error; /* Packet trace buffers are guaranteed to be empty, nothing to do here */ @@ -1175,6 +1176,7 @@ vlib_worker_thread_node_refork (void) nm_clone->processes = vec_dup_aligned (nm->processes, CLIB_CACHE_LINE_BYTES); + nm_clone->node_by_error = nm->node_by_error; } void -- cgit 1.2.3-korg