aboutsummaryrefslogtreecommitdiffstats
path: root/src/vpp-api/vom
diff options
context:
space:
mode:
Diffstat (limited to 'src/vpp-api/vom')
-rw-r--r--src/vpp-api/vom/acl_binding.cpp12
-rw-r--r--src/vpp-api/vom/acl_binding_cmds.hpp1
-rw-r--r--src/vpp-api/vom/acl_list.cpp30
-rw-r--r--src/vpp-api/vom/bridge_domain.cpp8
-rw-r--r--src/vpp-api/vom/bridge_domain_entry.cpp4
-rw-r--r--src/vpp-api/vom/dump_cmd.hpp2
-rw-r--r--src/vpp-api/vom/interface.cpp3
-rw-r--r--src/vpp-api/vom/interface_span.cpp4
-rw-r--r--src/vpp-api/vom/l2_binding.cpp4
-rw-r--r--src/vpp-api/vom/l3_binding.cpp10
-rw-r--r--src/vpp-api/vom/route.cpp8
-rw-r--r--src/vpp-api/vom/tap_interface.cpp4
-rw-r--r--src/vpp-api/vom/vxlan_tunnel.cpp4
13 files changed, 49 insertions, 45 deletions
diff --git a/src/vpp-api/vom/acl_binding.cpp b/src/vpp-api/vom/acl_binding.cpp
index 267b02a620b..b87cfbaa2e4 100644
--- a/src/vpp-api/vom/acl_binding.cpp
+++ b/src/vpp-api/vom/acl_binding.cpp
@@ -23,10 +23,10 @@ void
l2_binding::event_handler::handle_populate(const client_db::key_t& key)
{
/*
-* dump VPP Bridge domains
-*/
- std::shared_ptr<binding_cmds::l2_dump_cmd> cmd(
- new binding_cmds::l2_dump_cmd());
+ * dump VPP Bridge domains
+ */
+ std::shared_ptr<binding_cmds::l2_dump_cmd> cmd =
+ std::make_shared<binding_cmds::l2_dump_cmd>();
HW::enqueue(cmd);
HW::write();
@@ -50,8 +50,8 @@ template <>
void
l3_binding::event_handler::handle_populate(const client_db::key_t& key)
{
- std::shared_ptr<binding_cmds::l3_dump_cmd> cmd(
- new binding_cmds::l3_dump_cmd());
+ std::shared_ptr<binding_cmds::l3_dump_cmd> cmd =
+ std::make_shared<binding_cmds::l3_dump_cmd>();
HW::enqueue(cmd);
HW::write();
diff --git a/src/vpp-api/vom/acl_binding_cmds.hpp b/src/vpp-api/vom/acl_binding_cmds.hpp
index 0bc698beef5..4e8895acb3c 100644
--- a/src/vpp-api/vom/acl_binding_cmds.hpp
+++ b/src/vpp-api/vom/acl_binding_cmds.hpp
@@ -162,7 +162,6 @@ public:
* Constructor
*/
dump_cmd() = default;
- dump_cmd(const dump_cmd& d) = default;
/**
* Issue the command to VPP/HW
diff --git a/src/vpp-api/vom/acl_list.cpp b/src/vpp-api/vom/acl_list.cpp
index 0c92c02ad22..97332788f4c 100644
--- a/src/vpp-api/vom/acl_list.cpp
+++ b/src/vpp-api/vom/acl_list.cpp
@@ -27,9 +27,10 @@ l2_list::event_handler::handle_populate(const client_db::key_t& key)
m_evh.order();
/*
-* dump VPP Bridge domains
-*/
- std::shared_ptr<list_cmds::l2_dump_cmd> cmd(new list_cmds::l2_dump_cmd());
+ * dump VPP Bridge domains
+ */
+ std::shared_ptr<list_cmds::l2_dump_cmd> cmd =
+ std::make_shared<list_cmds::l2_dump_cmd>();
HW::enqueue(cmd);
HW::write();
@@ -52,10 +53,10 @@ l2_list::event_handler::handle_populate(const client_db::key_t& key)
VOM_LOG(log_level_t::DEBUG) << "dump: " << acl.to_string();
/*
-* Write each of the discovered ACLs 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 ACLs into the OM,
+ * but disable the HW Command q whilst we do, so that no
+ * commands are sent to VPP
+ */
OM::commit(key, acl);
}
}
@@ -68,9 +69,10 @@ l3_list::event_handler::handle_populate(const client_db::key_t& key)
m_evh.order();
/*
-* dump VPP Bridge domains
-*/
- std::shared_ptr<list_cmds::l3_dump_cmd> cmd(new list_cmds::l3_dump_cmd());
+ * dump L3 ACLs Bridge domains
+ */
+ std::shared_ptr<list_cmds::l3_dump_cmd> cmd =
+ std::make_shared<list_cmds::l3_dump_cmd>();
HW::enqueue(cmd);
HW::write();
@@ -95,10 +97,10 @@ l3_list::event_handler::handle_populate(const client_db::key_t& key)
VOM_LOG(log_level_t::DEBUG) << "dump: " << acl.to_string();
/*
-* Write each of the discovered ACLs 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 ACLs into the OM,
+ * but disable the HW Command q whilst we do, so that no
+ * commands are sent to VPP
+ */
OM::commit(key, acl);
}
}
diff --git a/src/vpp-api/vom/bridge_domain.cpp b/src/vpp-api/vom/bridge_domain.cpp
index 682681988f9..583e35d3dad 100644
--- a/src/vpp-api/vom/bridge_domain.cpp
+++ b/src/vpp-api/vom/bridge_domain.cpp
@@ -143,10 +143,10 @@ void
bridge_domain::event_handler::handle_populate(const client_db::key_t& key)
{
/*
- * dump VPP Bridge domains
- */
- std::shared_ptr<bridge_domain_cmds::dump_cmd> cmd(
- new bridge_domain_cmds::dump_cmd());
+ * dump VPP Bridge domains
+ */
+ std::shared_ptr<bridge_domain_cmds::dump_cmd> cmd =
+ std::make_shared<bridge_domain_cmds::dump_cmd>();
HW::enqueue(cmd);
HW::write();
diff --git a/src/vpp-api/vom/bridge_domain_entry.cpp b/src/vpp-api/vom/bridge_domain_entry.cpp
index 79f36f7d947..de1c4b7ba1f 100644
--- a/src/vpp-api/vom/bridge_domain_entry.cpp
+++ b/src/vpp-api/vom/bridge_domain_entry.cpp
@@ -155,8 +155,8 @@ bridge_domain_entry::event_handler::handle_replay()
void
bridge_domain_entry::event_handler::handle_populate(const client_db::key_t& key)
{
- std::shared_ptr<bridge_domain_entry_cmds::dump_cmd> cmd(
- new bridge_domain_entry_cmds::dump_cmd());
+ std::shared_ptr<bridge_domain_entry_cmds::dump_cmd> cmd =
+ std::make_shared<bridge_domain_entry_cmds::dump_cmd>();
HW::enqueue(cmd);
HW::write();
diff --git a/src/vpp-api/vom/dump_cmd.hpp b/src/vpp-api/vom/dump_cmd.hpp
index 72fcdf55746..4dad02b911e 100644
--- a/src/vpp-api/vom/dump_cmd.hpp
+++ b/src/vpp-api/vom/dump_cmd.hpp
@@ -62,6 +62,8 @@ public:
*/
virtual ~dump_cmd() {}
+ dump_cmd(const dump_cmd& d) = default;
+
/**
* Constant iterator to the start of the records retunred during the dump
*/
diff --git a/src/vpp-api/vom/interface.cpp b/src/vpp-api/vom/interface.cpp
index aab2eabb91b..c7b7e436450 100644
--- a/src/vpp-api/vom/interface.cpp
+++ b/src/vpp-api/vom/interface.cpp
@@ -435,7 +435,8 @@ interface::event_handler::handle_populate(const client_db::key_t& key)
/*
* dump VPP current states
*/
- interface_cmds::dump_cmd* cmd = new interface_cmds::dump_cmd();
+ std::shared_ptr<interface_cmds::dump_cmd> cmd =
+ std::make_shared<interface_cmds::dump_cmd>();
HW::enqueue(cmd);
HW::write();
diff --git a/src/vpp-api/vom/interface_span.cpp b/src/vpp-api/vom/interface_span.cpp
index 5bdbda95a12..9243f2dd755 100644
--- a/src/vpp-api/vom/interface_span.cpp
+++ b/src/vpp-api/vom/interface_span.cpp
@@ -132,8 +132,8 @@ interface_span::event_handler::handle_replay()
void
interface_span::event_handler::handle_populate(const client_db::key_t& key)
{
- std::shared_ptr<interface_span_cmds::dump_cmd> cmd(
- new interface_span_cmds::dump_cmd());
+ std::shared_ptr<interface_span_cmds::dump_cmd> cmd =
+ std::make_shared<interface_span_cmds::dump_cmd>();
HW::enqueue(cmd);
HW::write();
diff --git a/src/vpp-api/vom/l2_binding.cpp b/src/vpp-api/vom/l2_binding.cpp
index dd49e570a8e..cc0e84a5492 100644
--- a/src/vpp-api/vom/l2_binding.cpp
+++ b/src/vpp-api/vom/l2_binding.cpp
@@ -203,8 +203,8 @@ void
l2_binding::event_handler::handle_populate(const client_db::key_t& key)
{
/**
- * This is done while populating the bridge-domain
- */
+ * This is done while populating the bridge-domain
+ */
}
dependency_t
diff --git a/src/vpp-api/vom/l3_binding.cpp b/src/vpp-api/vom/l3_binding.cpp
index be7c9d1e24b..6ff824483ea 100644
--- a/src/vpp-api/vom/l3_binding.cpp
+++ b/src/vpp-api/vom/l3_binding.cpp
@@ -171,9 +171,9 @@ l3_binding::find(const interface& i)
while (it != m_db.cend()) {
/*
- * The key in the DB is a pair of the interface's name and prefix.
- * If the keys match, save the L3-config
- */
+ * The key in the DB is a pair of the interface's name and prefix.
+ * If the keys match, save the L3-config
+ */
auto key = it->first;
if (i.key() == key.first) {
@@ -202,8 +202,8 @@ void
l3_binding::event_handler::handle_populate(const client_db::key_t& key)
{
/**
- * This is done while populating the interfaces
- */
+ * This is done while populating the interfaces
+ */
}
dependency_t
diff --git a/src/vpp-api/vom/route.cpp b/src/vpp-api/vom/route.cpp
index 0da2ebba749..661d99c4791 100644
--- a/src/vpp-api/vom/route.cpp
+++ b/src/vpp-api/vom/route.cpp
@@ -360,10 +360,10 @@ ip_route::event_handler::handle_replay()
void
ip_route::event_handler::handle_populate(const client_db::key_t& key)
{
- std::shared_ptr<ip_route_cmds::dump_v4_cmd> cmd_v4(
- new ip_route_cmds::dump_v4_cmd());
- std::shared_ptr<ip_route_cmds::dump_v6_cmd> cmd_v6(
- new ip_route_cmds::dump_v6_cmd());
+ std::shared_ptr<ip_route_cmds::dump_v4_cmd> cmd_v4 =
+ std::make_shared<ip_route_cmds::dump_v4_cmd>();
+ std::shared_ptr<ip_route_cmds::dump_v6_cmd> cmd_v6 =
+ std::make_shared<ip_route_cmds::dump_v6_cmd>();
HW::enqueue(cmd_v4);
HW::enqueue(cmd_v6);
diff --git a/src/vpp-api/vom/tap_interface.cpp b/src/vpp-api/vom/tap_interface.cpp
index 8314b40420e..4f88d3b8fad 100644
--- a/src/vpp-api/vom/tap_interface.cpp
+++ b/src/vpp-api/vom/tap_interface.cpp
@@ -101,8 +101,8 @@ tap_interface::event_handler::handle_populate(const client_db::key_t& key)
/*
* dump VPP current states
*/
- std::shared_ptr<tap_interface_cmds::dump_cmd> cmd(
- new tap_interface_cmds::dump_cmd());
+ std::shared_ptr<tap_interface_cmds::dump_cmd> cmd =
+ std::make_shared<tap_interface_cmds::dump_cmd>();
HW::enqueue(cmd);
HW::write();
diff --git a/src/vpp-api/vom/vxlan_tunnel.cpp b/src/vpp-api/vom/vxlan_tunnel.cpp
index cf872231d41..89615893939 100644
--- a/src/vpp-api/vom/vxlan_tunnel.cpp
+++ b/src/vpp-api/vom/vxlan_tunnel.cpp
@@ -219,8 +219,8 @@ vxlan_tunnel::event_handler::handle_populate(const client_db::key_t& key)
/*
* dump VPP current states
*/
- std::shared_ptr<vxlan_tunnel_cmds::dump_cmd> cmd(
- new vxlan_tunnel_cmds::dump_cmd());
+ std::shared_ptr<vxlan_tunnel_cmds::dump_cmd> cmd =
+ std::make_shared<vxlan_tunnel_cmds::dump_cmd>();
HW::enqueue(cmd);
HW::write();