From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f67.google.com (mail-pa0-f67.google.com [209.85.220.67]) by dpdk.org (Postfix) with ESMTP id 2DDEC5690 for ; Sun, 17 Jul 2016 16:35:54 +0200 (CEST) Received: by mail-pa0-f67.google.com with SMTP id hh10so9376877pac.1 for ; Sun, 17 Jul 2016 07:35:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=I7F4RopZvjN3MCTVzNd0Aqh1sFJXUFBrsCh7mwV5aqU=; b=CHG6GROT8L2J7+KK0UHw8yk8GcJPRZVV0dgOIqdqX6s7B4sLY5M11CFNshmwJTFDe1 3AsItd0ggrrys+3HUMiAvALWEuCE8Y1TQlqFjSQckxngh1ToA4GOeKNCBg8yazb1jOuJ atPYcBTUO1GAF1W3hEZmF3qBQhFHYX6kc+qUaZASq4euPnqi7erH4zkTrF8BkmC9gOfC UMhZJwt1QTCtw2DW/yvlzllkliyh2Qa2WVWkioXP/p9O5VUdbsrD7SgjR+xOHKHT2YvG SGI/jn+NIc0pxwKFvinXQhYKmXCr1etortUFX2pkPllfzDJCIRq3mwxWuOXfZQ6RqTNJ idnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=I7F4RopZvjN3MCTVzNd0Aqh1sFJXUFBrsCh7mwV5aqU=; b=CVOVxRZ80cSiif/njgXudphcRnPdfg2jQ4leA8lTHf8Nr2EZtrAzlYFHxb4B/V73cX mnFWUwekOQK8h1LaNTEUmWGlhJQ0Y+CF3z6gHzbFrvTL6bGGoynu0z2pCEE4PhJpJXS7 tOnwYvrYVj2a5E+n9cAMQMNX1jJL1V1VabmCfyKtrS9Cujfa8ZYs+8X1LF9IHENOsGKJ o/Rp7wAURMwmmI3jr7kd6MgTdBlfA+jr0nDZYNwcUnpAeQGmDcdQjoj/1pgSOok5w7mR ht9efJPGe4NMIwmph0uO/JvLShrs7aFPhFWZbm8sdFzDriPdidi4pyxG2L5g3J7zSeRy YTMw== X-Gm-Message-State: ALyK8tJh43ZQrEFAjS7tT3aIj1xwN8pEdsJ3t/aC+ArMleOGCVIMufFDEq5hyNrwZRYa1Q== X-Received: by 10.66.229.9 with SMTP id sm9mr1313930pac.138.1468766153398; Sun, 17 Jul 2016 07:35:53 -0700 (PDT) Received: from localhost.localdomain (183.180.67.214.ap.gmobb-fix.jp. [183.180.67.214]) by smtp.gmail.com with ESMTPSA id g3sm1611236pal.9.2016.07.17.07.35.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 17 Jul 2016 07:35:52 -0700 (PDT) From: Hiroyuki Mikita To: rsanford@akamai.com Cc: dev@dpdk.org Date: Sun, 17 Jul 2016 23:35:39 +0900 Message-Id: <1468766139-29545-1-git-send-email-h.mikita89@gmail.com> X-Mailer: git-send-email 2.7.4 Subject: [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: Sun, 17 Jul 2016 14:35:54 -0000 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 = priv_timer[lcore_id].curr_skiplist_depth -1; i >= 0; i--) { + if (prev[i] == &priv_timer[lcore_id].pending_head) + continue; priv_timer[lcore_id].pending_head.sl_next[i] = prev[i]->sl_next[i]; if (prev[i]->sl_next[i] == NULL) -- 2.7.4