From: "Dumitrescu, Cristian" <cristian.dumitrescu@intel.com>
To: Stephen Hemminger <stephen@networkplumber.org>,
"dev@dpdk.org" <dev@dpdk.org>
Cc: "Singh, Jasvinder" <jasvinder.singh@intel.com>,
Wojciech Liguzinski <wojciechx.liguzinski@intel.com>
Subject: RE: [PATCH v5 2/3] rte_pie: remove unnecessary floating point
Date: Mon, 30 May 2022 11:50:02 +0000 [thread overview]
Message-ID: <DM8PR11MB5670CCADC6FCEC9BF585C3B7EBDD9@DM8PR11MB5670.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20220526202653.99796-3-stephen@networkplumber.org>
> -----Original Message-----
> From: Stephen Hemminger <stephen@networkplumber.org>
> Sent: Thursday, May 26, 2022 9:27 PM
> To: dev@dpdk.org
> Cc: Stephen Hemminger <stephen@networkplumber.org>; Dumitrescu,
> Cristian <cristian.dumitrescu@intel.com>; Singh, Jasvinder
> <jasvinder.singh@intel.com>; Wojciech Liguzinski
> <wojciechx.liguzinski@intel.com>
> Subject: [PATCH v5 2/3] rte_pie: remove unnecessary floating point
>
> The qdelay variable is derived from and compared to 64 bit
> value so it doesn't have to be floating point.
>
> Fixes: 44c730b0e379 ("sched: add PIE based congestion management")
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
> lib/sched/rte_pie.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/sched/rte_pie.h b/lib/sched/rte_pie.h
> index 02a987f54ad1..3e2c1ef46721 100644
> --- a/lib/sched/rte_pie.h
> +++ b/lib/sched/rte_pie.h
> @@ -218,7 +218,7 @@ _rte_pie_drop(const struct rte_pie_config *pie_cfg,
> struct rte_pie *pie)
> {
> uint64_t rand_value;
> - double qdelay = pie_cfg->qdelay_ref * 0.5;
> + uint64_t qdelay = pie_cfg->qdelay_ref / 2;
>
> /* PIE is active but the queue is not congested: return 0 */
> if (((pie->qdelay_old < qdelay) && (pie->drop_prob < 0.2)) ||
> --
> 2.35.1
Hi Stephen,
Thanks for your proposed fix. It looks good to me, but since Jasvinder handled the PIE integration, I am going to defer this for his review once he comes back from vacation, just to make sure I am not missing anything here.
Regards,
Cristian
next prev parent reply other threads:[~2022-05-30 11:50 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-24 18:46 [RFT 0/2] pie: floating point fixes Stephen Hemminger
2022-05-24 18:46 ` [RFT 1/2] rte_pie: remove unnecessary floating point Stephen Hemminger
2022-05-24 18:46 ` [RFT 2/2] rte_pie: fix incorrect floating point math Stephen Hemminger
2022-05-24 19:31 ` [RFT 0/2] pie: floating point fixes Morten Brørup
2022-05-24 22:18 ` [RFT v2 0/3] pie: fix random number issues Stephen Hemminger
2022-05-24 22:18 ` [RFT v2 1/3] random: add rte_rand_float() Stephen Hemminger
2022-05-25 11:55 ` Ray Kinsella
2022-05-25 14:45 ` Mattias Rönnblom
2022-05-25 15:26 ` Morten Brørup
2022-05-25 15:45 ` Stephen Hemminger
2022-05-25 15:47 ` Stephen Hemminger
2022-05-24 22:18 ` [RFT v2 2/3] rte_pie: remove unnecessary floating point Stephen Hemminger
2022-05-24 22:18 ` [RFT v2 3/3] rte_pie: fix incorrect floating point math Stephen Hemminger
2022-05-25 17:12 ` [PATCH v3 0/3] introduce random floating point function Stephen Hemminger
2022-05-25 17:12 ` [PATCH v3 1/3] random: add rte_drand() funciton Stephen Hemminger
2022-05-25 17:12 ` [PATCH v3 2/3] rte_pie: remove unnecessary floating point Stephen Hemminger
2022-05-25 17:12 ` [PATCH v3 3/3] rte_pie: fix incorrect floating point math Stephen Hemminger
2022-05-25 20:31 ` [PATCH v4 0/3] introduce random floating point function Stephen Hemminger
2022-05-25 20:31 ` [PATCH v4 1/3] random: add rte_drand() function Stephen Hemminger
2022-05-26 9:56 ` Ray Kinsella
2022-05-26 13:20 ` Mattias Rönnblom
2022-05-26 15:25 ` Stephen Hemminger
2022-05-26 15:28 ` Stephen Hemminger
2022-05-26 20:19 ` Stephen Hemminger
2022-05-25 20:31 ` [PATCH v4 2/3] rte_pie: remove unnecessary floating point Stephen Hemminger
2022-05-25 20:31 ` [PATCH v4 3/3] rte_pie: fix incorrect floating point math Stephen Hemminger
2022-05-26 7:06 ` [PATCH v4 0/3] introduce random floating point function Morten Brørup
2022-05-26 20:26 ` [PATCH v5 " Stephen Hemminger
2022-05-26 20:26 ` [PATCH v5 1/3] random: add rte_drand() function Stephen Hemminger
2022-05-26 20:26 ` [PATCH v5 2/3] rte_pie: remove unnecessary floating point Stephen Hemminger
2022-05-30 11:50 ` Dumitrescu, Cristian [this message]
2022-06-21 8:18 ` Singh, Jasvinder
2022-05-26 20:26 ` [PATCH v5 3/3] rte_pie: fix incorrect floating point math Stephen Hemminger
2022-05-30 11:50 ` Dumitrescu, Cristian
2022-06-21 8:18 ` Singh, Jasvinder
2022-06-22 9:21 ` [PATCH v5 0/3] introduce random floating point function Thomas Monjalon
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=DM8PR11MB5670CCADC6FCEC9BF585C3B7EBDD9@DM8PR11MB5670.namprd11.prod.outlook.com \
--to=cristian.dumitrescu@intel.com \
--cc=dev@dpdk.org \
--cc=jasvinder.singh@intel.com \
--cc=stephen@networkplumber.org \
--cc=wojciechx.liguzinski@intel.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 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).