VOM: fixes for stats 80/16480/2
authorNeale Ranns <nranns@cisco.com>
Fri, 14 Dec 2018 13:48:02 +0000 (05:48 -0800)
committerFlorin Coras <florin.coras@gmail.com>
Sun, 16 Dec 2018 00:59:53 +0000 (00:59 +0000)
Change-Id: I62582123361e091e79bbcc6d71794c6f76216b25
Signed-off-by: Neale Ranns <nranns@cisco.com>
extras/vom/vom/gbp_bridge_domain.cpp
extras/vom/vom/gbp_bridge_domain.hpp
extras/vom/vom/interface.cpp
extras/vom/vom/stat_reader.cpp

index 92d1a13..953c40c 100644 (file)
@@ -39,12 +39,6 @@ gbp_bridge_domain::gbp_bridge_domain(const bridge_domain& bd,
 {
 }
 
-gbp_bridge_domain::gbp_bridge_domain(const bridge_domain& bd)
-  : m_id(bd.id())
-  , m_bd(bd.singular())
-{
-}
-
 gbp_bridge_domain::gbp_bridge_domain(const bridge_domain& bd,
                                      const interface& bvi,
                                      const interface& uu_fwd)
index 031510a..c86c53e 100644 (file)
@@ -38,7 +38,6 @@ public:
    * Construct a GBP bridge_domain
    */
   gbp_bridge_domain(const bridge_domain& bd, const interface& bvi);
-  gbp_bridge_domain(const bridge_domain& bd);
   gbp_bridge_domain(const bridge_domain& bd,
                     const interface& bvi,
                     const interface& uu_fwd);
index bbbc187..504511e 100644 (file)
@@ -58,6 +58,8 @@ interface::interface(const std::string& name,
   , m_table_id(route::DEFAULT_TABLE)
   , m_l2_address(l2_address_t::ZERO, rc_t::UNSET)
   , m_stats_type(stats_type_t::NORMAL)
+  , m_stats({})
+  , m_listener(nullptr)
   , m_oper(oper_state_t::DOWN)
   , m_tag(tag)
 {
@@ -76,6 +78,8 @@ interface::interface(const std::string& name,
   , m_table_id(m_rd->table_id())
   , m_l2_address(l2_address_t::ZERO, rc_t::UNSET)
   , m_stats_type(stats_type_t::NORMAL)
+  , m_stats({})
+  , m_listener(nullptr)
   , m_oper(oper_state_t::DOWN)
   , m_tag(tag)
 {
@@ -90,6 +94,8 @@ interface::interface(const interface& o)
   , m_table_id(o.m_table_id)
   , m_l2_address(o.m_l2_address)
   , m_stats_type(o.m_stats_type)
+  , m_stats(o.m_stats)
+  , m_listener(o.m_listener)
   , m_oper(o.m_oper)
   , m_tag(o.m_tag)
 {
@@ -177,7 +183,7 @@ interface::sweep()
   }
 
   if (m_listener) {
-    disable_stats();
+    disable_stats_i();
   }
 
   // If the interface is up, bring it down
index 4b054ab..931d088 100644 (file)
@@ -49,13 +49,13 @@ stat_reader::disconnect()
 void
 stat_reader::registers(const interface& intf)
 {
-  m_stat_itf_indexes.insert(intf.handle().value());
+  m_stat_itf_indexes.insert(intf.handle_i().value());
 }
 
 void
 stat_reader::unregisters(const interface& intf)
 {
-  m_stat_itf_indexes.erase(intf.handle().value());
+  m_stat_itf_indexes.erase(intf.handle_i().value());
 }
 
 void