History log of /vpp/extras/vom/vom/stat_reader.cpp
Revision Date Author Comments
# 72e31bc2 04-Feb-2020 Vladimir Isaev <visaev@netgate.com>

stats: fix state counter removal

Avoid using vec_del1() for directory vector to keep indexes valid all
the time.

There are state counters for each slave in LACP bond mode which can be
dynamically created and removed. Vector index is used to access these
counters. But also vec_del1() is used to remove counter from vector.
This function changes the index of the last element, so after this we
are unable to access ex-last element using old index.

As a result it is not possible to add-del-add two interfaces to the LACP
bond:

DBGvpp# create bond mode lacp
BondEthernet0
DBGvpp# create packet-generator interface pg1
DBGvpp# create packet-generator interface pg2
DBGvpp# bond add BondEthernet0 pg1
DBGvpp# bond add BondEthernet0 pg2
DBGvpp# bond del pg1
DBGvpp# bond del pg2
DBGvpp# bond add BondEthernet0 pg1
DBGvpp# bond add BondEthernet0 pg2
bond add: /if/lacp/1/3/partner-state is already register

Type: fix

Signed-off-by: Vladimir Isaev <visaev@netgate.com>
Change-Id: I2c86e13905eefdef6233369cd4ab5c1b53d123bd


# 703908aa 26-Feb-2019 Ole Troan <ot@cisco.com>

stats: Add interface name to sw_if_index as /if/names

Expose interface name to sw_if_index table as a directory node in the stats segment.

Change-Id: Ie50e4af01997d141880f02e3a8496bfeb91b9944
Signed-off-by: Ole Troan <ot@cisco.com>


# d8cf40b8 23-Dec-2018 Neale Ranns <nranns@cisco.com>

VOM: stats

- onnly read when connected. use bool for state
- operator<< for counter_t
- only publish stats for interfaces that have them available

Change-Id: I66a8a336a05912592851c88e3af69155d840a573
Signed-off-by: Neale Ranns <nranns@cisco.com>


# a8ac77f4 19-Dec-2018 Neale Ranns <nranns@cisco.com>

VOM: stats fixes

- double free of m_stat_data_seg
- cleanup typedefs

Change-Id: I6aeb070471b6c5c97ac4379d01bd242136f80091
Signed-off-by: Neale Ranns <nranns@cisco.com>


# 7e70ff52 14-Dec-2018 Neale Ranns <nranns@cisco.com>

VOM: fixes for stats

Change-Id: I62582123361e091e79bbcc6d71794c6f76216b25
Signed-off-by: Neale Ranns <nranns@cisco.com>


# 51edc3ab 21-Nov-2018 Mohsin Kazmi <sykazmi@cisco.com>

vom: Add support for new stats

This patch deprecates old stats and adds support for
new stats.

This implements the PULL design where client will enable
stats on objects (i.e. interfaces, etc), register a call
back function which will run once stats will be ready for
enabled object and call HW::read_stats() periodically to
read stats for enabled objects from VPP.

Change-Id: I32525a417427be87408d01f8bc93a731602ff690
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>