intel-wired-lan.lists.osuosl.org archive mirror
 help / color / mirror / Atom feed
* [Intel-wired-lan] [PATCH iwl-next] ice: remove correct filters during eswitch release
@ 2024-04-23 14:36 Marcin Szycik
  2024-04-26 18:29 ` Simon Horman
  2024-05-07  7:10 ` Buvaneswaran, Sujai
  0 siblings, 2 replies; 3+ messages in thread
From: Marcin Szycik @ 2024-04-23 14:36 UTC (permalink / raw)
  To: intel-wired-lan
  Cc: netdev, Marcin Szycik, Wojciech Drewek, Michal Swiatkowski

From: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>

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")
Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Signed-off-by: Marcin Szycik <marcin.szycik@linux.intel.com>
---
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(-)

diff --git a/drivers/net/ethernet/intel/ice/ice_eswitch.c b/drivers/net/ethernet/intel/ice/ice_eswitch.c
index c902848cf88e..b102db8b829a 100644
--- a/drivers/net/ethernet/intel/ice/ice_eswitch.c
+++ b/drivers/net/ethernet/intel/ice/ice_eswitch.c
@@ -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);
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Intel-wired-lan] [PATCH iwl-next] ice: remove correct filters during eswitch release
  2024-04-23 14:36 [Intel-wired-lan] [PATCH iwl-next] ice: remove correct filters during eswitch release Marcin Szycik
@ 2024-04-26 18:29 ` Simon Horman
  2024-05-07  7:10 ` Buvaneswaran, Sujai
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2024-04-26 18:29 UTC (permalink / raw)
  To: Marcin Szycik
  Cc: Wojciech Drewek, netdev, intel-wired-lan, Michal Swiatkowski

On Tue, Apr 23, 2024 at 04:36:32PM +0200, Marcin Szycik wrote:
> From: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> 
> 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")
> Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
> Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> Signed-off-by: Marcin Szycik <marcin.szycik@linux.intel.com>
> ---
> It is targetting iwl-next with fix, because the broken patch isn't yet
> in net repo.

Reviewed-by: Simon Horman <horms@kernel.org>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Intel-wired-lan] [PATCH iwl-next] ice: remove correct filters during eswitch release
  2024-04-23 14:36 [Intel-wired-lan] [PATCH iwl-next] ice: remove correct filters during eswitch release Marcin Szycik
  2024-04-26 18:29 ` Simon Horman
@ 2024-05-07  7:10 ` Buvaneswaran, Sujai
  1 sibling, 0 replies; 3+ messages in thread
From: Buvaneswaran, Sujai @ 2024-05-07  7:10 UTC (permalink / raw)
  To: Marcin Szycik, intel-wired-lan
  Cc: netdev, Drewek, Wojciech, Michal Swiatkowski

> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Marcin Szycik
> Sent: Tuesday, April 23, 2024 8:07 PM
> To: intel-wired-lan@lists.osuosl.org
> Cc: netdev@vger.kernel.org; Marcin Szycik <marcin.szycik@linux.intel.com>;
> Drewek, Wojciech <wojciech.drewek@intel.com>; Michal Swiatkowski
> <michal.swiatkowski@linux.intel.com>
> Subject: [Intel-wired-lan] [PATCH iwl-next] ice: remove correct filters during
> eswitch release
> 
> From: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> 
> 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")
> Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
> Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> Signed-off-by: Marcin Szycik <marcin.szycik@linux.intel.com>
> ---
> 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(-)
> 
Tested-by: Sujai Buvaneswaran <sujai.buvaneswaran@intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-05-07  7:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-23 14:36 [Intel-wired-lan] [PATCH iwl-next] ice: remove correct filters during eswitch release Marcin Szycik
2024-04-26 18:29 ` Simon Horman
2024-05-07  7:10 ` Buvaneswaran, Sujai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).