X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvpp-api%2Fvom%2Fbridge_domain.cpp;h=be520f5ee454dcc580f3d54e7ff396c2f267fdc0;hb=756cd9441752fc8f84104c9ee19099506ba89f85;hp=583e35d3dad719452d47e40236b716ed7d108d31;hpb=1d781558da28f72f5233c09835663aa3b42e2d97;p=vpp.git diff --git a/src/vpp-api/vom/bridge_domain.cpp b/src/vpp-api/vom/bridge_domain.cpp index 583e35d3dad..be520f5ee45 100644 --- a/src/vpp-api/vom/bridge_domain.cpp +++ b/src/vpp-api/vom/bridge_domain.cpp @@ -17,6 +17,7 @@ #include "vom/bridge_domain_cmds.hpp" #include "vom/interface.hpp" #include "vom/l2_binding.hpp" +#include "vom/singular_db_funcs.hpp" namespace VOM { @@ -67,7 +68,7 @@ bridge_domain::id() const bool bridge_domain::operator==(const bridge_domain& b) const { - return (id() == b.id()); + return ((m_learning_mode == b.m_learning_mode) && id() == b.id()); } void @@ -99,7 +100,8 @@ std::string bridge_domain::to_string() const { std::ostringstream s; - s << "bridge-domain:[" << m_id.to_string() << "]"; + s << "bridge-domain:[" << m_id.to_string() + << " learning-mode:" << m_learning_mode.to_string() << "]"; return (s.str()); } @@ -136,7 +138,7 @@ bridge_domain::singular() const void bridge_domain::dump(std::ostream& os) { - m_db.dump(os); + db_dump(m_db, os); } void @@ -159,15 +161,15 @@ bridge_domain::event_handler::handle_populate(const client_db::key_t& key) VOM_LOG(log_level_t::DEBUG) << "dump: " << bd.to_string(); /* - * Write each of the discovered interfaces into the OM, - * but disable the HW Command q whilst we do, so that no - * commands are sent to VPP - */ + * Write each of the discovered bridge-domains into the OM, + * but disable the HW Command q whilst we do, so that no + * commands are sent to VPP + */ OM::commit(key, bd); /** - * For each interface in the BD construct an l2_binding - */ + * For each interface in the BD construct an l2_binding + */ for (unsigned int ii = 0; ii < payload.n_sw_ifs; ii++) { std::shared_ptr itf = interface::find(payload.sw_if_details[ii].sw_if_index); @@ -198,7 +200,7 @@ bridge_domain::event_handler::order() const void bridge_domain::event_handler::show(std::ostream& os) { - m_db.dump(os); + db_dump(m_db, os); } }