From 687c9021fda009caa2b7eb17bea2eaa51d275bde Mon Sep 17 00:00:00 2001 From: Dave Barach Date: Tue, 23 Jul 2019 10:22:31 -0400 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 Change-Id: I28101cad3d8750819e27b8785fc0cf71ff54f79a Signed-off-by: Dave Barach --- src/plugins/map/map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/map/map.c') diff --git a/src/plugins/map/map.c b/src/plugins/map/map.c index d3ae23bbf50..2f036da7ebc 100644 --- a/src/plugins/map/map.c +++ b/src/plugins/map/map.c @@ -1086,7 +1086,7 @@ map_error_counter_get (u32 node_index, map_error_t map_error) vlib_node_t *n = vlib_get_node (vm, node_index); u32 ci; - ci = vlib_error_get_code (e); + ci = vlib_error_get_code (&vm->node_main, e); ASSERT (ci < n->n_errors); ci += n->error_heap_index; -- cgit 1.2.3-korg