From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f194.google.com (mail-pf0-f194.google.com [209.85.192.194]) by dpdk.org (Postfix) with ESMTP id A70A81DB1 for ; Sun, 17 Jul 2016 19:36:01 +0200 (CEST) Received: by mail-pf0-f194.google.com with SMTP id g202so10030180pfb.1 for ; Sun, 17 Jul 2016 10:36:01 -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=AfSUQLbkYZkCBLARAxu1d5W0Rp8iPwaRyDZqx2JynhU=; b=D1cEDS8WPRf0DLQ4JI8FTFHERql5Gk/Pmb9972fzVr/hpuoBv/aLTwK4yI3C/MJbTY QpAGrr3QtKKBr7/TFzRgyanpoIZgcnn8uH0dqeF3jB7gJjj/zUzRDLv+YiD3iWBdvlc1 0o7Th0/DlJndmDVbvdZvrMuJ/xvXl/13NPyBNwVVxH8/Ooizkx6YeRBf25U/fyuZelBF 3XE3udP7XEO+flCCR4qs3I54f3iR8pthWVFafVhQzlFBwSv6nMIVEdtiLUOZoS6C3bTc AHTdaZUO+Tv0szkuUcJO9bxrpEtz8z71PMlf9iqWvOlYRwYiWSnAwZblAo4S0VL5jrZD W6pA== 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=AfSUQLbkYZkCBLARAxu1d5W0Rp8iPwaRyDZqx2JynhU=; b=WiM6hjuoYDbsuxj54HzGc0EEvcAojO0HE8rwyE8vqo5svSNuisU58GjcseID87/E4d eMWMPFdHoFvOJ5PYF9Crq4Bv8/FoY61o+8Yhw23bSCOFRhcH8pNnv/YWCjwAtNh3IcGT HdXJnGPeXEFKhf0z1e8iucI/Px8fy+potDmZ6X2iqjO8zsR+hWWh80OOiPCtCjK1ETp0 rE38MKlrz7JGtBYvC2UG9CDdtPr9J3tuOAwOM2z5i0qQRGOILIGnyQKWGjqcBwpnsExx DZY8jBCzR+tXVD1HQWF/5sJYJP+pn36SauEYhXXx/prsG9i2BoOeG0DhSAjXgpkTuthO ikJw== X-Gm-Message-State: ALyK8tJOr0tjBjlL3G3aWt7K1jCdtqXhp55gANo2FSyfFwqOB9IKfXBulJHanghVqacpJg== X-Received: by 10.98.210.69 with SMTP id c66mr16404896pfg.71.1468776961014; Sun, 17 Jul 2016 10:36:01 -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 d5sm828494pfa.44.2016.07.17.10.35.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 17 Jul 2016 10:36:00 -0700 (PDT) From: Hiroyuki Mikita To: rsanford@akamai.com Cc: dev@dpdk.org Date: Mon, 18 Jul 2016 02:35:50 +0900 Message-Id: <1468776950-32693-1-git-send-email-h.mikita89@gmail.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [PATCH] timer: remove unnecessary timer add call 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 17:36:01 -0000 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 Signed-off-by: Hiroyuki Mikita --- lib/librte_timer/rte_timer.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/librte_timer/rte_timer.c b/lib/librte_timer/rte_timer.c index 3dcdab5..94878d3 100644 --- a/lib/librte_timer/rte_timer.c +++ b/lib/librte_timer/rte_timer.c @@ -562,10 +562,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); } } -- 2.7.4