[PATCH 1/9] net/ice/base: fix loop counter type in recipe creation
Vladimir Medvedkin
vladimir.medvedkin at intel.com
Thu Oct 22 18:51:57 CEST 2026
From: Deepthi Kavalur <deepthi.kavalur at intel.com>
The lookup loop in ice_add_adv_recipe() uses a u8 counter, while the
number of lookups is u16. Use a u16 counter, so it cannot wrap around
before reaching the bound.
Fixes: fed0c5ca5f19 ("net/ice/base: support programming a new switch recipe")
Cc: stable at dpdk.org
Signed-off-by: Deepthi Kavalur <deepthi.kavalur at intel.com>
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin at intel.com>
---
drivers/net/intel/ice/base/ice_switch.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/intel/ice/base/ice_switch.c b/drivers/net/intel/ice/base/ice_switch.c
index 94099c5215..cba3ca05fc 100644
--- a/drivers/net/intel/ice/base/ice_switch.c
+++ b/drivers/net/intel/ice/base/ice_switch.c
@@ -8254,7 +8254,7 @@ ice_add_adv_recipe(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,
struct ice_recp_grp_entry *r_tmp;
struct ice_sw_fv_list_entry *tmp;
struct ice_sw_recipe *rm;
- u8 i;
+ u16 i;
int status = ICE_SUCCESS;
if (!ice_is_prof_rule(rinfo->tun_type) && !lkups_cnt)
--
2.43.0
More information about the dev
mailing list