Skip to contentSkip to conversation

ice: remove correct filters during eswitch release

PATCH In review Marcin Szycik 3 participants 3 messages Apr 23, 2024 – May 7, 2024

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

PATCH 1/1 ice: remove correct filters during eswitch release

From: Michal Swiatkowski <[email protected]>

ice_clear_dflt_vsi() is only removing default rule. Both default RX and TX rule should be removed during release.

If it isn't switching to switchdev, second time results in error, because TX filter is already there.

Fix it by removing the correct set of rules.

Fixes 50d62022f455 ("ice: default Tx rule instead of to queue")

---
It is targetting iwl-next with fix, because the broken patch isn't yet in net repo.

---
 drivers/net/ethernet/intel/ice/ice_eswitch.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/net/ethernet/intel/ice/ice_eswitch.c +4 -1
index c902848cf88e..b102db8b829a 100644
@@ -246,7 +246,10 @@ static void ice_eswitch_release_env(struct ice_pf *pf)
 	ice_vsi_update_local_lb(uplink_vsi, false);
 	ice_vsi_update_security(uplink_vsi, ice_vsi_ctx_clear_allow_override);
 	vlan_ops->ena_rx_filtering(uplink_vsi);
-	ice_clear_dflt_vsi(uplink_vsi);
+	ice_cfg_dflt_vsi(uplink_vsi->port_info, uplink_vsi->idx, false,
+			 ICE_FLTR_TX);
+	ice_cfg_dflt_vsi(uplink_vsi->port_info, uplink_vsi->idx, false,
+			 ICE_FLTR_RX);
 	ice_fltr_add_mac_and_broadcast(uplink_vsi,
 				       uplink_vsi->port_info->mac.perm_addr,
 				       ICE_FWD_TO_VSI);
Signature · 1 line
2.41.0
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Marcin Szycik

From: Michal Swiatkowski <[email protected]>

ice_clear_dflt_vsi() is only removing default rule. Both default RX and TX rule should be removed during release.

If it isn't switching to switchdev, second time results in error, because TX filter is already there.

Fix it by removing the correct set of rules.

Quoted 7 lines
Fixes 50d62022f455 ("ice: default Tx rule instead of to queue")

---
It is targetting iwl-next with fix, because the broken patch isn't yet in net repo.

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

-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Marcin Szycik
Sent: Tuesday, April 23, 2024 8:07 PM
To: [email protected]
Cc: [email protected]; Marcin Szycik <[email protected]>; Drewek, Wojciech <[email protected]>; Michal Swiatkowski <[email protected]>
Subject: [Intel-wired-lan] [PATCH iwl-next] ice: remove correct filters during eswitch release

From: Michal Swiatkowski <[email protected]>

ice_clear_dflt_vsi() is only removing default rule. Both default RX and TX rule should be removed during release.

If it isn't switching to switchdev, second time results in error, because TX filter is already there.

Fix it by removing the correct set of rules.

Fixes 50d62022f455 ("ice: default Tx rule instead of to queue")
Quoted 7 lines

---
It is targetting iwl-next with fix, because the broken patch isn't yet in net repo.

---
 drivers/net/ethernet/intel/ice/ice_eswitch.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)