patch 'net/ice/base: fix integer types in comparisons' has been queued to stable release 25.11.1

Kevin Traynor ktraynor at redhat.com
Thu Mar 19 11:02:15 CET 2026


Hi,

FYI, your patch has been queued to stable release 25.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/23/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/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/9cf86a1ad817f7520e6e11ceaa3c648ce55c5082

Thanks.

Kevin

---
>From 9cf86a1ad817f7520e6e11ceaa3c648ce55c5082 Mon Sep 17 00:00:00 2001
From: Maciej Paczkowski <maciej.paczkowski at intel.com>
Date: Tue, 10 Mar 2026 05:52:09 -0400
Subject: [PATCH] net/ice/base: fix integer types in comparisons

[ upstream commit 29e53e34ca2fbdf6f0df246582dda7aad40bb360 ]

- This patch resolves violations raised by Windows CodeQL
  tool related to comparison-with-wider-type error.

- Added data type casting to resolve these errors.

Fixes: f3202a097f12 ("net/ice/base: add ACL module")
Fixes: c9e37832c95f ("net/ice/base: rework on bit ops")
Fixes: 18a6dd522289 ("net/ice/base: improve switch advanced rule")
Fixes: 88824213be8a ("net/ice/base: enable RSS for PFCP/L2TP/ESP/AH")
Fixes: d647871c50ab ("net/ice/base: fix bitmap set function")
Fixes: 1082f786547e ("net/ice/base: support DCB")
Fixes: 93e84b1bfc92 ("net/ice/base: add basic Tx scheduler")
Fixes: fed0c5ca5f19 ("net/ice/base: support programming a new switch recipe")

Signed-off-by: Maciej Paczkowski <maciej.paczkowski at intel.com>
Signed-off-by: Soumyadeep Hore <soumyadeep.hore at intel.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
---
 drivers/net/intel/ice/base/ice_acl_ctrl.c |  6 +++---
 drivers/net/intel/ice/base/ice_bitops.h   | 14 +++++++-------
 drivers/net/intel/ice/base/ice_dcb.c      |  8 ++++----
 drivers/net/intel/ice/base/ice_sched.c    |  3 ++-
 drivers/net/intel/ice/base/ice_switch.c   |  2 +-
 5 files changed, 17 insertions(+), 16 deletions(-)

diff --git a/drivers/net/intel/ice/base/ice_acl_ctrl.c b/drivers/net/intel/ice/base/ice_acl_ctrl.c
index 6cee2c98ea..6ec9f7f754 100644
--- a/drivers/net/intel/ice/base/ice_acl_ctrl.c
+++ b/drivers/net/intel/ice/base/ice_acl_ctrl.c
@@ -495,5 +495,5 @@ ice_acl_alloc_partition(struct ice_hw *hw, struct ice_acl_scen *req)
 			 */
 			p = dir > 0 ? i : ICE_AQC_MAX_TCAM_ALLOC_UNITS - i - 1;
