summaryrefslogtreecommitdiffstats
path: root/src/vnet/adj
diff options
context:
space:
mode:
authorNeale Ranns <neale.ranns@cisco.com>2018-09-28 05:00:57 -0700
committerDamjan Marion <dmarion@me.com>2018-10-01 17:02:18 +0000
commit14260393c096b270ef318d74b481911c7def0496 (patch)
tree29bbd213ea550254b15131684e34032b4b8ab9e7 /src/vnet/adj
parent5df628bb8a30b69f223a7c8b017dcba770c87e43 (diff)
Add adjacency counters to the stats segment
Change-Id: I6b59df939c9daf40e261d73d19f500bd90abe6ff Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Diffstat (limited to 'src/vnet/adj')
-rw-r--r--src/vnet/adj/adj.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/vnet/adj/adj.c b/src/vnet/adj/adj.c
index 90e7e60a329..a06a12210bc 100644
--- a/src/vnet/adj/adj.c
+++ b/src/vnet/adj/adj.c
@@ -22,7 +22,10 @@
#include <vnet/fib/fib_node_list.h>
/* Adjacency packet/byte counters indexed by adjacency index. */
-vlib_combined_counter_main_t adjacency_counters;
+vlib_combined_counter_main_t adjacency_counters = {
+ .name = "adjacency",
+ .stat_segment_name = "/net/adjacency",
+};
/*
* the single adj pool
@@ -64,7 +67,8 @@ adj_alloc (fib_protocol_t proto)
/* Validate adjacency counters. */
vlib_validate_combined_counter(&adjacency_counters,
adj_get_index(adj));
-
+ vlib_zero_combined_counter(&adjacency_counters,
+ adj_get_index(adj));
fib_node_init(&adj->ia_node,
FIB_NODE_TYPE_ADJ);