From 871dc4287d8c05ff76106dba4f5f8654c24347fe Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Thu, 29 Mar 2018 01:28:09 -0700 Subject: Detailed stats collection feature Use device-input and interface-output feautre arcs to collect unicast, multicast and broadcast states for RX and TX resp. Since these feature arcs are present only for 'physical' interfaces (i.e. not su-interfaces) counter collection is supported only on parent interface types. Change-Id: I915c235e336b0fc3a3c3de918f95dd674e4e0e4e Signed-off-by: Neale Ranns Signed-off-by: Mohsin Kazmi --- src/vpp-api/vom/interface.hpp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'src/vpp-api/vom/interface.hpp') diff --git a/src/vpp-api/vom/interface.hpp b/src/vpp-api/vom/interface.hpp index 0099bde42ba..29903b5623b 100644 --- a/src/vpp-api/vom/interface.hpp +++ b/src/vpp-api/vom/interface.hpp @@ -41,6 +41,15 @@ class events_cmd; class interface : public object_base { public: + struct stats_type_t : public enum_base + { + const static stats_type_t DETAILED; + const static stats_type_t NORMAL; + + private: + stats_type_t(int v, const std::string& s); + }; + /** * The key for interface's key */ @@ -447,7 +456,8 @@ public: /** * Enable stats for this interface */ - void enable_stats(stat_listener& el); + void enable_stats(stat_listener& el, + const stats_type_t& st = stats_type_t::NORMAL); protected: /** @@ -540,7 +550,7 @@ private: /** * enable the interface stats in the singular instance */ - void enable_stats_i(stat_listener& el); + void enable_stats_i(stat_listener& el, const stats_type_t& st); /** * Commit the acculmulated changes into VPP. i.e. to a 'HW" write. @@ -599,6 +609,11 @@ private: */ HW::item m_l2_address; + /** + * The state of the detailed stats collection + */ + HW::item m_stats_type; + /** * Operational state of the interface */ -- cgit 1.2.3-korg