DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Sarosh Arif <sarosh.arif@emumba.com>
Cc: rsanford@akamai.com, erik.g.carrillo@intel.com, dev@dpdk.org,
	stable@dpdk.org, h.mikita89@gmail.com
Subject: Re: [dpdk-dev] [PATCH v3] lib/librte_timer:fix corruption with reset
Date: Fri, 10 Jul 2020 08:19:10 -0700	[thread overview]
Message-ID: <20200710081910.442d3248@hermes.lan> (raw)
In-Reply-To: <20200710065954.4937-1-sarosh.arif@emumba.com>

On Fri, 10 Jul 2020 11:59:54 +0500
Sarosh Arif <sarosh.arif@emumba.com> wrote:

> If the user tries to reset/stop some other timer in it's callback
> function, which 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. 
> 
> The soloution to this problem is to return -1 from 
> rte_timer_reset_sync/rte_timer_stop_sync in case the user tries to 
> reset/stop some other timer in it's callback function.
> 
> Bugzilla ID: 491
> Fixes: 20d159f20543 ("timer: fix corruption with reset")
> Cc: h.mikita89@gmail.com
> Signed-off-by: Sarosh Arif <sarosh.arif@emumba.com>
> ---
> v2: remove line continuations
> v3: separate code and declarations

If you want to change the return value, you need to go through the steps
in the API/ABI policy. Maybe even symbol versioning.

Sorry, I know it is painful but we committed to the rules.
And changing the return value can never go to stable.


  reply	other threads:[~2020-07-10 15:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-07  9:03 [dpdk-dev] [PATCH] " Sarosh Arif
2020-07-07 16:09 ` Stephen Hemminger
2020-07-08  5:06 ` [dpdk-dev] [PATCH v2] " Sarosh Arif
2020-07-08 15:07   ` Stephen Hemminger
2020-07-09  7:05     ` Sarosh Arif
2020-07-08 15:08   ` Stephen Hemminger
2020-07-09  7:02     ` Sarosh Arif
2020-07-10  6:59 ` [dpdk-dev] [PATCH v3] " Sarosh Arif
2020-07-10 15:19   ` Stephen Hemminger [this message]
2020-07-28 19:04   ` Carrillo, Erik G

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200710081910.442d3248@hermes.lan \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=erik.g.carrillo@intel.com \
    --cc=h.mikita89@gmail.com \
    --cc=rsanford@akamai.com \
    --cc=sarosh.arif@emumba.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).