summaryrefslogtreecommitdiffstats
path: root/src/vnet/interface.h
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2018-03-16 16:26:21 -0700
committerDave Barach <openvpp@barachs.net>2018-03-19 15:56:23 +0000
commit6f4a6be8f222dd8caa94d19a7e4d87cb864ba7f4 (patch)
treecadc511a5926926133b3bbb4ca9c7b4239d3b2eb /src/vnet/interface.h
parent7b867a8e491357058d37838091ed67a2e77bce2c (diff)
Interface Unicast, Multicast and Broadcast stats on the API
Change-Id: I7c75da358aff1bd0216a602a49f2909cef5d920d Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/interface.h')
-rw-r--r--src/vnet/interface.h36
1 files changed, 35 insertions, 1 deletions
diff --git a/src/vnet/interface.h b/src/vnet/interface.h
index 8988eb0e8aa..73f1895b74f 100644
--- a/src/vnet/interface.h
+++ b/src/vnet/interface.h
@@ -634,9 +634,43 @@ typedef enum
/* Combined counters. */
VNET_INTERFACE_COUNTER_RX = 0,
VNET_INTERFACE_COUNTER_TX = 1,
- VNET_N_COMBINED_INTERFACE_COUNTER = 2,
+ VNET_INTERFACE_COUNTER_RX_UNICAST = 2,
+ VNET_INTERFACE_COUNTER_TX_UNICAST = 3,
+ VNET_INTERFACE_COUNTER_RX_MULTICAST = 4,
+ VNET_INTERFACE_COUNTER_TX_MULTICAST = 5,
+ VNET_INTERFACE_COUNTER_RX_BROADCAST = 6,
+ VNET_INTERFACE_COUNTER_TX_BROADCAST = 7,
+ VNET_N_COMBINED_INTERFACE_COUNTER = 8,
} vnet_interface_counter_type_t;
+#define foreach_combined_interface_counter(X) \
+ X(VNET_INTERFACE_COUNTER_RX, rx) \
+ X(VNET_INTERFACE_COUNTER_TX, tx) \
+ X(VNET_INTERFACE_COUNTER_RX_UNICAST, rx_unicast) \
+ X(VNET_INTERFACE_COUNTER_TX_UNICAST, tx_unicast) \
+ X(VNET_INTERFACE_COUNTER_RX_MULTICAST, rx_multicast) \
+ X(VNET_INTERFACE_COUNTER_TX_MULTICAST, tx_multicast) \
+ X(VNET_INTERFACE_COUNTER_RX_BROADCAST, rx_broadcast) \
+ X(VNET_INTERFACE_COUNTER_TX_BROADCAST, tx_broadcast)
+
+typedef enum
+{
+ COLLECT_SIMPLE_STATS = 0,
+ COLLECT_DETAILED_STATS = 1,
+} vnet_interface_stats_collection_mode_e;
+
+extern int collect_detailed_interface_stats_flag;
+
+static inline int
+collect_detailed_interface_stats ()
+{
+ return collect_detailed_interface_stats_flag;
+}
+
+void collect_detailed_interface_stats_flag_set ();
+void collect_detailed_interface_stats_flag_clear ();
+
+
typedef struct
{
u32 output_node_index;