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.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/vpp-api/vom/interface.cpp b/src/vpp-api/vom/interface.cpp
index 10728ceddc4..9fa96af2d97 100644
--- a/src/vpp-api/vom/interface.cpp
+++ b/src/vpp-api/vom/interface.cpp
@@ -250,6 +250,8 @@ interface::mk_create_cmd(std::queue<cmd*>& q)
q.push(new interface_cmds::af_packet_create_cmd(m_hdl, m_name));
} else if (type_t::TAP == m_type) {
q.push(new interface_cmds::tap_create_cmd(m_hdl, m_name));
+ } else {
+ m_hdl.set(rc_t::OK);
}
return (q);
@@ -365,9 +367,11 @@ interface::set(const oper_state_t& state)
void
interface::enable_stats_i(interface::stat_listener& el)
{
- m_stats.reset(new interface_cmds::stats_enable_cmd(el, handle_i()));
- HW::enqueue(m_stats);
- HW::write();
+ if (!m_stats) {
+ m_stats.reset(new interface_cmds::stats_enable_cmd(el, handle_i()));
+ HW::enqueue(m_stats);
+ HW::write();
+ }
}
void