|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
21 stat_reader::stat_indexes_t stat_reader::m_stat_itf_indexes;
46 stat_reader::registers(
const interface& intf)
48 m_stat_itf_indexes.insert(intf.handle_i().
value());
52 stat_reader::unregisters(
const interface& intf)
54 m_stat_itf_indexes.erase(intf.handle_i().value());
60 std::set<std::shared_ptr<interface>> itfs_w_stats;
63 for (
auto& sde : sd) {
66 if (sde.name().empty())
71 if (
name.find(
"/if") != std::string::npos)
85 data = sde.get_stat_segment_simple_counter_data();
87 for (
auto&
i : m_stat_itf_indexes) {
97 itfs_w_stats.insert(itf);
106 data = sde.get_stat_segment_combined_counter_data();
108 for (
auto&
i : m_stat_itf_indexes) {
119 itfs_w_stats.insert(itf);
126 for (
auto itf : itfs_w_stats) {
127 itf->publish_stats();
@ STAT_DIR_TYPE_COUNTER_VECTOR_COMBINED
int connect()
Connect to stat segment.
The VPP Object Model (VOM) library.
@ STAT_DIR_TYPE_NAME_VECTOR
uint32_t value() const
get the value of the handle
virtual int connect()
connection to stat object
@ STAT_DIR_TYPE_COUNTER_VECTOR_SIMPLE
void disconnect()
Disconnect to stat segment.
virtual void read()
read stats for registered objects from stat_segment and set those stats to respective objects
Combined counter to hold both packets and byte differences.
int vec_len(void *vec)
Get vector length of VPP style vector.
~stat_reader()
Destructor.
A representation of an interface in VPP.
std::vector< stat_data_t > stat_data_vec_t
vector of stat_data_t
@ STAT_DIR_TYPE_SCALAR_INDEX
stat_reader()
Default Constructor.
A representation of a stat client in VPP.
const stat_data_vec_t & dump()
dump all the stats for given pattern
virtual void disconnect()
disconnect to stat object
@ STAT_DIR_TYPE_ERROR_INDEX
static std::shared_ptr< interface > find(const handle_t &h)
The the singular instance of the interface in the DB by handle.