From: Karmarkar Suyash Date: Wed, 21 Sep 2016 20:54:27 +0000 (-0400) Subject: timer: fix lag delay X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=0778cfe8642a08934724cf34a4bb2f1fba91cc88;p=dpdk.git timer: fix lag delay For periodic timers, if the lag gets introduced, the current code added additional delay when the next peridoc timer was initialized by not taking into account the delay added, with this fix the code would start the next occurrence of timer keeping in account the lag added. Corrected the behavior. Fixes: 9b15ba89 ("timer: use a skip list") Signed-off-by: Karmarkar Suyash Acked-by: Robert Sanford --- diff --git a/lib/librte_timer/rte_timer.c b/lib/librte_timer/rte_timer.c index 43da836546..18782fab0a 100644 --- a/lib/librte_timer/rte_timer.c +++ b/lib/librte_timer/rte_timer.c @@ -613,7 +613,7 @@ void rte_timer_manage(void) status.owner = (int16_t)lcore_id; rte_wmb(); tim->status.u32 = status.u32; - __rte_timer_reset(tim, cur_time + tim->period, + __rte_timer_reset(tim, tim->expire + tim->period, tim->period, lcore_id, tim->f, tim->arg, 1); rte_spinlock_unlock(&priv_timer[lcore_id].list_lock); }