aboutsummaryrefslogtreecommitdiffstats
path: root/extras
diff options
context:
space:
mode:
Diffstat (limited to 'extras')
-rw-r--r--extras/vom/vom/bridge_domain.cpp27
-rw-r--r--extras/vom/vom/bridge_domain.hpp23
-rw-r--r--extras/vom/vom/bridge_domain_cmds.cpp4
-rw-r--r--extras/vom/vom/bridge_domain_cmds.hpp5
4 files changed, 54 insertions, 5 deletions
diff --git a/extras/vom/vom/bridge_domain.cpp b/extras/vom/vom/bridge_domain.cpp
index 7535af35b34..e86fc26b268 100644
--- a/extras/vom/vom/bridge_domain.cpp
+++ b/extras/vom/vom/bridge_domain.cpp
@@ -39,6 +39,16 @@ bridge_domain::flood_mode_t::flood_mode_t(int v, const std::string& s)
{
}
+const bridge_domain::uu_flood_mode_t bridge_domain::uu_flood_mode_t::ON(1,
+ "on");
+const bridge_domain::uu_flood_mode_t bridge_domain::uu_flood_mode_t::OFF(0,
+ "off");
+
+bridge_domain::uu_flood_mode_t::uu_flood_mode_t(int v, const std::string& s)
+ : enum_base<bridge_domain::uu_flood_mode_t>(v, s)
+{
+}
+
const bridge_domain::mac_age_mode_t bridge_domain::mac_age_mode_t::ON(1, "on");
const bridge_domain::mac_age_mode_t bridge_domain::mac_age_mode_t::OFF(0,
"off");
@@ -83,12 +93,14 @@ bridge_domain::bridge_domain(uint32_t id,
const arp_term_mode_t& amode,
const arp_ufwd_mode_t& aumode,
const flood_mode_t& fmode,
+ const uu_flood_mode_t& uufmode,
const mac_age_mode_t& mmode)
: m_id(id)
, m_learning_mode(lmode)
, m_arp_term_mode(amode)
, m_arp_ufwd_mode(aumode)
, m_flood_mode(fmode)
+ , m_uu_flood_mode(uufmode)
, m_mac_age_mode(mmode)
{
}
@@ -99,6 +111,7 @@ bridge_domain::bridge_domain(const bridge_domain& o)
, m_arp_term_mode(o.m_arp_term_mode)
, m_arp_ufwd_mode(o.m_arp_ufwd_mode)
, m_flood_mode(o.m_flood_mode)
+ , m_uu_flood_mode(o.m_uu_flood_mode)
, m_mac_age_mode(o.m_mac_age_mode)
{
}
@@ -120,6 +133,7 @@ bridge_domain::operator==(const bridge_domain& b) const
{
return ((m_learning_mode == b.m_learning_mode) &&
(m_flood_mode == b.m_flood_mode) &&
+ (m_uu_flood_mode == b.m_uu_flood_mode) &&
(m_mac_age_mode == b.m_mac_age_mode) &&
(m_arp_term_mode == b.m_arp_term_mode) &&
(m_arp_ufwd_mode == b.m_arp_ufwd_mode) && id() == b.id());
@@ -140,7 +154,7 @@ bridge_domain::replay()
if (rc_t::OK == m_id.rc()) {
HW::enqueue(new bridge_domain_cmds::create_cmd(
m_id, m_learning_mode, m_arp_term_mode, m_arp_ufwd_mode, m_flood_mode,
- m_mac_age_mode));
+ m_uu_flood_mode, m_mac_age_mode));
}
}
@@ -177,7 +191,7 @@ bridge_domain::update(const bridge_domain& desired)
if (rc_t::OK != m_id.rc()) {
HW::enqueue(new bridge_domain_cmds::create_cmd(
m_id, m_learning_mode, m_arp_term_mode, m_arp_ufwd_mode, m_flood_mode,
- m_mac_age_mode));
+ m_uu_flood_mode, m_mac_age_mode));
}
}
@@ -214,7 +228,14 @@ bridge_domain::event_handler::handle_populate(const client_db::key_t& key)
for (auto& record : *cmd) {
auto& payload = record.get_payload();
- bridge_domain bd(payload.bd_id);
+ bridge_domain bd(
+ payload.bd_id,
+ (payload.learn ? learning_mode_t::ON : learning_mode_t::OFF),
+ (payload.arp_term ? arp_term_mode_t::ON : arp_term_mode_t::OFF),
+ (payload.arp_ufwd ? arp_ufwd_mode_t::ON : arp_ufwd_mode_t::OFF),
+ (payload.flood ? flood_mode_t::ON : flood_mode_t::OFF),
+ (payload.uu_flood ? uu_flood_mode_t::ON : uu_flood_mode_t::OFF),
+ (payload.mac_age ? mac_age_mode_t::ON : mac_age_mode_t::OFF));
VOM_LOG(log_level_t::DEBUG) << "dump: " << bd.to_string();
diff --git a/extras/vom/vom/bridge_domain.hpp b/extras/vom/vom/bridge_domain.hpp
index ecaae04496d..8ece1cc89d1 100644
--- a/extras/vom/vom/bridge_domain.hpp
+++ b/extras/vom/vom/bridge_domain.hpp
@@ -97,7 +97,7 @@ public:
};
/**
- * Bridge Domain Learning mode
+ * Bridge Domain flood mode
*/
struct flood_mode_t : enum_base<flood_mode_t>
{
@@ -112,6 +112,21 @@ public:
};
/**
+ * Bridge Domain Unknown Unicast Flood mode
+ */
+ struct uu_flood_mode_t : enum_base<uu_flood_mode_t>
+ {
+ const static uu_flood_mode_t ON;
+ const static uu_flood_mode_t OFF;
+
+ private:
+ /**
+ * Private constructor taking the value and the string name
+ */
+ uu_flood_mode_t(int v, const std::string& s);
+ };
+
+ /**
* The value of the defaultbridge domain
*/
const static uint32_t DEFAULT_TABLE = 0;
@@ -124,6 +139,7 @@ public:
const arp_term_mode_t& amode = arp_term_mode_t::ON,
const arp_ufwd_mode_t& aumode = arp_ufwd_mode_t::OFF,
const flood_mode_t& fmode = flood_mode_t::ON,
+ const uu_flood_mode_t& uufmode = uu_flood_mode_t::ON,
const mac_age_mode_t& mmode = mac_age_mode_t::OFF);
/**
@@ -263,6 +279,11 @@ private:
flood_mode_t m_flood_mode;
/**
+ * The unknown unicast flood mode of the bridge
+ */
+ uu_flood_mode_t m_uu_flood_mode;
+
+ /**
* The MAC aging mode of the bridge
*/
mac_age_mode_t m_mac_age_mode;
diff --git a/extras/vom/vom/bridge_domain_cmds.cpp b/extras/vom/vom/bridge_domain_cmds.cpp
index a7dccf28a07..1aeafcee44f 100644
--- a/extras/vom/vom/bridge_domain_cmds.cpp
+++ b/extras/vom/vom/bridge_domain_cmds.cpp
@@ -24,12 +24,14 @@ create_cmd::create_cmd(HW::item<uint32_t>& item,
const bridge_domain::arp_term_mode_t& amode,
const bridge_domain::arp_ufwd_mode_t& aumode,
const bridge_domain::flood_mode_t& fmode,
+ const bridge_domain::uu_flood_mode_t& uufmode,
const bridge_domain::mac_age_mode_t& mmode)
: rpc_cmd(item)
, m_learning_mode(lmode)
, m_arp_term_mode(amode)
, m_arp_ufwd_mode(aumode)
, m_flood_mode(fmode)
+ , m_uu_flood_mode(uufmode)
, m_mac_age_mode(mmode)
{
}
@@ -48,7 +50,7 @@ create_cmd::issue(connection& con)
auto& payload = req.get_request().get_payload();
payload.bd_id = m_hw_item.data();
payload.flood = m_flood_mode.value();
- payload.uu_flood = m_flood_mode.value();
+ payload.uu_flood = m_uu_flood_mode.value();
payload.forward = 1;
payload.learn = m_learning_mode.value();
payload.arp_term = m_arp_term_mode.value();
diff --git a/extras/vom/vom/bridge_domain_cmds.hpp b/extras/vom/vom/bridge_domain_cmds.hpp
index 818de674823..395b3560d7a 100644
--- a/extras/vom/vom/bridge_domain_cmds.hpp
+++ b/extras/vom/vom/bridge_domain_cmds.hpp
@@ -39,6 +39,7 @@ public:
const bridge_domain::arp_term_mode_t& amode,
const bridge_domain::arp_ufwd_mode_t& aumode,
const bridge_domain::flood_mode_t& fmode,
+ const bridge_domain::uu_flood_mode_t& uufmode,
const bridge_domain::mac_age_mode_t& mmode);
/**
@@ -73,6 +74,10 @@ private:
*/
bridge_domain::flood_mode_t m_flood_mode;
/**
+ * the unknown unicast flood mode for the bridge
+ */
+ bridge_domain::uu_flood_mode_t m_uu_flood_mode;
+ /**
* the flood mode for the bridge
*/
bridge_domain::mac_age_mode_t m_mac_age_mode;