From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f177.google.com (mail-wi0-f177.google.com [209.85.212.177]) by dpdk.org (Postfix) with ESMTP id BF22D593A for ; Fri, 23 May 2014 21:43:02 +0200 (CEST) Received: by mail-wi0-f177.google.com with SMTP id f8so1401286wiw.10 for ; Fri, 23 May 2014 12:43:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id; bh=rBNPQMGy9B3qYi/RMcCM2hjJqfDRDgyDcyyCN1MH708=; b=CFPLRyzhqFeHNDPETChVL/Dk0er9QwRXLShTTqvSCp5UgwP/1Mgmd9yjqjWcE+N8CA fhYFNJ34R8hfCc8NxrydXXYRI4a+/gnSgp92dM8g4Uaw3pFP//BIyHCgsQuFD8HQCLH9 gfDmdEy8kcaybJNphq2O7I4uClQo3FWXlvvbQJK5q7I/+vtpLEr8Ar4fLhoqyq7UwjMm e6crVtOVJGg/hOP67zLrBOPBPpZexty7lrqYPnsotxxb9soR3qrD2u89rJHlkLdAyx7F TRVlOj4K95FaoZxJXbe5X40pJbG4NC3Ft55mqV6le8COzmN8htqw06NS+KAZMZCFHoIJ 9HNw== X-Received: by 10.194.7.232 with SMTP id m8mr6240420wja.47.1400874192486; Fri, 23 May 2014 12:43:12 -0700 (PDT) Received: from ubuntu.ubuntu-domain ([109.66.146.135]) by mx.google.com with ESMTPSA id m5sm4464707wie.23.2014.05.23.12.43.11 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 23 May 2014 12:43:11 -0700 (PDT) From: Vadim Suraev To: dev@dpdk.org Date: Fri, 23 May 2014 22:43:02 +0300 Message-Id: <1400874184-15818-1-git-send-email-vadim.suraev@gmail.com> X-Mailer: git-send-email 1.7.9.5 Subject: [dpdk-dev] [PATCH 0/2] timer bugs fixes 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, 23 May 2014 19:43:03 -0000 Vadim Suraev (2): Bug: when a periodic timer's callback is running, if another timer is manipulated, the periodic timer is not reloaded. Solution: set the update flag only if the modified timer is in RUNNING state Bug: When a timer is running - if rte_timer_stop is called, the pending decrement is skipped (decremented only if the timer is pending) and due to the update flag the future processing is skipped so the timer is counted as pending while it is stopped. - the same applies when rte_timer_reset is called but then the pending statistics is additionally incremented so the timer is counted pending twice. Solution: decrement the pending statistics after returning from the callback. If rte_timer_stop was called, it skipped decrementing the pending statistics. If rte_time_reset was called, the pending statistics was incremented. If neither was called and the timer is periodic, the pending statistics is incremented when it is reloaded lib/librte_timer/rte_timer.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) -- 1.7.9.5