Commit 56f0569e authored by Jacob Keller's avatar Jacob Keller Committed by Jeff Kirsher

fm10k: only prevent removal of default VID rules

This allows us to correctly add a VLAN even if it matches our default
VID. However, we don't want to remove the VID rules once that VLAN is
deleted. Correctly remove the stack layers information of the VLAN, but
then return to forwarding that VID as untagged frames. If we deleted the
VID rules here, we would begin dropping traffic due to VLAN membership
violations.
Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
Tested-by: default avatarKrishneil Singh <krishneil.k.singh@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent e4029662
...@@ -775,8 +775,8 @@ static int fm10k_update_vid(struct net_device *netdev, u16 vid, bool set) ...@@ -775,8 +775,8 @@ static int fm10k_update_vid(struct net_device *netdev, u16 vid, bool set)
if (!set) if (!set)
clear_bit(vid, interface->active_vlans); clear_bit(vid, interface->active_vlans);
/* if default VLAN is already present do nothing */ /* Do not remove default VID related entries from VLAN and MAC tables */
if (vid == hw->mac.default_vid) if (!set && vid == hw->mac.default_vid)
return 0; return 0;
fm10k_mbx_lock(interface); fm10k_mbx_lock(interface);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment