]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
i40e: Stop accepting any VLAN tag on VLAN 0 filter set
authorGreg Rose <gregory.v.rose@intel.com>
Thu, 28 Nov 2013 06:42:40 +0000 (06:42 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 8 Jan 2014 05:49:26 +0000 (21:49 -0800)
When the 8021q driver is loaded it sets VLAN 0 filters on all devices.
This does not mean that any VLAN tagged packet should be accepted.
Instead accept only VLAN 0 tagged packets so that upper layers can
interpret the priority bits.

Change-Id: I17274a540b613749612ffe23a3aef2b8ee6ff6a4
Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_main.c

index 5ddbd54bbf55e33e72cb827ccb7ff9c3dcaca185..2a424709977453199aba81a1501e14f830e2f9d7 100644 (file)
@@ -1509,11 +1509,6 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi)
                                cpu_to_le16((u16)(f->vlan ==
                                            I40E_VLAN_ANY ? 0 : f->vlan));
 
-                       /* vlan0 as wild card to allow packets from all vlans */
-                       if (f->vlan == I40E_VLAN_ANY ||
-                           (vsi->netdev && !(vsi->netdev->features &
-                                             NETIF_F_HW_VLAN_CTAG_FILTER)))
-                               cmd_flags |= I40E_AQC_MACVLAN_DEL_IGNORE_VLAN;
                        cmd_flags |= I40E_AQC_MACVLAN_DEL_PERFECT_MATCH;
                        del_list[num_del].flags = cmd_flags;
                        num_del++;
@@ -1579,12 +1574,6 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi)
                        add_list[num_add].queue_number = 0;
 
                        cmd_flags |= I40E_AQC_MACVLAN_ADD_PERFECT_MATCH;
-
-                       /* vlan0 as wild card to allow packets from all vlans */
-                       if (f->vlan == I40E_VLAN_ANY || (vsi->netdev &&
-                           !(vsi->netdev->features &
-                                                NETIF_F_HW_VLAN_CTAG_FILTER)))
-                               cmd_flags |= I40E_AQC_MACVLAN_ADD_IGNORE_VLAN;
                        add_list[num_add].flags = cpu_to_le16(cmd_flags);
                        num_add++;