summaryrefslogtreecommitdiffstats
path: root/src/vlib/error.c
AgeCommit message (Collapse)AuthorFilesLines
2019-10-25vlib: address vlib_error_t scaling issueDave Barach1-13/+19
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> (cherry picked from commit 687c9021fda009caa2b7eb17bea2eaa51d275bde)
2019-06-21stats: fix memory leakage when adding / deleting interfacesOle Troan1-3/+4
This fixes two leaks in registering errors in the stats segment. - The error name created by vlib_register_errors() was not freed. - Duplicate error names (when interface readded) was added to the vector. Change-Id: If5fe371e8059cf6678fc785cbf673707b4f4a655 Type: fix Signed-off-by: Ole Troan <ot@cisco.com>
2019-06-18acl vnet vlib: memory leaksSteven Luong1-11/+12
Fix memory leaks in acl, vnet, and vlib components. Type: fix Change-Id: I61c84ebbacbbf3215db0d4aaa7699e8d5f8df2da Signed-off-by: Steven Luong <sluong@cisco.com> (cherry picked from commit 4221c8de596f3f3f66b4cbb36ad2d0c23486030c)
2019-01-24move misc-drop-errors to vnetDave Barach1-31/+0
thanks, Eliot... Change-Id: I8d8fee09bf1fe24933e6ef4e126dba8e22fe62b1 Signed-off-by: Dave Barach <dave@barachs.net>
2018-11-13vlib rename vlib_frame_args(...) to vlib_frame_scalar_args(..)Damjan Marion1-1/+1
Typically we have scalar_size == 0, so it doesn't matter but vlib_frame_args was providing pointer to scalar frame data, not vector data. To avoid future confusion function is renamed to vlib_frame_scalar_args(...) Change-Id: I48b75523b46d487feea24f3f3cb10c528dde516f Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-10-23c11 safe string handling supportDave Barach1-3/+3
Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab Signed-off-by: Dave Barach <dave@barachs.net>
2018-09-17STATS: Dynamically mapped shared memory segmentOle Troan1-3/+5
Move from using a hash to a vector with offsets into shared memory. Limit exposure of VPP data structures and include files to external stats library and applications. Change-Id: Ic06129f12d10cf4c4946a86d9bc734eacff2c7da Signed-off-by: Ole Troan <ot@cisco.com>
2018-08-29STATS: stat_client updates.Ole Troan1-1/+1
New stat segment client library: vpp-api/client/stat_client.h New stat segment query app: vpp_get_stats [ls | dump | poll ] <pattern ...> Prometheus integration through: vpp_prometheus_export <pattern> Change-Id: I6f370cf599e9fcf066f22965a62d3a8acd529994 Signed-off-by: Ole Troan <ot@cisco.com>
2018-06-15STATS: Add more hierarchy to counters.Ole Troan1-1/+1
Put error counters under node_index. /err/<node-name>/<error-name> E.g: /err/ip4-lookup/Hash table collisions /err/ip6-rewrite/Buffer allocation error Error names are not globally unique, and this allows for walking all errors for a particular node. Put interface counters under the directory /if. E.g. /if/rx Put system counters under the directory /sys. E.g. /sys/vector_rate Change-Id: I5b794d16698f61bcb2063a8cd77a7c4ae36419b8 Signed-off-by: Ole Troan <ot@cisco.com>
2018-06-08export counters in a memfd segmentDave Barach1-1/+36
also export per-node error counters directory entries implement object types Change-Id: I8ce8e0a754e1be9de895c44ed9be6533b4ecef0f Signed-off-by: Dave Barach <dave@barachs.net>
2017-08-02Fix tcp tx buffer allocationFlorin Coras1-1/+1
- Make tcp output buffer allocation macro an inline function - Use per ip version per thread tx frames for retransmits and timer events - Fix / parameterize tcp data structure preallocation - Add a couple of gdb-callable show commands - Fix local endpoint cleanup Change-Id: I67b47b7570aa14cb4634b6fd93c57cd2eacbfa29 Signed-off-by: Florin Coras <fcoras@cisco.com> Signed-off-by: Dave Barach <dave@barachs.net>
2017-04-06Use thread local storage for thread indexDamjan Marion1-1/+1
This patch deprecates stack-based thread identification, Also removes requirement that thread stacks are adjacent. Finally, possibly annoying for some folks, it renames all occurences of cpu_index and cpu_number with thread index. Using word "cpu" is misleading here as thread can be migrated ti different CPU, and also it is not related to linux cpu index. Change-Id: I68cdaf661e701d2336fc953dcb9978d10a70f7c1 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-12-28Reorganize source tree to use single autotools instanceDamjan Marion1-0/+338
Change-Id: I7b51f88292e057c6443b12224486f2d0c9f8ae23 Signed-off-by: Damjan Marion <damarion@cisco.com>