From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from prod-mail-xrelay08.akamai.com (localhost.localdomain [127.0.0.1]) by postfix.imss70 (Postfix) with ESMTP id AEACC2000D5; Fri, 22 Jul 2016 22:05:01 +0000 (GMT) Received: from prod-mail-relay09.akamai.com (prod-mail-relay09.akamai.com [172.27.22.68]) by prod-mail-xrelay08.akamai.com (Postfix) with ESMTP id 98D3E2000D4; Fri, 22 Jul 2016 22:05:01 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akamai.com; s=a1; t=1469225101; bh=dC3XOoWejUq7R9cpd8dlFK7qpOKOy1aSvs9SAfoqIRQ=; l=1210; h=From:To:Date:References:In-Reply-To:From; b=SgWFpumhl8gNMs7WTNVJJYFsZ1XOZT4wlIv7VdbF0cXfSrbbRb9V8UkmIWqeu/vr3 W4aELFdl8nD2xKhVDeoTRBppVsyCWjkeSLVldieacn8dGm/OW+3XjX474kEsAmW2bE CrDp7zeIlIpsMqoO4NpyPN2wkIttnePEssmiTAkY= Received: from email.msg.corp.akamai.com (ustx2ex-cas1.msg.corp.akamai.com [172.27.25.30]) by prod-mail-relay09.akamai.com (Postfix) with ESMTP id 95D171E08C; Fri, 22 Jul 2016 22:05:01 +0000 (GMT) Received: from ustx2ex-dag1mb6.msg.corp.akamai.com (172.27.27.107) by ustx2ex-dag1mb5.msg.corp.akamai.com (172.27.27.105) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Fri, 22 Jul 2016 17:05:01 -0500 Received: from ustx2ex-dag1mb6.msg.corp.akamai.com ([172.27.27.107]) by ustx2ex-dag1mb6.msg.corp.akamai.com ([172.27.27.107]) with mapi id 15.00.1178.000; Fri, 22 Jul 2016 15:05:01 -0700 From: "Sanford, Robert" To: Hiroyuki Mikita , "dev@dpdk.org" , Thomas Monjalon Thread-Topic: [PATCH] timer: fix incorrect pending-list manipulation Thread-Index: AQHR4DiHyo171yAVG0uzUvkXtaj1c6AlPAaA Date: Fri, 22 Jul 2016 22:05:01 +0000 Message-ID: References: <1468766139-29545-1-git-send-email-h.mikita89@gmail.com> In-Reply-To: <1468766139-29545-1-git-send-email-h.mikita89@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.4.3.140616 x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [172.19.133.74] Content-Type: text/plain; charset="us-ascii" Content-ID: <3DC686BE8175B2478CB72C50215B3032@akamai.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] timer: fix incorrect pending-list manipulation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jul 2016 22:05:02 -0000 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