Hi Vadim, It's even more simple that what I've suggested. It should work since the only case where state is RTE_TIMER_RUNNING is that we are modifying the timer currently running on the same lcore. Indeed, timer_set_config_state() prevents us to modify a running timer belonging to another lcore.
Just 3 small typos: On 05/21/2014 09:53 PM, Vadim Suraev wrote: > Bug: when a periodic timer's callback is running, if another > timer is manipulated, the periodic timer is not reloaded. > Solution: set the update flag only is the modified timer is > in RUNNING state s/is the modified/if the modified > - priv_timer[lcore_id].updated = 1; > + if(prev_status.state == RTE_TIMER_RUNNING) { > + priv_timer[lcore_id].updated = 1; > + } missing a space after the if. > - priv_timer[lcore_id].updated = 1; > + if(prev_status.state == RTE_TIMER_RUNNING) { > + priv_timer[lcore_id].updated = 1; > + } same here. Acked-by: Olivier Matz <olivier.matz at 6wind.com>