Message ID | 20230712110337.8030-3-wojciech.drewek@intel.com (mailing list archive) |
---|---|
State | Awaiting Upstream |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | ice: switchdev bridge offload | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Guessing tree name failed - patch did not apply |
> -----Original Message----- > From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of > Wojciech Drewek > Sent: Wednesday, July 12, 2023 4:33 PM > To: intel-wired-lan@lists.osuosl.org > Cc: pmenzel@molgen.mpg.de; netdev@vger.kernel.org; vladbu@nvidia.com; > kuba@kernel.org; simon.horman@corigine.com; dan.carpenter@linaro.org > Subject: [Intel-wired-lan] [PATCH iwl-next v6 02/12] ice: Prohibit rx mode > change in switchdev mode > > 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@molgen.mpg.de> > Reviewed-by: Simon Horman <simon.horman@corigine.com> > Signed-off-by: Wojciech Drewek <wojciech.drewek@intel.com> > --- > drivers/net/ethernet/intel/ice/ice_main.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Tested-by: Sujai Buvaneswaran <sujai.buvaneswaran@intel.com>
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c index e3245ee635b2..b45dc9623e63 100644 --- a/drivers/net/ethernet/intel/ice/ice_main.c +++ b/drivers/net/ethernet/intel/ice/ice_main.c @@ -5777,7 +5777,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