aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib/threads.c
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2019-07-23 10:22:31 -0400
committerFlorin Coras <florin.coras@gmail.com>2019-07-23 17:02:04 +0000
commit687c9021fda009caa2b7eb17bea2eaa51d275bde (patch)
treef4b1ab097c40477a847d902430abdea5bf31acc3 /src/vlib/threads.c
parent3b7261978ee4ffdc1e92336e708ae05e2be25f71 (diff)
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 Change-Id: I28101cad3d8750819e27b8785fc0cf71ff54f79a Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/vlib/threads.c')
-rw-r--r--src/vlib/threads.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vlib/threads.c b/src/vlib/threads.c
index e59919e7a26..49b6e811240 100644
--- a/src/vlib/threads.c
+++ b/src/vlib/threads.c
@@ -845,6 +845,7 @@ start_workers (vlib_main_t * vm)
#ifdef VLIB_SUPPORTS_ARBITRARY_SCALAR_SIZES
nm_clone->frame_size_hash = hash_create (0, sizeof (uword));
#endif
+ nm_clone->node_by_error = nm->node_by_error;
/* Packet trace buffers are guaranteed to be empty, nothing to do here */
@@ -1182,6 +1183,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