From 1ec0ea85c3f57f4638e32a00396057f80d958ec9 Mon Sep 17 00:00:00 2001 From: Ole Troan Date: Thu, 14 Jun 2018 09:28:27 +0200 Subject: STATS: Add more hierarchy to counters. Put error counters under node_index. /err// E.g: /err/ip4-lookup/Hash table collisions /err/ip6-rewrite/Buffer allocation error Error names are not globally unique, and this allows for walking all errors for a particular node. Put interface counters under the directory /if. E.g. /if/rx Put system counters under the directory /sys. E.g. /sys/vector_rate Change-Id: I5b794d16698f61bcb2063a8cd77a7c4ae36419b8 Signed-off-by: Ole Troan --- src/vnet/interface.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/vnet/interface.h') diff --git a/src/vnet/interface.h b/src/vnet/interface.h index b582dba7c8d..1181c341a0c 100644 --- a/src/vnet/interface.h +++ b/src/vnet/interface.h @@ -737,6 +737,26 @@ typedef enum _x <= VNET_INTERFACE_COUNTER_TX_BROADCAST; \ _x++) +#define foreach_simple_interface_counter_name \ + _(DROP, drops, if) \ + _(PUNT, punt, if) \ + _(IP4, ip4, if) \ + _(IP6, ip6, if) \ + _(RX_NO_BUF, rx-no-buf, if) \ + _(RX_MISS, rx-miss, if) \ + _(RX_ERROR, rx-error, if) \ + _(TX_ERROR, tx-error, if) + +#define foreach_combined_interface_counter_name \ + _(RX, rx, if) \ + _(RX_UNICAST, rx-unicast, if) \ + _(RX_MULTICAST, rx-multicast, if) \ + _(RX_BROADCAST, rx-broadcast, if) \ + _(TX, tx, if) \ + _(TX_UNICAST, tx-unicast-miss, if) \ + _(TX_MULTICAST, tx-multicast, if) \ + _(TX_BROADCAST, tx-broadcast, if) + typedef enum { COLLECT_SIMPLE_STATS = 0, -- cgit 1.2.3-korg