diff options
author | Neale Ranns <neale.ranns@cisco.com> | 2017-12-01 00:19:43 -0800 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2017-12-01 11:14:18 +0000 |
commit | 088f0e221c05b7b1cd59b61442eaf595e22e2fef (patch) | |
tree | b545fe5118a0a47bfef399e272ef1e5e7d11c490 /src/vpp-api/vom/interface.cpp | |
parent | 47bcca2ec8b3fb21b099a4f19a260a4783068e63 (diff) |
VOM: fixes for interface recreate on agent restart and L2 re-binding
Change-Id: I14c838ee99f9bc2db66bb2e775039d2cb2e7924f
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Diffstat (limited to 'src/vpp-api/vom/interface.cpp')
-rw-r--r-- | src/vpp-api/vom/interface.cpp | 10 |
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 |