[PATCH v1] Signed-off-by: Karmarkar Suyash <skarmarkar@sonusnet.com> For Recurring/Periodic timers , if the lag gets introduced and it was keeping the lag consistently. Corrected the behavior so that it will correct itself even if it lags.

DORMANTno replies

From: Karmarkar Suyash <hidden>
Date: 2016-08-25 02:18:17
Subsystem: library code, the rest · Maintainers: Andrew Morton, Linus Torvalds

---
 lib/librte_timer/rte_timer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_timer/rte_timer.c b/lib/librte_timer/rte_timer.c
index 43da836..18782fa 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);
 		}
-- 
2.9.3.windows.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help