Skip to contentSkip to conversation

ice: Fix VSI rebuild WARN_ON check for VF

PATCH In review Benjamin Mikailenko 2 participants 2 messages Jul 15, 2022 – Aug 2, 2022

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

PATCH 1/1 ice: Fix VSI rebuild WARN_ON check for VF

In commit b03d519d3460 ("ice: store VF pointer instead of VF ID") WARN_ON checks were added to validate the vsi->vf pointer and catch programming errors. However, one check to vsi->vf was missed. This caused a call trace when resetting VFs.

Fix ice_vsi_rebuild by encompassing VF pointer in WARN_ON check.

Fixes b03d519d3460 ("ice: store VF pointer instead of VF ID")
---
 drivers/net/ethernet/intel/ice/ice_lib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/ice/ice_lib.c +1 -1
index a6c4be5e5566..c67144952f94 100644
@@ -3181,7 +3181,7 @@ int ice_vsi_rebuild(struct ice_vsi *vsi, bool init_vsi)
 
 	pf = vsi->back;
 	vtype = vsi->type;
-	if (WARN_ON(vtype == ICE_VSI_VF) && !vsi->vf)
+	if (WARN_ON(vtype == ICE_VSI_VF && !vsi->vf))
 		return -EINVAL;
 
 	ice_vsi_init_vlan_ops(vsi);
Signature · 6 lines
2.34.3

_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
Tested-by on v1 1/1
#1 lore raw

drivers/net/ethernet/intel/ice/ice_lib.c

Quoted 27 lines

-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Benjamin Mikailenko
Sent: sobota, 16 lipca 2022 00:27
To: [email protected]
Cc: Mikailenko, Benjamin <[email protected]>
Subject: [Intel-wired-lan] [PATCH net v1] ice: Fix VSI rebuild WARN_ON check for VF

In commit b03d519d3460 ("ice: store VF pointer instead of VF ID") WARN_ON checks were added to validate the vsi->vf pointer and catch programming errors. However, one check to vsi->vf was missed.
This caused a call trace when resetting VFs.

Fix ice_vsi_rebuild by encompassing VF pointer in WARN_ON check.

Fixes b03d519d3460 ("ice: store VF pointer instead of VF ID")
---
 drivers/net/ethernet/intel/ice/ice_lib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/ice/ice_lib.c +0 -0
index a6c4be5e5566..c67144952f94 100644

_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan