diff options
author | 2019-04-15 08:53:46 +0200 | |
---|---|---|
committer | 2019-04-16 15:55:42 +0000 | |
commit | cbb8f589638c2634b44ee2de24c76696f983645a (patch) | |
tree | b725f28fb93f7e3f2db26719821c761146eec9f7 /src/vpp | |
parent | 47feb1146ec3b0e1cf2ebd83cd5211e1df261194 (diff) |
stats: Add name vectors to Python client
Change-Id: Ic62dfa0bf3e082a0b999026830c64a9c543da586
Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'src/vpp')
-rw-r--r-- | src/vpp/stats/stat_segment.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vpp/stats/stat_segment.c b/src/vpp/stats/stat_segment.c index 05b8cdcb34d..2cf82b97f18 100644 --- a/src/vpp/stats/stat_segment.c +++ b/src/vpp/stats/stat_segment.c @@ -427,7 +427,7 @@ update_node_counters (stat_segment_main_t * sm) stat_validate_counter_vector (&sm->directory_vector [STAT_COUNTER_NODE_SUSPENDS], l); - vec_validate (sm->nodes, l); + vec_validate (sm->nodes, l - 1); stat_segment_directory_entry_t *ep; ep = &sm->directory_vector[STAT_COUNTER_NODE_NAMES]; ep->offset = stat_segment_offset (shared_header, sm->nodes); @@ -437,8 +437,9 @@ update_node_counters (stat_segment_main_t * sm) ep->offset_vector ? stat_segment_pointer (shared_header, ep->offset_vector) : 0; /* Update names dictionary */ - vec_validate (offset_vector, l); + vec_validate (offset_vector, l - 1); vlib_node_t **nodes = node_dups[0]; + for (i = 0; i < vec_len (nodes); i++) { vlib_node_t *n = nodes[i]; |