[dpdk-dev] [PATCH] timer bug fix.
Thomas Monjalon
thomas.monjalon at 6wind.com
Mon May 26 18:25:49 CEST 2014
> > Bug: When a timer is running
> >
> > - if rte_timer_stop is called, the pending decrement is
> > skipped (decremented only if the timer is pending) and due
> > to the update flag the future processing is skipped so the
> > timer is counted as pending while it is stopped. - the same
> > applies when rte_timer_reset is called but then the pending
> > statistics is additionally incremented so the timer is
> > counted pending twice.
> >
> > Solution: decrement the pending
> >
> > statistics after returning from the callback. If
> > rte_timer_stop was called, it skipped decrementing the
> > pending statistics. If rte_time_reset was called, the
> > pending statistics was incremented. If neither was called
> > and the timer is periodic, the pending statistics is
> > incremented when it is reloaded
> >
> > Signed-off-by: Vadim Suraev <vadim.suraev at gmail.com>
>
> Acked-by: Olivier Matz <olivier.matz at 6wind.com>
Applied for version 1.7.0 with title:
timer: fix pending counter
Thanks
--
Thomas
More information about the dev
mailing list