dev: fix counter_start in counter clear routine
This patch fixes counter_start value, as it should hold the cumulative
counter value whenever counter clear routine is called.
Type: fix
Fixes: 38c619115b
Change-Id: I50bf8ddcde419caf1170dfacdea03ff3d93a3327
Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com>
This commit is contained in:

committed by
Damjan Marion

parent
a391de68ac
commit
afd03ffff5
@ -54,7 +54,7 @@ vnet_dev_counters_clear (vlib_main_t *vm, vnet_dev_counter_main_t *cm)
|
||||
{
|
||||
for (int i = 0; i < cm->n_counters; i++)
|
||||
{
|
||||
cm->counter_start[i] = cm->counter_data[i];
|
||||
cm->counter_start[i] += cm->counter_data[i];
|
||||
cm->counter_data[i] = 0;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user