]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
igb: Always enable VLAN 0 even if 8021q is not loaded
authorAlexander Duyck <aduyck@mirantis.com>
Thu, 7 Jan 2016 07:10:54 +0000 (23:10 -0800)
committerTim Gardner <tim.gardner@canonical.com>
Wed, 6 Apr 2016 09:20:12 +0000 (10:20 +0100)
BugLink: http://bugs.launchpad.net/bugs/1547674
This patch makes it so that we always add VLAN 0.  This is important as we
need to guarantee the PF can receive untagged frames in the case of SR-IOV
being enabled but VLAN filtering not being enabled in the kernel.

Signed-off-by: Alexander Duyck <aduyck@mirantis.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from net-next commit 5982a5565a08abf3b9ff18941b3e3cc94f7c8286)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/net/ethernet/intel/igb/igb_main.c

index 28023af88c798c43488d733f4561400748c134d6..85d04b0477bf9424898ccc3c8d82ed72f87b1472 100644 (file)
@@ -7177,11 +7177,12 @@ static int igb_vlan_rx_kill_vid(struct net_device *netdev,
 
 static void igb_restore_vlan(struct igb_adapter *adapter)
 {
-       u16 vid;
+       u16 vid = 1;
 
        igb_vlan_mode(adapter->netdev, adapter->netdev->features);
+       igb_vlan_rx_add_vid(adapter->netdev, htons(ETH_P_8021Q), 0);
 
-       for_each_set_bit(vid, adapter->active_vlans, VLAN_N_VID)
+       for_each_set_bit_from(vid, adapter->active_vlans, VLAN_N_VID)
                igb_vlan_rx_add_vid(adapter->netdev, htons(ETH_P_8021Q), vid);
 }