summaryrefslogtreecommitdiffstats
path: root/src/vlib/stats
AgeCommit message (Collapse)AuthorFilesLines
2022-05-19stats: fix collector updates of symlinksArthur de Kerhor1-3/+9
A node name is not bound to a node index. For example, if an interface is deleted and re-added, the indexes of its nodes "<itfc_name>-tx" and "<itfc_name>-output" may change. Thus, when the collector updates the nodes stats, it should first delete all the symlinks for nodes that have changed their names before adding new symlinks. Otherwise, it could attempt to add already existing symlinks or delete valid ones. Example of a series of command that triggers a crash in the assert `ASSERT (node_data[i].symlinks[j] != CLIB_U32_MAX);`: ``` create loopback interface create loopback interface ``` Wait for the nodes stats to update, then: ``` delete loopback interface intfc loop0 delete loopback interface intfc loop1 create loopback interface create loopback interface ``` Type: fix Change-Id: Ief8e7135e5c02dc6bc64dc94b76cff21ea9ab3a9 Signed-off-by: Arthur de Kerhor <arthurdekerhor@gmail.com>
2022-05-06stats: add vlib_stats_free_string_vectorDamjan Marion2-0/+8
Type: improvement Change-Id: Ifa9f908b24b5fe867826601d32eeb4f0d639fbeb Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-05-06stats: strings in string vector are c stringsDamjan Marion1-0/+1
Type: fix Change-Id: I9cf9376f2813f7bceecc6a9d714dcb98df77615d Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-04-26stats: string vector and node collector improvementsDamjan Marion4-109/+149
Type: improvement Change-Id: Ibdadeb4e685f45a93f45504a84709391489abb6a Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-04-15stats: store heap in the directory_entry vectorDamjan Marion2-15/+2
Type: improvement Change-Id: I878803d14d1070ef5a00ed9d3f72022906d55191 Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-04-08stats: fix vector overrun in expend checkDmitry Valter1-2/+2
Do not access allocated elements beyond the end of the vector. They are allocated, but not yet valid both logically (they are at best NULLs) and according to ASAN. Type: fix Change-Id: Iaf43767d6d3bd4c24c7c5a0ba9b3410bbeeb0556 Signed-off-by: Dmitry Valter <d-valter@yandex-team.ru>
2022-04-06stats: avoid linear search for empty entryDamjan Marion3-10/+16
Type: improvement Change-Id: Ie4cdc6d8906da3d1cd18a8f1d7076283546d3003 Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-03-31stats: use vlib_stats_validate in collectorDamjan Marion1-28/+5
Type: refactor Change-Id: Ib2bf9f11209eb310b289b3202b2beeccc3637df0 Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-03-31stats: convert error counters to normal countersDamjan Marion4-68/+0
Change-Id: I9794da718805b40cc922e4f3cf316255398029a9 Type: improvement Signed-off-by: Damjan Marion <damarion@cisco.com> Signed-off-by: Ole Troan <ot@cisco.com>
2022-03-23stats: fix crash due to pointer taken before validateDamjan Marion1-2/+4
Type: fix Change-Id: Iee9eab18da142bfe0645761deea13b0fe911a43b Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-03-21stats: fix vlib_stats_validate_will_expand_internalDamjan Marion1-2/+2
Type: fix Change-Id: If4c0b23aaa4fc57c0783efcbe349aba5e5885b30 Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-03-14stats: refactor vlib countersDamjan Marion4-112/+171
Change-Id: I09d2da73eff42c52ba1373acc99ff28f283a6725 Type: improvement Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-03-14stats: support recursive lockingDamjan Marion3-5/+32
Type: improvement Change-Id: I85dd3d34bcb175dd68dda34a58cd454848a0fc2b Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-03-09stats: refactorDamjan Marion8-0/+1381
Type: refactor Change-Id: Ifd533a095d979dc55bfbe5fac7e0b7510a4d900c Signed-off-by: Damjan Marion <damarion@cisco.com>