aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/interface.h
diff options
context:
space:
mode:
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;