aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/map')
-rw-r--r--src/vnet/map/map.c2
-rw-r--r--src/vnet/map/map_api.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/vnet/map/map.c b/src/vnet/map/map.c
index 7006b1db8f1..99305afaf41 100644
--- a/src/vnet/map/map.c
+++ b/src/vnet/map/map.c
@@ -1304,7 +1304,7 @@ show_map_stats_command_fn (vlib_main_t * vm, unformat_input_t * input,
{
which = cm - mm->domain_counters;
- for (i = 0; i < vec_len (cm->maxi); i++)
+ for (i = 0; i < vlib_combined_counter_n_counters (cm); i++)
{
vlib_get_combined_counter (cm, i, &v);
total_pkts[which] += v.packets;
diff --git a/src/vnet/map/map_api.c b/src/vnet/map/map_api.c
index 7febeb3d7a3..d618e7a65bf 100644
--- a/src/vnet/map/map_api.c
+++ b/src/vnet/map/map_api.c
@@ -211,7 +211,7 @@ vl_api_map_summary_stats_t_handler (vl_api_map_summary_stats_t * mp)
{
which = cm - mm->domain_counters;
- for (i = 0; i < vec_len (cm->maxi); i++)
+ for (i = 0; i < vlib_combined_counter_n_counters (cm); i++)
{
vlib_get_combined_counter (cm, i, &v);
total_pkts[which] += v.packets;