]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ice: Fix VLAN pruning in switchdev mode
authorMarcin Szycik <marcin.szycik@linux.intel.com>
Mon, 4 Nov 2024 18:49:09 +0000 (19:49 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 19:03:06 +0000 (20:03 +0100)
commit7ee237851dcf82ca58ac01162df83e43aa4edfa8
treeec5c59b66f22cff24fbb791acf39ca9ab4aabdbb
parent25a702f2528a3a94b7f2599b93a6b966c81812db
ice: Fix VLAN pruning in switchdev mode

[ Upstream commit 761e0be2888a931465e0d7bbeecce797f9c311a3 ]

In switchdev mode the uplink VSI should receive all unmatched packets,
including VLANs. Therefore, VLAN pruning should be disabled if uplink is
in switchdev mode. It is already being done in ice_eswitch_setup_env(),
however the addition of ice_up() in commit 44ba608db509 ("ice: do
switchdev slow-path Rx using PF VSI") caused VLAN pruning to be
re-enabled after disabling it.

Add a check to ice_set_vlan_filtering_features() to ensure VLAN
filtering will not be enabled if uplink is in switchdev mode. Note that
ice_is_eswitch_mode_switchdev() is being used instead of
ice_is_switchdev_running(), as the latter would only return true after
the whole switchdev setup completes.

Fixes: 44ba608db509 ("ice: do switchdev slow-path Rx using PF VSI")
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Signed-off-by: Marcin Szycik <marcin.szycik@linux.intel.com>
Tested-by: Priya Singh <priyax.singh@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/intel/ice/ice_main.c