X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=extras%2Fvom%2Fvom%2Fbridge_domain_arp_entry.cpp;h=f468e0f977f704bf52a3f962b1fc0d16be36be3a;hb=bc764c8bc;hp=a203a76744e9eba98afc4baa737d3f6d3e354124;hpb=164e5f8c63652028ecb9c3570e1ea8618b163071;p=vpp.git diff --git a/extras/vom/vom/bridge_domain_arp_entry.cpp b/extras/vom/vom/bridge_domain_arp_entry.cpp index a203a76744e..f468e0f977f 100644 --- a/extras/vom/vom/bridge_domain_arp_entry.cpp +++ b/extras/vom/vom/bridge_domain_arp_entry.cpp @@ -14,6 +14,7 @@ */ #include "vom/bridge_domain_arp_entry.hpp" +#include "vom/api_types.hpp" #include "vom/bridge_domain_arp_entry_cmds.hpp" #include "vom/singular_db_funcs.hpp" @@ -162,6 +163,32 @@ void bridge_domain_arp_entry::event_handler::handle_populate( const client_db::key_t& key) { + /* + * dump VPP Bridge domains + */ + std::shared_ptr cmd = + std::make_shared(~0); + + HW::enqueue(cmd); + HW::write(); + + for (auto& record : *cmd) { + auto& payload = record.get_payload(); + + std::shared_ptr bd = + bridge_domain::find(payload.entry.bd_id); + bridge_domain_arp_entry bd_ae(*bd, from_api(payload.entry.ip), + from_api(payload.entry.mac)); + + VOM_LOG(log_level_t::DEBUG) << "dump: " << bd_ae.to_string(); + + /* + * Write each of the discovered bridge-domain arp entry into the OM, + * but disable the HW Command q whilst we do, so that no + * commands are sent to VPP + */ + OM::commit(key, bd_ae); + } } dependency_t