Intel-Wired-Lan Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Wojciech Drewek <wojciech.drewek@intel.com>
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
Date: Wed, 12 Jul 2023 13:03:27 +0200	[thread overview]
Message-ID: <20230712110337.8030-3-wojciech.drewek@intel.com> (raw)
In-Reply-To: <20230712110337.8030-1-wojciech.drewek@intel.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@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(-)

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
-- 
2.40.1

_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

  parent reply	other threads:[~2023-07-12 11:05 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-12 11:03 [Intel-wired-lan] [PATCH iwl-next v6 00/12] ice: switchdev bridge offload Wojciech Drewek
2023-07-12 11:03 ` [Intel-wired-lan] [PATCH iwl-next v6 01/12] ice: Skip adv rules removal upon switchdev release Wojciech Drewek
2023-07-22  6:43   ` Buvaneswaran, Sujai
2023-07-12 11:03 ` Wojciech Drewek [this message]
2023-07-22  6:44   ` [Intel-wired-lan] [PATCH iwl-next v6 02/12] ice: Prohibit rx mode change in switchdev mode Buvaneswaran, Sujai
2023-07-12 11:03 ` [Intel-wired-lan] [PATCH iwl-next v6 03/12] ice: Don't tx before switchdev is fully configured Wojciech Drewek
2023-07-22  6:44   ` Buvaneswaran, Sujai
2023-07-12 11:03 ` [Intel-wired-lan] [PATCH iwl-next v6 04/12] ice: Disable vlan pruning for uplink VSI Wojciech Drewek
2023-07-22  6:45   ` Buvaneswaran, Sujai
2023-07-12 11:03 ` [Intel-wired-lan] [PATCH iwl-next v6 05/12] ice: Unset src prune on " Wojciech Drewek
2023-07-22  6:46   ` Buvaneswaran, Sujai
2023-07-12 11:03 ` [Intel-wired-lan] [PATCH iwl-next v6 06/12] ice: Implement basic eswitch bridge setup Wojciech Drewek
2023-07-22  6:47   ` Buvaneswaran, Sujai
2023-07-12 11:03 ` [Intel-wired-lan] [PATCH iwl-next v6 07/12] ice: Switchdev FDB events support Wojciech Drewek
2023-07-22  6:48   ` Buvaneswaran, Sujai
2023-07-12 11:03 ` [Intel-wired-lan] [PATCH iwl-next v6 08/12] ice: Add guard rule when creating FDB in switchdev Wojciech Drewek
2023-07-22  6:48   ` Buvaneswaran, Sujai
2023-07-12 11:03 ` [Intel-wired-lan] [PATCH iwl-next v6 09/12] ice: Add VLAN FDB support in switchdev mode Wojciech Drewek
2023-07-22  6:49   ` Buvaneswaran, Sujai
2023-07-12 11:03 ` [Intel-wired-lan] [PATCH iwl-next v6 10/12] ice: implement bridge port vlan Wojciech Drewek
2023-07-22  6:50   ` Buvaneswaran, Sujai
2023-07-12 11:03 ` [Intel-wired-lan] [PATCH iwl-next v6 11/12] ice: implement static version of ageing Wojciech Drewek
2023-07-22  6:51   ` Buvaneswaran, Sujai
2023-07-12 11:03 ` [Intel-wired-lan] [PATCH iwl-next v6 12/12] ice: add tracepoints for the switchdev bridge Wojciech Drewek
2023-07-22  6:52   ` Buvaneswaran, Sujai
2023-07-12 16:47 ` [Intel-wired-lan] [PATCH iwl-next v6 00/12] ice: switchdev bridge offload Vlad Buslov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230712110337.8030-3-wojciech.drewek@intel.com \
    --to=wojciech.drewek@intel.com \
    --cc=dan.carpenter@linaro.org \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pmenzel@molgen.mpg.de \
    --cc=simon.horman@corigine.com \
    --cc=vladbu@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox