vlib: address vlib_error_t scaling issue 71/23571/2 stable/1901
authorSteven Luong <[email protected]>
Wed, 20 Nov 2019 19:20:08 +0000 (11:20 -0800)
committerDave Barach <[email protected]>
Mon, 25 Nov 2019 15:05:51 +0000 (15:05 +0000)
commit70449b9b9bf8dbe3b4aa4d9af35c759789b03fe1
tree13faf049d3007a5a3314e69680bb6f652cb84529
parentac0e98a67553747b823d8398896559bb07cafe3d
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 <[email protected]>
Change-Id: Ic2e91a5b344c9df3b98b264cacda246e06092a94
src/plugins/map/map.c
src/vlib/error.c
src/vlib/error.h
src/vlib/node.c
src/vlib/node.h
src/vlib/threads.c
src/vnet/interface_output.c