igbvf: Fix trunk vlan
authorGreg Rose <gregory.v.rose@intel.com>
Sat, 27 Aug 2011 06:24:59 +0000 (06:24 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Mon, 17 Oct 2011 12:08:05 +0000 (05:08 -0700)
Changes to clean up the VLAN Rx path by Jiri Pirko broke trunk VLAN.
Trunk VLANs in a VF driver are those set using

"ip link set <pfdev> vf <n> <vlanid>"

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
CC: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/igbvf/netdev.c

index 32b3044fa45cdf5d9d7cda6de26c6f4afda2ed83..23cc40f22d6fcbae27893acb6d09d716f6635cab 100644 (file)
@@ -102,8 +102,8 @@ static void igbvf_receive_skb(struct igbvf_adapter *adapter,
 {
        if (status & E1000_RXD_STAT_VP) {
                u16 vid = le16_to_cpu(vlan) & E1000_RXD_SPC_VLAN_MASK;
-
-               __vlan_hwaccel_put_tag(skb, vid);
+               if (test_bit(vid, adapter->active_vlans))
+                       __vlan_hwaccel_put_tag(skb, vid);
        }
        netif_receive_skb(skb);
 }