-			for (w = row; w < row + width && avail; w++) {
+			for (w = row; w < (u16)(row + width) && avail; w++) {
 				u16 b;
 
@@ -645,5 +645,5 @@ ice_acl_set_scen_chnk_msk(struct ice_aqc_acl_scen *scen_buf,
 		 * / ICE_ACL_ENTRY_ALLOC_UNIT) or 8 chunks.
 		 */
-		for (i = tcam_idx; i < tcam_idx + num_cscd; i++)
+		for (i = tcam_idx; i < (u16)(tcam_idx + num_cscd); i++)
 			scen_buf->tcam_cfg[i].chnk_msk |= BIT(chnk_offst);
 
@@ -800,5 +800,5 @@ ice_acl_create_scen(struct ice_hw *hw, u16 match_width, u16 num_entries,
 
 		/* cascade TCAMs up to the width of the scenario */
-		for (i = k; i < cascade_cnt + k; i++) {
+		for (i = k; i < (u8)(cascade_cnt + k); i++) {
 			ice_acl_fill_tcam_select(&scen_buf, scen, i, i - k);
 			ice_acl_assign_act_mem_for_scen(hw->acl_tbl, scen,
diff --git a/drivers/net/intel/ice/base/ice_bitops.h b/drivers/net/intel/ice/base/ice_bitops.h
index 85e14a2358..829b2062c8 100644
--- a/drivers/net/intel/ice/base/ice_bitops.h
+++ b/drivers/net/intel/ice/base/ice_bitops.h
@@ -189,5 +189,5 @@ ice_and_bitmap(ice_bitmap_t *dst, const ice_bitmap_t *bmp1,
 
 	/* Handle all but the last chunk */
-	for (i = 0; i < BITS_TO_CHUNKS(size) - 1; i++) {
+	for (i = 0; i < (u16)(BITS_TO_CHUNKS(size) - 1); i++) {
 		dst[i] = bmp1[i] & bmp2[i];
 		res |= dst[i];
@@ -226,5 +226,5 @@ ice_or_bitmap(ice_bitmap_t *dst, const ice_bitmap_t *bmp1,
 
 	/* Handle all but last chunk */
-	for (i = 0; i < BITS_TO_CHUNKS(size) - 1; i++)
+	for (i = 0; i < (u16)(BITS_TO_CHUNKS(size) - 1); i++)
 		dst[i] = bmp1[i] | bmp2[i];
 
@@ -257,5 +257,5 @@ ice_xor_bitmap(ice_bitmap_t *dst, const ice_bitmap_t *bmp1,
 
 	/* Handle all but last chunk */
-	for (i = 0; i < BITS_TO_CHUNKS(size) - 1; i++)
+	for (i = 0; i < (u16)(BITS_TO_CHUNKS(size) - 1); i++)
 		dst[i] = bmp1[i] ^ bmp2[i];
 
@@ -288,5 +288,5 @@ ice_andnot_bitmap(ice_bitmap_t *dst, const ice_bitmap_t *bmp1,
 
 	/* Handle all but last chunk */
-	for (i = 0; i < BITS_TO_CHUNKS(size) - 1; i++)
+	for (i = 0; i < (u16)(BITS_TO_CHUNKS(size) - 1); i++)
 		dst[i] = bmp1[i] & ~bmp2[i];
 
@@ -331,5 +331,5 @@ ice_find_next_bit(const ice_bitmap_t *bitmap, u16 size, u16 offset)
 
 	/* Now we handle the remaining chunks, if any */
-	for (i++; i < BITS_TO_CHUNKS(size); i++) {
+	for (i++; i < (u16)BITS_TO_CHUNKS(size); i++) {
 		if (bitmap[i] != 0) {
 			u16 off = i * BITS_PER_CHUNK;
@@ -406,5 +406,5 @@ ice_bitmap_set(ice_bitmap_t *dst, u16 pos, u16 num_bits)
 	u16 i;
 
-	for (i = pos; i < pos + num_bits; i++)
+	for (i = pos; i < (u16)(pos + num_bits); i++)
 		ice_set_bit(i, dst);
 }
@@ -448,5 +448,5 @@ ice_cmp_bitmap(ice_bitmap_t *bmp1, ice_bitmap_t *bmp2, u16 size)
 
 	/* Handle all but last chunk */
-	for (i = 0; i < BITS_TO_CHUNKS(size) - 1; i++)
+	for (i = 0; i < (u16)(BITS_TO_CHUNKS(size) - 1); i++)
 		if (bmp1[i] != bmp2[i])
 			return false;
diff --git a/drivers/net/intel/ice/base/ice_dcb.c b/drivers/net/intel/ice/base/ice_dcb.c
index 607af03525..f5fbf535d5 100644
--- a/drivers/net/intel/ice/base/ice_dcb.c
+++ b/drivers/net/intel/ice/base/ice_dcb.c
@@ -466,5 +466,5 @@ ice_parse_cee_app_tlv(struct ice_cee_feat_tlv *tlv, struct ice_dcbx_cfg *dcbcfg)
 	u16 len, typelen, offset = 0;
 	struct ice_cee_app_prio *app;
-	u8 i;
+	u32 i;
 
 	typelen = NTOHS(tlv->hdr.typelen);
@@ -791,6 +791,6 @@ ice_cee_to_dcb_cfg(struct ice_aqc_get_cee_dcb_cfg_resp *cee_cfg,
 {
 	u32 status, tlv_status = LE32_TO_CPU(cee_cfg->tlv_status);
-	u32 ice_aqc_cee_status_mask, ice_aqc_cee_status_shift;
-	u8 i, j, err, sync, oper, app_index, ice_app_sel_type;
+	u32 j, ice_aqc_cee_status_mask, ice_aqc_cee_status_shift;
+	u8 i, err, sync, oper, app_index, ice_app_sel_type;
 	u16 app_prio = LE16_TO_CPU(cee_cfg->oper_app_prio);
 	u16 ice_aqc_cee_app_mask, ice_aqc_cee_app_shift;
@@ -1325,5 +1325,5 @@ ice_add_ieee_app_pri_tlv(struct ice_lldp_org_tlv *tlv,
 	 *        -----------------------------------------
 	 */
-	while (i < dcbcfg->numapps) {
+	while (i < (u8)dcbcfg->numapps) {
 		priority = dcbcfg->app[i].priority & 0x7;
 		selector = dcbcfg->app[i].selector & 0x7;
diff --git a/drivers/net/intel/ice/base/ice_sched.c b/drivers/net/intel/ice/base/ice_sched.c
index be9393a7d6..ad1c8309aa 100644
--- a/drivers/net/intel/ice/base/ice_sched.c
+++ b/drivers/net/intel/ice/base/ice_sched.c
@@ -1248,5 +1248,6 @@ int ice_sched_init_port(struct ice_port_info *pi)
 	u16 num_elems;
 	int status;
-	u8 i, j;
+	u8 i;
+	u16 j;
 
 	if (!pi)
diff --git a/drivers/net/intel/ice/base/ice_switch.c b/drivers/net/intel/ice/base/ice_switch.c
index fff61b89d7..94099c5215 100644
--- a/drivers/net/intel/ice/base/ice_switch.c
+++ b/drivers/net/intel/ice/base/ice_switch.c
@@ -7438,5 +7438,5 @@ ice_fill_fv_word_index(struct ice_hw *hw, struct LIST_HEAD_TYPE *fv_list,
 			bool found = false;
 			u16 mask;
-			u8 j;
+			u16 j;
 
 			pr = &rg->r_group.pairs[i];
-- 
2.53.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-03-19 10:01:07.631838510 +0000
+++ 0017-net-ice-base-fix-integer-types-in-comparisons.patch	2026-03-19 10:01:07.075331263 +0000
@@ -1 +1 @@
-From 29e53e34ca2fbdf6f0df246582dda7aad40bb360 Mon Sep 17 00:00:00 2001
+From 9cf86a1ad817f7520e6e11ceaa3c648ce55c5082 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 29e53e34ca2fbdf6f0df246582dda7aad40bb360 ]
+
@@ -19 +20,0 @@
-Cc: stable at dpdk.org
@@ -138 +139 @@
-index 3a0907eda7..2b867b74de 100644
+index be9393a7d6..ad1c8309aa 100644
@@ -141 +142 @@
-@@ -1258,5 +1258,6 @@ int ice_sched_init_port(struct ice_port_info *pi)
+@@ -1248,5 +1248,6 @@ int ice_sched_init_port(struct ice_port_info *pi)



More information about the stable mailing list