patches for DPDK stable branches
 help / color / mirror / Atom feed
From: "Carrillo, Erik G" <erik.g.carrillo@intel.com>
To: Jerin Jacob <jerinjacobk@gmail.com>,
	Stephen Hemminger <stephen@networkplumber.org>
Cc: "jerinj@marvell.com" <jerinj@marvell.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	 "stable@dpdk.org" <stable@dpdk.org>
Subject: RE: [PATCH v2] eventdev/timer: fix overflow issue
Date: Tue, 7 Feb 2023 22:02:00 +0000	[thread overview]
Message-ID: <IA1PR11MB6418E732E02977885C4CCCA6B9DB9@IA1PR11MB6418.namprd11.prod.outlook.com> (raw)
In-Reply-To: <CALBAE1PaWLhXU=1AAFDHNu1hqnE3w1e6GL2XE1i0vSU6cVf3iw@mail.gmail.com>



> -----Original Message-----
> From: Jerin Jacob <jerinjacobk@gmail.com>
> Sent: Tuesday, February 7, 2023 12:01 AM
> To: Carrillo, Erik G <erik.g.carrillo@intel.com>; Stephen Hemminger
> <stephen@networkplumber.org>
> Cc: jerinj@marvell.com; dev@dpdk.org; stable@dpdk.org
> Subject: Re: [PATCH v2] eventdev/timer: fix overflow issue
> 
> On Wed, Jan 25, 2023 at 2:16 AM Erik Gabriel Carrillo
> <erik.g.carrillo@intel.com> wrote:
> >
> > The software timer adapter converts event timer timeout ticks to a
> > number of CPU cycles at which an rte_timer should expire. The
> > computation uses integer operations that can result in overflow.
> >
> > Use floating point operations instead to perform the computation, and
> > convert the final result back to an integer type when returning. Also
> > move the logic that checks the timeout range into the function that
> > performs the above computation.
> >
> > Fixes: 6750b21bd6af ("eventdev: add default software timer adapter")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
> > ---
> > v2:
> > * Fix implicit int to float conversion build warning on Clang
> 
> Not yet addressed the @Stephen Hemminger  comments on using of
> rte_reciprocal. Also means to check what compute can be moved to
> slowpath.
> Marking as "Change requested", Looking for next version.
> 
> 

Ok - thanks for the pointer to rte_reciprocal.   I'll rework and submit a new version.

Regards,
Erik

  reply	other threads:[~2023-02-07 22:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-24 16:09 [PATCH] " Erik Gabriel Carrillo
2023-01-24 20:45 ` [PATCH v2] " Erik Gabriel Carrillo
2023-02-07  6:00   ` Jerin Jacob
2023-02-07 22:02     ` Carrillo, Erik G [this message]
2023-02-09 15:13   ` [PATCH v3] " Erik Gabriel Carrillo
2023-02-10  6:47     ` Jerin Jacob
2023-01-25  2:47 ` [PATCH] " Stephen Hemminger
2023-01-25  5:07   ` Jerin Jacob
2023-01-25 14:53     ` Stephen Hemminger

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=IA1PR11MB6418E732E02977885C4CCCA6B9DB9@IA1PR11MB6418.namprd11.prod.outlook.com \
    --to=erik.g.carrillo@intel.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=jerinjacobk@gmail.com \
    --cc=stable@dpdk.org \
    --cc=stephen@networkplumber.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).