Skip to contentSkip to conversation

ice: fix LAG recipe to profile association

PATCH In review Marcin Szycik 3 participants 3 messages May 19 – Jul 15

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ice: fix LAG recipe to profile association

ice_init_lag() associates recipes to profiles, assuming that Link Aggregation-related profiles will always have profile ID lower than 70 (ICE_PROFID_IPV6_GTPU_IPV6_TCP_INNER). This value seems arbitrary and might not always be valid for some versions of DDP package, i.e. LAG profiles may have profile ID greater than 70. This would lead to misconfigured switch and LAG not working properly.

Fix it by checking up to maximum profile ID.

Fixes 1e0f9881ef79 ("ice: Flesh out implementation of support for SRIOV on bonded interface")
---
 drivers/net/ethernet/intel/ice/ice_lag.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/ice/ice_lag.c +1 -1
index 310e8fe2925c..08a17ded0ad5 100644
@@ -2623,7 +2623,7 @@ int ice_init_lag(struct ice_pf *pf)
 		goto  free_lport_res;
 
 	/* associate recipes to profiles */
-	for (n = 0; n < ICE_PROFID_IPV6_GTPU_IPV6_TCP_INNER; n++) {
+	for (n = 0; n < ICE_MAX_NUM_PROFILES; n++) {
 		err = ice_aq_get_recipe_to_profile(&pf->hw, n,
 						   &recipe_bits, NULL);
 		if (err)
Signature · 1 line
2.49.0
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Marcin Szycik

ice_init_lag() associates recipes to profiles, assuming that Link Aggregation-related profiles will always have profile ID lower than 70 (ICE_PROFID_IPV6_GTPU_IPV6_TCP_INNER). This value seems arbitrary and might not always be valid for some versions of DDP package, i.e. LAG profiles may have profile ID greater than 70. This would lead to misconfigured switch and LAG not working properly.

Quoted 7 lines

Fix it by checking up to maximum profile ID.

Fixes 1e0f9881ef79 ("ice: Flesh out implementation of support for SRIOV on bonded interface")

I notice that there is an AI review of this patch available on sashiko.dev. However, I believe that flags a pre-existing problem that is orthogonal to this patch. o I do no think that review should block progress of this patch but rather be looked at in the context of possible follow-up.

Tested-by on v1 1/1
#2 lore raw
In reply to Marcin Szycik
Quoted 11 lines

-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Marcin Szycik
Sent: 19 May 2026 16:51
To: [email protected]
Cc: [email protected]; Marcin Szycik <[email protected]>; Michal Swiatkowski <[email protected]>; Loktionov, Aleksandr <[email protected]>; Ertman, David M <[email protected]>
Subject: [Intel-wired-lan] [PATCH iwl-net] ice: fix LAG recipe to profile association

ice_init_lag() associates recipes to profiles, assuming that Link Aggregation-related profiles will always have profile ID lower than 70 (ICE_PROFID_IPV6_GTPU_IPV6_TCP_INNER). This value seems arbitrary and might not always be valid for some versions of DDP package, i.e. LAG profiles may have profile ID greater than 70. This would lead to misconfigured switch and LAG not working properly.

Fix it by checking up to maximum profile ID.

Quoted 9 lines
Fixes 1e0f9881ef79 ("ice: Flesh out implementation of support for SRIOV on bonded interface")

---
drivers/net/ethernet/intel/ice/ice_lag.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)