i40e: set broadcast promiscuous mode for each active VLAN
authorJacob Keller <jacob.e.keller@intel.com>
Tue, 8 Nov 2016 21:05:10 +0000 (13:05 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sat, 3 Dec 2016 07:32:37 +0000 (23:32 -0800)
commit435c084aad9615c7c77464e7c04600da920fc208
tree56eeb63299712944a9fbfa47826c7fa183cf323e
parent4ad9f4f9e2873ca999135b151dbb7d80f57ea0a9
i40e: set broadcast promiscuous mode for each active VLAN

A previous workaround added to ensure receipt of all broadcast frames
incorrectly set the broadcast promiscuous mode unconditionally
regardless of active VLAN status.

Replace this partial workaround with a complete solution that sets the
broadcast promiscuous filters in i40e_sync_vsi_filters. This new method
sets the promiscuous mode based on when broadcast filters are added or
removed.

I40E_VLAN_ANY will request a broadcast filter for all VLANs, (as we're
in untagged mode) while a broadcast filter on a specific VLAN will only
request broadcast for that VLAN.

Thus, we restore addition of broadcast filter to the array, but we add
special handling for these such that they enable the broadcast
promiscuous mode instead of being sent as regular filters.

The end result is that we will correctly receive all broadcast packets
(even those with a *source* address equal to the broadcast address) but
will not receive packets for which we don't have an active VLAN filter.

Change-ID: I7d0585c5cec1a5bf55bf533b42e5e817d5db6a2d
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_common.c
drivers/net/ethernet/intel/i40e/i40e_main.c
drivers/net/ethernet/intel/i40e/i40e_prototype.h
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c