[RFT,v2,2/3] rte_pie: remove unnecessary floating point
Checks
Commit Message
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")
Cc: wojciechx.liguzinski@intel.com
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/sched/rte_pie.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -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)) ||