summaryrefslogtreecommitdiffstats
path: root/src/vnet/interface.h
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/vnet/interface.h
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/vnet/interface.h')
-rw-r--r--src/vnet/interface.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/vnet/interface.h b/src/vnet/interface.h
index 62fdc601e99..00a7353d701 100644
--- a/src/vnet/interface.h
+++ b/src/vnet/interface.h
@@ -633,25 +633,25 @@ typedef enum
VNET_N_SIMPLE_INTERFACE_COUNTER = 9,
/* Combined counters. */
VNET_INTERFACE_COUNTER_RX = 0,
- VNET_INTERFACE_COUNTER_TX = 1,
- 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_RX_UNICAST = 1,
+ VNET_INTERFACE_COUNTER_RX_MULTICAST = 2,
+ VNET_INTERFACE_COUNTER_RX_BROADCAST = 3,
+ VNET_INTERFACE_COUNTER_TX = 4,
+ VNET_INTERFACE_COUNTER_TX_UNICAST = 5,
+ VNET_INTERFACE_COUNTER_TX_MULTICAST = 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)
+#define foreach_rx_combined_interface_counter(_x) \
+ for (_x = VNET_INTERFACE_COUNTER_RX; \
+ _x <= VNET_INTERFACE_COUNTER_RX_BROADCAST; \
+ _x++)
+
+#define foreach_tx_combined_interface_counter(_x) \
+ for (_x = VNET_INTERFACE_COUNTER_TX; \
+ _x <= VNET_INTERFACE_COUNTER_TX_BROADCAST; \
+ _x++)
typedef enum
{