summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroyuki Mikita <h.mikita89@gmail.com>2016-07-18 02:35:50 +0900
committerThomas Monjalon <thomas.monjalon@6wind.com>2016-07-25 17:55:12 +0200
commita829d41f9dd286c70e1bef26aca666473fde74fb (patch)
tree3c08f1ad18878c5db28deb07f0992e577253df20
parentd43baa8503741a0df3feb890265084c22e3fd3ba (diff)
downloaddpdk-a829d41f9dd286c70e1bef26aca666473fde74fb.zip
dpdk-a829d41f9dd286c70e1bef26aca666473fde74fb.tar.gz
dpdk-a829d41f9dd286c70e1bef26aca666473fde74fb.tar.xz
timer: remove unnecessary list insertion
When timer_set_running_state() fails in rte_timer_manage(), the failed timer is put back on pending-list. In this case, another core tries to reset or stop the timer. It does not need to be on pending-list. Fixes: a4b7a5a45cf5 ("timer: fix race condition") Signed-off-by: Hiroyuki Mikita <h.mikita89@gmail.com> Acked-by: Robert Sanford <rsanford@akamai.com>
-rw-r--r--lib/librte_timer/rte_timer.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/librte_timer/rte_timer.c b/lib/librte_timer/rte_timer.c
index 7457d32..3f21f2d 100644
--- a/lib/librte_timer/rte_timer.c
+++ b/lib/librte_timer/rte_timer.c
@@ -564,10 +564,9 @@ void rte_timer_manage(void)
pprev = &tim->sl_next[0];
} else {
/* another core is trying to re-config this one,
- * remove it from local expired list and put it
- * back on the priv_timer[] skip list */
+ * remove it from local expired list
+ */
*pprev = next_tim;
- timer_add(tim, lcore_id, 1);
}
}