aboutsummaryrefslogtreecommitdiffstats
path: root/src/vpp-api/vom/interface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/vpp-api/vom/interface.cpp')
-rw-r--r--src/vpp-api/vom/interface.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/vpp-api/vom/interface.cpp b/src/vpp-api/vom/interface.cpp
index 8f1023d2273..39ca074920f 100644
--- a/src/vpp-api/vom/interface.cpp
+++ b/src/vpp-api/vom/interface.cpp
@@ -163,11 +163,15 @@ interface::sweep()
new interface_cmds::set_table_cmd(m_table_id, l3_proto_t::IPV6, m_hdl));
}
+ if (m_stats)
+ HW::dequeue(m_stats);
+
// If the interface is up, bring it down
if (m_state && interface::admin_state_t::UP == m_state.data()) {
m_state.data() = interface::admin_state_t::DOWN;
HW::enqueue(new interface_cmds::state_change_cmd(m_state, m_hdl));
}
+
if (m_hdl) {
std::queue<cmd*> cmds;
HW::enqueue(mk_delete_cmd(cmds));
@@ -356,6 +360,20 @@ interface::set(const oper_state_t& state)
m_oper = state;
}
+void
+interface::enable_stats_i(interface::stat_listener& el)
+{
+ m_stats.reset(new interface_cmds::stats_cmd(el, handle_i()));
+ HW::enqueue(m_stats);
+ HW::write();
+}
+
+void
+interface::enable_stats(interface::stat_listener& el)
+{
+ singular()->enable_stats_i(el);
+}
+
std::shared_ptr<interface>
interface::singular_i() const
{