[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230724161152.2177196-3-anthony.l.nguyen@intel.com>
Date: Mon, 24 Jul 2023 09:11:42 -0700
From: Tony Nguyen <anthony.l.nguyen@...el.com>
To: davem@...emloft.net,
kuba@...nel.org,
pabeni@...hat.com,
edumazet@...gle.com,
netdev@...r.kernel.org
Cc: Wojciech Drewek <wojciech.drewek@...el.com>,
anthony.l.nguyen@...el.com,
jiri@...nulli.us,
ivecera@...hat.com,
simon.horman@...igine.com,
vladbu@...dia.com,
Paul Menzel <pmenzel@...gen.mpg.de>,
Sujai Buvaneswaran <sujai.buvaneswaran@...el.com>
Subject: [PATCH net-next v2 02/12] ice: Prohibit rx mode change in switchdev mode
From: Wojciech Drewek <wojciech.drewek@...el.com>
Don't allow to change promisc mode in switchdev mode.
When switchdev is configured, PF netdev is set to be a
default VSI. This is needed for the slow-path to work correctly.
All the unmatched packets will be directed to PF netdev.
It is possible that this setting might be overwritten by
ndo_set_rx_mode. Prevent this by checking if switchdev is
enabled in ice_set_rx_mode.
Reviewed-by: Paul Menzel <pmenzel@...gen.mpg.de>
Reviewed-by: Simon Horman <simon.horman@...igine.com>
Signed-off-by: Wojciech Drewek <wojciech.drewek@...el.com>
Tested-by: Sujai Buvaneswaran <sujai.buvaneswaran@...el.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@...el.com>
---
drivers/net/ethernet/intel/ice/ice_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index 4f70f5553c80..d1f2077676e4 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -5704,7 +5704,7 @@ static void ice_set_rx_mode(struct net_device *netdev)
struct ice_netdev_priv *np = netdev_priv(netdev);
struct ice_vsi *vsi = np->vsi;
- if (!vsi)
+ if (!vsi || ice_is_switchdev_running(vsi->back))
return;
/* Set the flags to synchronize filters
--
2.38.1
Powered by blists - more mailing lists