X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=extras%2Fvom%2Fvom%2Fgbp_bridge_domain_cmds.cpp;h=082bd4bb48d85d559c1c8b85a9954911d6165af5;hb=8ea109e40;hp=60f7cddd9f36af509de0fac557aed5df40fe886f;hpb=93cc3ee3b3a9c9224a1446625882205f3282a949;p=vpp.git diff --git a/extras/vom/vom/gbp_bridge_domain_cmds.cpp b/extras/vom/vom/gbp_bridge_domain_cmds.cpp index 60f7cddd9f3..082bd4bb48d 100644 --- a/extras/vom/vom/gbp_bridge_domain_cmds.cpp +++ b/extras/vom/vom/gbp_bridge_domain_cmds.cpp @@ -20,10 +20,14 @@ namespace gbp_bridge_domain_cmds { create_cmd::create_cmd(HW::item& item, const handle_t bvi, - const handle_t uu_fwd) + const handle_t uu_fwd, + const handle_t bm_flood, + const gbp_bridge_domain::flags_t& flags) : rpc_cmd(item) , m_bvi(bvi) , m_uu_fwd(uu_fwd) + , m_bm_flood(bm_flood) + , m_flags(flags) { } @@ -31,7 +35,8 @@ bool create_cmd::operator==(const create_cmd& other) const { return ((m_hw_item.data() == other.m_hw_item.data()) && - (m_bvi == other.m_bvi) && (m_uu_fwd == other.m_uu_fwd)); + (m_bvi == other.m_bvi) && (m_uu_fwd == other.m_uu_fwd) && + (m_bm_flood == other.m_bm_flood) && (m_flags == other.m_flags)); } rc_t @@ -44,7 +49,23 @@ create_cmd::issue(connection& con) payload.bd.bd_id = m_hw_item.data(); payload.bd.bvi_sw_if_index = m_bvi.value(); payload.bd.uu_fwd_sw_if_index = m_uu_fwd.value(); - + payload.bd.bm_flood_sw_if_index = m_bm_flood.value(); + + vapi_enum_gbp_bridge_domain_flags flags = GBP_BD_API_FLAG_NONE; + if (gbp_bridge_domain::flags_t::DO_NOT_LEARN & m_flags) + flags = static_cast( + flags | GBP_BD_API_FLAG_DO_NOT_LEARN); + if (gbp_bridge_domain::flags_t::UU_FWD_DROP & m_flags) + flags = static_cast( + flags | GBP_BD_API_FLAG_UU_FWD_DROP); + if (gbp_bridge_domain::flags_t::MCAST_DROP & m_flags) + flags = static_cast( + flags | GBP_BD_API_FLAG_MCAST_DROP); + if (gbp_bridge_domain::flags_t::UCAST_ARP & m_flags) + flags = static_cast( + flags | GBP_BD_API_FLAG_UCAST_ARP); + + payload.bd.flags = flags; VAPI_CALL(req.execute()); return (wait()); @@ -55,7 +76,8 @@ create_cmd::to_string() const { std::ostringstream s; s << "gbp-bridge-domain: " << m_hw_item.to_string() - << " bvi:" << m_bvi.to_string() << " uu-fwd:" << m_uu_fwd.to_string(); + << " flags:" << m_flags.to_string() << " bvi:" << m_bvi.to_string() + << " uu-fwd:" << m_uu_fwd.to_string(); return (s.str()); }