Skip to content

Commit 5c07be9

Browse files
Marcin Szycikkuba-moo
authored andcommitted
ice: Avoid setting default Rx VSI twice in switchdev setup
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: 50d6202 ("ice: default Tx rule instead of to queue") Reported-by: Sujai Buvaneswaran <[email protected]> Closes: https://lore.kernel.org/intel-wired-lan/PH0PR11MB50138B635F2E5CEB7075325D961F2@PH0PR11MB5013.namprd11.prod.outlook.com Reviewed-by: Martyna Szapar-Mudlaw <[email protected]> Signed-off-by: Marcin Szycik <[email protected]> Reviewed-by: Simon Horman <[email protected]> Tested-by: Sujai Buvaneswaran <[email protected]> Signed-off-by: Tony Nguyen <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 79990cf commit 5c07be9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/net/ethernet/intel/ice/ice_eswitch.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ static int ice_eswitch_setup_env(struct ice_pf *pf)
3838
if (ice_vsi_add_vlan_zero(uplink_vsi))
3939
goto err_vlan_zero;
4040

41-
if (ice_cfg_dflt_vsi(uplink_vsi->port_info, uplink_vsi->idx, true,
42-
ICE_FLTR_RX))
41+
if (ice_set_dflt_vsi(uplink_vsi))
4342
goto err_def_rx;
4443

4544
if (ice_cfg_dflt_vsi(uplink_vsi->port_info, uplink_vsi->idx, true,

0 commit comments

Comments
 (0)