summaryrefslogtreecommitdiffstats
path: root/src/vpp-api/vom/interface_cmds.hpp
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2018-03-29 01:28:09 -0700
committerDave Barach <openvpp@barachs.net>2018-04-04 13:40:39 +0000
commit871dc4287d8c05ff76106dba4f5f8654c24347fe (patch)
tree97f6026e284f8cb570855f47512b22a0b58112d1 /src/vpp-api/vom/interface_cmds.hpp
parent6df19030f2bf986f1876c2c46b44c046b9b2c686 (diff)
Detailed stats collection feature
Use device-input and interface-output feautre arcs to collect unicast, multicast and broadcast states for RX and TX resp. Since these feature arcs are present only for 'physical' interfaces (i.e. not su-interfaces) counter collection is supported only on parent interface types. Change-Id: I915c235e336b0fc3a3c3de918f95dd674e4e0e4e Signed-off-by: Neale Ranns <nranns@cisco.com> Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'src/vpp-api/vom/interface_cmds.hpp')
-rw-r--r--src/vpp-api/vom/interface_cmds.hpp46
1 files changed, 45 insertions, 1 deletions
diff --git a/src/vpp-api/vom/interface_cmds.hpp b/src/vpp-api/vom/interface_cmds.hpp
index 62762ef7c41..41ec5caf0e3 100644
--- a/src/vpp-api/vom/interface_cmds.hpp
+++ b/src/vpp-api/vom/interface_cmds.hpp
@@ -332,7 +332,7 @@ private:
};
/**
- * A command class that binds an interface to an L3 table
+ * A command class that changes the MAC address on an interface
*/
class set_mac_cmd : public rpc_cmd<HW::item<l2_address_t>,
rc_t,
@@ -368,6 +368,50 @@ private:
};
/**
+ * A command class that enables detailed stats collection on an interface
+ */
+class collect_detail_stats_change_cmd
+ : public rpc_cmd<HW::item<interface::stats_type_t>,
+ rc_t,
+ vapi::Collect_detailed_interface_stats>
+{
+public:
+ /**
+ * Constructor taking the HW::item to update
+ * and the handle of the interface
+ */
+ collect_detail_stats_change_cmd(HW::item<interface::stats_type_t>& item,
+ const handle_t& h,
+ bool enable);
+
+ /**
+ * Issue the command to VPP/HW
+ */
+ rc_t issue(connection& con);
+
+ /**
+ * convert to string format for debug purposes
+ */
+ std::string to_string() const;
+
+ /**
+ * Comparison operator - only used for UT
+ */
+ bool operator==(const collect_detail_stats_change_cmd& i) const;
+
+private:
+ /**
+ * the handle of the interface to update
+ */
+ const handle_t& m_hdl;
+
+ /**
+ * enable or disable the detailed stats collection
+ */
+ bool m_enable;
+};
+
+/**
* A command class represents our desire to recieve interface events
*/
class events_cmd