]> git.droids-corp.org - dpdk.git/commit
sched: fix floating point math
authorStephen Hemminger <stephen@networkplumber.org>
Thu, 26 May 2022 20:26:53 +0000 (13:26 -0700)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 22 Jun 2022 09:11:48 +0000 (11:11 +0200)
commit45a192b2b400aa1fcf9ff0ffdb041cd106854b98
treeb46f5bf5a2cd07fe775661ef00b08dc7a4bb240c
parentbb421e98c0c0f56f1adc68722a54d6d24abf137d
sched: fix floating point math

The function rte_pie_drop was attempting to do a random probability
drop, but because of incorrect usage of fixed point divide
it would always return 1.

Change to use new rte_drand() instead.

Fixes: 44c730b0e379 ("sched: add PIE based congestion management")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
lib/sched/rte_pie.h