patch 'net/ice/base: fix integer overflow in RL profile calculation' has been queued to stable release 24.11.9

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Nov 5 17:42:23 CET 2026


Hi,

FYI, your patch has been queued to stable release 24.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/07/26. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/1dcbd92876080dccb4ceb73059ffe7410ab97dda

Thanks.

Luca Boccassi

---
>From 1dcbd92876080dccb4ceb73059ffe7410ab97dda Mon Sep 17 00:00:00 2001
From: Krzysztof Galazka <krzysztof.galazka at intel.com>
Date: Thu, 22 Oct 2026 16:51:58 +0000
Subject: [PATCH] net/ice/base: fix integer overflow in RL profile calculation

[ upstream commit a3a2c900f87a17319b7030989538ef4e07a64f8f ]

When calculating the Tx rate limit profile, BIT_ULL(i) multiplied by
ICE_RL_PROF_TS_MULTIPLIER overflows to zero for large values of i,
resulting in a division by zero. Divide the PSM clock frequency by the
multiplier once before the loop instead.

Fixes: 93e84b1bfc92 ("net/ice/base: add basic Tx scheduler")

Signed-off-by: Krzysztof Galazka <krzysztof.galazka at intel.com>
Signed-off-by: Lukasz Czapnik <lukasz.czapnik at intel.com>
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin at intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov at intel.com>
---
 drivers/net/ice/base/ice_sched.c | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c
index cafd278d709..1366b19bc1a 100644
--- a/drivers/net/ice/base/ice_sched.c
+++ b/drivers/net/ice/base/ice_sched.c
@@ -4001,32 +4001,30 @@ static int
 ice_sched_bw_to_rl_profile(struct ice_hw *hw, u32 bw,
 			   struct ice_aqc_rl_profile_elem *profile)
 {
-	s64 bytes_per_sec, ts_rate, mv_tmp;
-	int status = ICE_ERR_PARAM;
+	u32 ts_freq = hw->psm_clk_freq / ICE_RL_PROF_TS_MULTIPLIER;
+	u64 bytes_per_sec, ts_rate, mv_tmp;
+	int i, status = ICE_ERR_PARAM;
 	bool found = false;
 	s32 encode = 0;
-	s64 mv = 0;
-	s32 i;
+	u64 mv = 0;
 
 	/* Bw settings range is from 0.5Mb/sec to 100Gb/sec */
 	if (bw < ICE_SCHED_MIN_BW || bw > ICE_SCHED_MAX_BW)
 		return status;
 
 	/* Bytes per second from Kbps */
-	bytes_per_sec = DIV_S64((s64)bw * 1000, BITS_PER_BYTE);
+	bytes_per_sec = DIV_U64((u64)bw * 1000, BITS_PER_BYTE);
 
 	/* encode is 6 bits but really useful are 5 bits */
 	for (i = 0; i < 64; i++) {
 		u64 pow_result = BIT_ULL(i);
 
-		ts_rate = DIV_S64((s64)hw->psm_clk_freq,
-				  pow_result * ICE_RL_PROF_TS_MULTIPLIER);
-		if (ts_rate <= 0)
+		ts_rate = DIV_U64(ts_freq, pow_result);
+		if (ts_rate == 0)
 			continue;
 
 		/* Multiplier value */
-		mv_tmp = DIV_S64(bytes_per_sec * ICE_RL_PROF_MULTIPLIER,
-				 ts_rate);
+		mv_tmp = DIV_U64(bytes_per_sec * ICE_RL_PROF_MULTIPLIER, ts_rate);
 
 		/* Round to the nearest ICE_RL_PROF_MULTIPLIER */
 		mv = round_up_64bit(mv_tmp, ICE_RL_PROF_MULTIPLIER);
-- 
2.47.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-11-05 16:42:47.132516250 +0000
+++ 0056-net-ice-base-fix-integer-overflow-in-RL-profile-calc.patch	2026-11-05 16:42:44.977062459 +0000
@@ -1 +1 @@
-From a3a2c900f87a17319b7030989538ef4e07a64f8f Mon Sep 17 00:00:00 2001
+From 1dcbd92876080dccb4ceb73059ffe7410ab97dda Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a3a2c900f87a17319b7030989538ef4e07a64f8f ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
@@ -19 +20 @@
- drivers/net/intel/ice/base/ice_sched.c | 18 ++++++++----------
+ drivers/net/ice/base/ice_sched.c | 18 ++++++++----------
@@ -22,5 +23,5 @@
-diff --git a/drivers/net/intel/ice/base/ice_sched.c b/drivers/net/intel/ice/base/ice_sched.c
-index 2b867b74de0..7e1defa955d 100644
---- a/drivers/net/intel/ice/base/ice_sched.c
-+++ b/drivers/net/intel/ice/base/ice_sched.c
-@@ -4014,32 +4014,30 @@ static int
+diff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c
+index cafd278d709..1366b19bc1a 100644
+--- a/drivers/net/ice/base/ice_sched.c
++++ b/drivers/net/ice/base/ice_sched.c
+@@ -4001,32 +4001,30 @@ static int


More information about the stable mailing list