aboutsummaryrefslogtreecommitdiffstats
path: root/src/vpp/app
diff options
context:
space:
mode:
authorOle Troan <ot@cisco.com>2019-02-26 16:37:03 +0100
committerNeale Ranns <nranns@cisco.com>2019-02-28 13:25:22 +0000
commit703908aaf4f80ef6bc78166d46eba3a3b3aa15f7 (patch)
tree35bf3939113a8e0db85ec41671cdbbdb4f96d687 /src/vpp/app
parent8b409635b44fd599eea37c7f259be294141a38bb (diff)
stats: Add interface name to sw_if_index as /if/names
Expose interface name to sw_if_index table as a directory node in the stats segment. Change-Id: Ie50e4af01997d141880f02e3a8496bfeb91b9944 Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'src/vpp/app')
-rw-r--r--src/vpp/app/vpp_get_stats.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/vpp/app/vpp_get_stats.c b/src/vpp/app/vpp_get_stats.c
index 1c1298e2afd..1d878029dda 100644
--- a/src/vpp/app/vpp_get_stats.c
+++ b/src/vpp/app/vpp_get_stats.c
@@ -220,6 +220,15 @@ reconnect:
fformat (stdout, "%.2f %s\n", res[i].scalar_value, res[i].name);
break;
+ case STAT_DIR_TYPE_NAME_VECTOR:
+ if (res[i].name_vector == 0)
+ continue;
+ for (k = 0; k < vec_len (res[i].name_vector); k++)
+ if (res[i].name_vector[k])
+ fformat (stdout, "[%d]: %s %s\n", k, res[i].name_vector[k],
+ res[i].name);
+ break;
+
default:
;
}