Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
fib: fib api updates
[vpp.git]
/
extras
/
vom
/
vom
/
interface.cpp
diff --git
a/extras/vom/vom/interface.cpp
b/extras/vom/vom/interface.cpp
index
ec6204f
..
1e27d42
100644
(file)
--- a/
extras/vom/vom/interface.cpp
+++ b/
extras/vom/vom/interface.cpp
@@
-14,6
+14,7
@@
*/
#include "vom/interface.hpp"
*/
#include "vom/interface.hpp"
+#include "vom/api_types.hpp"
#include "vom/bond_group_binding.hpp"
#include "vom/bond_group_binding_cmds.hpp"
#include "vom/bond_interface_cmds.hpp"
#include "vom/bond_group_binding.hpp"
#include "vom/bond_group_binding_cmds.hpp"
#include "vom/bond_interface_cmds.hpp"
@@
-275,13
+276,17
@@
interface::key() const
std::queue<cmd*>&
interface::mk_create_cmd(std::queue<cmd*>& q)
{
std::queue<cmd*>&
interface::mk_create_cmd(std::queue<cmd*>& q)
{
- if (
(type_t::LOOPBACK == m_type) || (type_t::BVI == m_type)
) {
+ if (
type_t::LOOPBACK == m_type
) {
q.push(new interface_cmds::loopback_create_cmd(m_hdl, m_name));
q.push(new interface_cmds::set_tag(m_hdl, m_name));
/*
* set the m_tag for pretty-print
*/
m_tag = m_name;
q.push(new interface_cmds::loopback_create_cmd(m_hdl, m_name));
q.push(new interface_cmds::set_tag(m_hdl, m_name));
/*
* set the m_tag for pretty-print
*/
m_tag = m_name;
+ } else if (type_t::BVI == m_type) {
+ q.push(new interface_cmds::bvi_create_cmd(m_hdl, m_name));
+ q.push(new interface_cmds::set_tag(m_hdl, m_name));
+ m_tag = m_name;
} else if (type_t::AFPACKET == m_type) {
q.push(new interface_cmds::af_packet_create_cmd(m_hdl, m_name));
if (!m_tag.empty())
} else if (type_t::AFPACKET == m_type) {
q.push(new interface_cmds::af_packet_create_cmd(m_hdl, m_name));
if (!m_tag.empty())
@@
-301,8
+306,10
@@
interface::mk_create_cmd(std::queue<cmd*>& q)
std::queue<cmd*>&
interface::mk_delete_cmd(std::queue<cmd*>& q)
{
std::queue<cmd*>&
interface::mk_delete_cmd(std::queue<cmd*>& q)
{
- if (
(type_t::LOOPBACK == m_type) || (type_t::BVI == m_type)
) {
+ if (
type_t::LOOPBACK == m_type
) {
q.push(new interface_cmds::loopback_delete_cmd(m_hdl));
q.push(new interface_cmds::loopback_delete_cmd(m_hdl));
+ } else if (type_t::BVI == m_type) {
+ q.push(new interface_cmds::bvi_delete_cmd(m_hdl));
} else if (type_t::AFPACKET == m_type) {
q.push(new interface_cmds::af_packet_delete_cmd(m_hdl, m_name));
} else if (type_t::VHOST == m_type) {
} else if (type_t::AFPACKET == m_type) {
q.push(new interface_cmds::af_packet_delete_cmd(m_hdl, m_name));
} else if (type_t::VHOST == m_type) {
@@
-660,8
+667,7
@@
interface::event_handler::handle_populate(const client_db::key_t& key)
for (auto& l3_record : *dcmd) {
auto& payload = l3_record.get_payload();
for (auto& l3_record : *dcmd) {
auto& payload = l3_record.get_payload();
- const route::prefix_t pfx(payload.is_ipv6, payload.ip,
- payload.prefix_length);
+ const route::prefix_t pfx = from_api(payload.prefix);
VOM_LOG(log_level_t::DEBUG) << "dump: " << pfx.to_string();
VOM_LOG(log_level_t::DEBUG) << "dump: " << pfx.to_string();