All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Carrillo, Erik G" <erik.g.carrillo@intel.com>
To: Sarosh Arif <sarosh.arif@emumba.com>,
	"rsanford@akamai.com" <rsanford@akamai.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] doc: announce API change in timer
Date: Mon, 3 Aug 2020 16:45:52 +0000	[thread overview]
Message-ID: <CY4PR1101MB211879B5425014A65AAB727EB94D0@CY4PR1101MB2118.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20200803112059.23328-1-sarosh.arif@emumba.com>

> -----Original Message-----
> From: Sarosh Arif <sarosh.arif@emumba.com>
> Sent: Monday, August 3, 2020 6:21 AM
> To: Carrillo, Erik G <erik.g.carrillo@intel.com>; rsanford@akamai.com
> Cc: dev@dpdk.org; Sarosh Arif <sarosh.arif@emumba.com>
> Subject: [PATCH] doc: announce API change in timer
> 
> 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
> 
> 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 <sarosh.arif@emumba.com>
> ---
>  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

It looks like this should be rte_timer_reset_sync.  Maybe something like:

timer:  Timers can get stuck in an infinite loop if their callback tries to synchronously reset/stop some other timer that is also about to expire.  The functions ``rte_timer_reset_sync`` and ``rte_timer_stop_sync`` will updated with an int return type so that an error code can be returned when this condition occurs.

Thanks,
Erik

> +``rte_timer_stop_sync``  will
> +  have a int return type in order to return with -1 in when this
> +condition
> +  occures.
> --
> 2.17.1


  reply	other threads:[~2020-08-03 16:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-03 11:20 [dpdk-dev] [PATCH] doc: announce API change in timer Sarosh Arif
2020-08-03 16:45 ` Carrillo, Erik G [this message]
2020-08-03 23:16 ` Honnappa Nagarahalli
2020-08-04  3:28   ` Sarosh Arif
2020-08-04 14:24     ` Carrillo, Erik G
2020-08-04 20:50       ` Honnappa Nagarahalli
2020-08-04  3:51 ` [dpdk-dev] [PATCH v2] " Sarosh Arif

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=CY4PR1101MB211879B5425014A65AAB727EB94D0@CY4PR1101MB2118.namprd11.prod.outlook.com \
    --to=erik.g.carrillo@intel.com \
    --cc=dev@dpdk.org \
    --cc=rsanford@akamai.com \
    --cc=sarosh.arif@emumba.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.