From: Marcin Szycik <marcin.szycik@linux.intel.com>
To: intel-wired-lan@lists.osuosl.org
Cc: Martyna Szapar-Mudlaw <martyna.szapar-mudlaw@linux.intel.com>,
netdev@vger.kernel.org,
Marcin Szycik <marcin.szycik@linux.intel.com>,
michal.swiatkowski@linux.intel.com
Subject: [Intel-wired-lan] [PATCH iwl-net 2/2] ice: Avoid setting default Rx VSI twice in switchdev setup
Date: Tue, 11 Feb 2025 18:43:22 +0100 [thread overview]
Message-ID: <20250211174322.603652-2-marcin.szycik@linux.intel.com> (raw)
In-Reply-To: <20250211174322.603652-1-marcin.szycik@linux.intel.com>
As part of switchdev environment setup, uplink VSI is configured as
default for both Tx and Rx. Default Rx VSI is also used by promiscuous
mode. If promisc mode is enabled and an attempt to enter switchdev mode
is made, the setup will fail because Rx VSI is already configured as
default (rule exists).
Reproducer:
devlink dev eswitch set $PF1_PCI mode switchdev
ip l s $PF1 up
ip l s $PF1 promisc on
echo 1 > /sys/class/net/$PF1/device/sriov_numvfs
In switchdev setup, use ice_set_dflt_vsi() instead of plain
ice_cfg_dflt_vsi(), which avoids repeating setting default VSI for Rx if
it's already configured.
Fixes: 50d62022f455 ("ice: default Tx rule instead of to queue")
Reported-by: Sujai Buvaneswaran <sujai.buvaneswaran@intel.com>
Closes: https://lore.kernel.org/intel-wired-lan/PH0PR11MB50138B635F2E5CEB7075325D961F2@PH0PR11MB5013.namprd11.prod.outlook.com
Reviewed-by: Martyna Szapar-Mudlaw <martyna.szapar-mudlaw@linux.intel.com>
Signed-off-by: Marcin Szycik <marcin.szycik@linux.intel.com>
---
drivers/net/ethernet/intel/ice/ice_eswitch.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_eswitch.c b/drivers/net/ethernet/intel/ice/ice_eswitch.c
index b44a375e6365..ed21d7f55ac1 100644
--- a/drivers/net/ethernet/intel/ice/ice_eswitch.c
+++ b/drivers/net/ethernet/intel/ice/ice_eswitch.c
@@ -38,8 +38,7 @@ static int ice_eswitch_setup_env(struct ice_pf *pf)
if (ice_vsi_add_vlan_zero(uplink_vsi))
goto err_vlan_zero;
- if (ice_cfg_dflt_vsi(uplink_vsi->port_info, uplink_vsi->idx, true,
- ICE_FLTR_RX))
+ if (ice_set_dflt_vsi(uplink_vsi))
goto err_def_rx;
if (ice_cfg_dflt_vsi(uplink_vsi->port_info, uplink_vsi->idx, true,
--
2.45.0
next prev parent reply other threads:[~2025-02-11 17:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-11 17:43 [Intel-wired-lan] [PATCH iwl-net 1/2] ice: Fix deinitializing VF in error path Marcin Szycik
2025-02-11 17:43 ` Marcin Szycik [this message]
2025-02-13 11:00 ` [Intel-wired-lan] [PATCH iwl-net 2/2] ice: Avoid setting default Rx VSI twice in switchdev setup Simon Horman
2025-02-21 8:16 ` Buvaneswaran, Sujai
2025-02-13 10:55 ` [Intel-wired-lan] [PATCH iwl-net 1/2] ice: Fix deinitializing VF in error path Simon Horman
2025-02-13 12:32 ` Marcin Szycik
2025-02-15 19:31 ` Simon Horman
2025-02-21 8:15 ` Buvaneswaran, Sujai
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=20250211174322.603652-2-marcin.szycik@linux.intel.com \
--to=marcin.szycik@linux.intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=martyna.szapar-mudlaw@linux.intel.com \
--cc=michal.swiatkowski@linux.intel.com \
--cc=netdev@vger.kernel.org \
/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