From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8D768A053A; Tue, 4 Aug 2020 05:29:39 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C5C062BA8; Tue, 4 Aug 2020 05:29:38 +0200 (CEST) Received: from mail-il1-f196.google.com (mail-il1-f196.google.com [209.85.166.196]) by dpdk.org (Postfix) with ESMTP id 58A0A29D2 for ; Tue, 4 Aug 2020 05:29:37 +0200 (CEST) Received: by mail-il1-f196.google.com with SMTP id p13so4521184ilh.4 for ; Mon, 03 Aug 2020 20:29:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emumba-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=odJqkq6jLieZFslS5GO5xzP7YfT1HVFl3+jI+Pu95sY=; b=TD0yNHG4i7rBaWftvW7OaxtWqhX5j606hN08/ya9RyZkD9v/bqqLWau/ey+urWds2U 0zSWqTFkVRnZyuuHMuuBWYEZ2eIXZL2FPXM4w7D5LEznCY+GV5dMep4D3K08LRGLI5cL VEFKkfVRpD377QMRe14sw1LzC6TCzyPeouctPWynzfZFTzDUy3Oh0nJMchDz1IVcuhvK wWnzV3zW2/DDIe50R3w2R+y87Em+E4/K5J9WrlZX1AJBQNYoiYYEhzt0GRauWy69QtMy oj6LTtfq3cU4CBIFasfEOHucE559oeGhYSMAr3YQUqmdgxZvDkhaEVTHKwJlh1/zbNOX nzBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=odJqkq6jLieZFslS5GO5xzP7YfT1HVFl3+jI+Pu95sY=; b=f3e37KfD0kjq/lqxXA/DNurXG7nz3/afuAXhnqguCGg9prrklh5nGYeJy94Os8pLK0 q2FtA4cPbPnuJOBK7j6zlh3IrZ7YKy5WNsyRCeHf0msn6pY5159ECPdcn58Bh5OJ2e7Q KxdtNRQSQJKRIdBb79ILAtmtm8NNpquBK5Lqp/W4r02cnR+oOwAtqMxX9jRqeszrP/PG mXV22cojy6bHKFYpqmTqyc1QkawZ9dm+K8JtY/GXHElhArM2JUJQQXpBV37fwsvjC+eu CvSa9XP80YMljZWN3xHL0Av3EyXW+pylaa6B5sfEi6UbI0aQljIpt/s+Ala8OKzd1qzM fPog== X-Gm-Message-State: AOAM530Hejo0a99A7XMmjF4YZEvHT8D5WWnXXbTvR4C9oqEgLdcyDXCY tJFlLqhwbXctynUZfWlcQvo4Z+XP/6JG6GbBEHfa2A== X-Google-Smtp-Source: ABdhPJz5zWdGOD2vQkghTFJThmm7BDBaq0doWqGqYCbic5p3UjYYFGKOb57U1ggGoMQ/d5s+WkzGcDUYPSagV8Vx8bE= X-Received: by 2002:a92:9405:: with SMTP id c5mr2675500ili.150.1596511776582; Mon, 03 Aug 2020 20:29:36 -0700 (PDT) MIME-Version: 1.0 References: <20200803112059.23328-1-sarosh.arif@emumba.com> In-Reply-To: From: Sarosh Arif Date: Tue, 4 Aug 2020 08:28:59 +0500 Message-ID: To: Honnappa Nagarahalli , "erik.g.carrillo@intel.com" Cc: "rsanford@akamai.com" , "dev@dpdk.org" , nd Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH] doc: announce API change in timer X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Thank you Eric, I will fix the mistakes in v2 On Tue, Aug 4, 2020 at 4:16 AM Honnappa Nagarahalli wrote: > > > > > > > If the user tries to reset/stop some other timer in it's callback function, which > Is there any use case for this? Why not just say document that the user is not allowed to reset some other timer in the call back function? How does the user get access to some other timer in the call back function? > Not sure if this was discussed earlier, I might have missed. The issue is more clearly described in bug 491 here is a link: https://bugs.dpdk.org/show_bug.cgi?id=491 further discussion on this issue was done on the following patch: https://patches.dpdk.org/patch/73683/ > > > is also about to expire, using rte_timer_reset_sync/rte_timer_stop_sync the > > application goes into an infinite loop. This happens because > > rte_timer_reset_sync/rte_timer_stop_sync loop until the timer resets/stops > > and there is check inside timer_set_config_state which prevents a running > > timer from being reset/stopped by not it's own timer_cb. Therefore > > timer_set_config_state returns -1 due to which rte_timer_reset returns -1 and > > rte_timer_reset_sync goes into an infinite loop > > > > To to prevent this rte_timer_reset_sync and rte_timer_stop_sync should have > > int return types, so that -1 can be returned if the above condition occurs > > > > Signed-off-by: Sarosh Arif > > --- > > doc/guides/rel_notes/deprecation.rst | 6 ++++++ > > 1 file changed, 6 insertions(+) > > > > diff --git a/doc/guides/rel_notes/deprecation.rst > > b/doc/guides/rel_notes/deprecation.rst > > index ea4cfa7a4..ed93a707d 100644 > > --- a/doc/guides/rel_notes/deprecation.rst > > +++ b/doc/guides/rel_notes/deprecation.rst > > @@ -151,3 +151,9 @@ Deprecation Notices > > Python 2 support will be completely removed in 20.11. > > In 20.08, explicit deprecation warnings will be displayed when running > > scripts with Python 2. > > + > > +* timer: Since timer can get stuck in an infinite loop if the > > +application tries to > > + reset/stop some other timer in it's callback function, which is also > > +about to > > + expire. The function ``rte_timer_stop_sync`` and > > +``rte_timer_stop_sync`` will > > + have a int return type in order to return with -1 in when this > > +condition > > + occures. > > -- > > 2.17.1 >