From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sanford, Robert" Subject: Re: [PATCH] timer: fix incorrect pending-list manipulation Date: Fri, 22 Jul 2016 22:05:01 +0000 Message-ID: References: <1468766139-29545-1-git-send-email-h.mikita89@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable To: Hiroyuki Mikita , "dev@dpdk.org" , Thomas Monjalon Return-path: Received: from prod-mail-xrelay08.akamai.com (prod-mail-xrelay08.akamai.com [96.6.114.112]) by dpdk.org (Postfix) with ESMTP id 67D5E5680 for ; Sat, 23 Jul 2016 00:05:02 +0200 (CEST) In-Reply-To: <1468766139-29545-1-git-send-email-h.mikita89@gmail.com> Content-Language: en-US Content-ID: <3DC686BE8175B2478CB72C50215B3032@akamai.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 7/17/16 10:35 AM, "Hiroyuki Mikita" wrote: >This commit fixes incorrect pending-list manipulation >when getting list of expired timers in rte_timer_manage(). > >When timer_get_prev_entries() sets pending_head on prev, >the pending-list is broken. >The next of pending_head always becomes NULL. >In this depth level, it is not need to manipulate the list. > >Signed-off-by: Hiroyuki Mikita >--- > lib/librte_timer/rte_timer.c | 2 ++ > 1 file changed, 2 insertions(+) > >diff --git a/lib/librte_timer/rte_timer.c b/lib/librte_timer/rte_timer.c >index 3dcdab5..7457d32 100644 >--- a/lib/librte_timer/rte_timer.c >+++ b/lib/librte_timer/rte_timer.c >@@ -543,6 +543,8 @@ void rte_timer_manage(void) > /* break the existing list at current time point */ > timer_get_prev_entries(cur_time, lcore_id, prev); > for (i =3D priv_timer[lcore_id].curr_skiplist_depth -1; i >=3D 0; i--) { >+ if (prev[i] =3D=3D &priv_timer[lcore_id].pending_head) >+ continue; > priv_timer[lcore_id].pending_head.sl_next[i] =3D > prev[i]->sl_next[i]; > if (prev[i]->sl_next[i] =3D=3D NULL) >--=20 >2.7.4 > Acked-by: Robert Sanford