aboutsummaryrefslogtreecommitdiffstats
path: root/src/vpp-api/vom/acl_list.cpp
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2018-02-26 18:36:17 +0100
committerNeale Ranns <nranns@cisco.com>2018-03-06 14:47:28 +0000
commitb5eb3b185fb04bfed3ba6c89323cd82e7d666bae (patch)
treeeadb31b9933e574b601b35329720302ffe4a1ea5 /src/vpp-api/vom/acl_list.cpp
parent3f6ede3ab3df9624ba3682d5bc82c4f2aa2e0506 (diff)
VOM: Fix state reconciliation
This commit also fixes the acl and arp handle for inspector to view internal state of VOM. Change-Id: Ibc8ff6cb51d2a77b4c04993ac7212564b8892337 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'src/vpp-api/vom/acl_list.cpp')
-rw-r--r--src/vpp-api/vom/acl_list.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/vpp-api/vom/acl_list.cpp b/src/vpp-api/vom/acl_list.cpp
index 557de515714..5b03f5db021 100644
--- a/src/vpp-api/vom/acl_list.cpp
+++ b/src/vpp-api/vom/acl_list.cpp
@@ -19,6 +19,14 @@
namespace VOM {
namespace ACL {
+
+template <>
+l2_list::event_handler::event_handler()
+{
+ OM::register_listener(this);
+ inspect::register_handler({ "l2-acl-list" }, "L2 ACL lists", this);
+}
+
template <>
void
l2_list::event_handler::handle_populate(const client_db::key_t& key)
@@ -62,6 +70,13 @@ l2_list::event_handler::handle_populate(const client_db::key_t& key)
}
template <>
+l3_list::event_handler::event_handler()
+{
+ OM::register_listener(this);
+ inspect::register_handler({ "l3-acl-list" }, "L3 ACL lists", this);
+}
+
+template <>
void
l3_list::event_handler::handle_populate(const client_db::key_t& key)
{
@@ -120,7 +135,7 @@ l3_list::update(const l3_list& obj)
/*
* always update the instance with the latest rule set
*/
- if (!m_hdl || obj.m_rules != m_rules) {
+ if (rc_t::OK != m_hdl.rc() || obj.m_rules != m_rules) {
HW::enqueue(new list_cmds::l3_update_cmd(m_hdl, m_key, m_rules));
}
/*
@@ -137,7 +152,7 @@ l2_list::update(const l2_list& obj)
/*
* always update the instance with the latest rule set
*/
- if (!m_hdl || obj.m_rules != m_rules) {
+ if (rc_t::OK != m_hdl.rc() || obj.m_rules != m_rules) {
HW::enqueue(new list_cmds::l2_update_cmd(m_hdl, m_key, m_rules));
}
/*