aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOle Troan <ot@cisco.com>2018-10-17 09:28:23 +0200
committerDamjan Marion <dmarion@me.com>2018-10-17 09:30:02 +0000
commit34ca075636cc9a7974cd4483f28303137a7d42df (patch)
tree739ea6acc8272d695524c1aaf3a8447e67453b85
parentad65f88c51379c24580c3a986be806a5091c5396 (diff)
stats: vpp_get_stats missing last interface in dump
Change-Id: Ie1fa560cb255a9b13ddb4929da8f33286a8c137e Signed-off-by: Ole Troan <ot@cisco.com>
-rw-r--r--src/vpp/app/vpp_get_stats.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vpp/app/vpp_get_stats.c b/src/vpp/app/vpp_get_stats.c
index d500f8fdb90..1c1298e2afd 100644
--- a/src/vpp/app/vpp_get_stats.c
+++ b/src/vpp/app/vpp_get_stats.c
@@ -194,7 +194,7 @@ reconnect:
case STAT_DIR_TYPE_COUNTER_VECTOR_SIMPLE:
if (res[i].simple_counter_vec == 0)
continue;
- for (k = 0; k < vec_len (res[i].simple_counter_vec) - 1; k++)
+ for (k = 0; k < vec_len (res[i].simple_counter_vec); k++)
for (j = 0; j < vec_len (res[i].simple_counter_vec[k]); j++)
fformat (stdout, "[%d @ %d]: %llu packets %s\n",
j, k, res[i].simple_counter_vec[k][j],
@@ -202,7 +202,7 @@ reconnect:
break;
case STAT_DIR_TYPE_COUNTER_VECTOR_COMBINED:
- if (res[i].simple_counter_vec == 0)
+ if (res[i].combined_counter_vec == 0)
continue;
for (k = 0; k < vec_len (res[i].combined_counter_vec); k++)
for (j = 0; j < vec_len (res[i].combined_counter_vec[k]); j++)