diff options
author | Greg Rose | 2014-03-14 08:32:20 +0100 |
---|---|---|
committer | Jeff Kirsher | 2014-04-28 12:54:12 +0200 |
commit | 1315f7c34e08f50b0d710168c2d98fb4766a7f5d (patch) | |
tree | 64dad81893e6775d007600fabd6fb0c29ebf8011 | |
parent | i40e: remove ptp_tx_work timestamp work item (diff) | |
download | kernel-qcow2-linux-1315f7c34e08f50b0d710168c2d98fb4766a7f5d.tar.gz kernel-qcow2-linux-1315f7c34e08f50b0d710168c2d98fb4766a7f5d.tar.xz kernel-qcow2-linux-1315f7c34e08f50b0d710168c2d98fb4766a7f5d.zip |
i40e: Retain MAC filters when changing port VLAN
We were already taking care to retain the MAC filter list when deleting a
port VLAN. Take some additional care to retain the MAC filter list when
changing a port VLAN.
Change-ID: Iacf9599ea24ecb4dca8e419aacaf4b58ca361a9c
Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c index b27b2f59ea82..982eef042577 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c @@ -2128,11 +2128,15 @@ int i40e_ndo_set_vf_port_vlan(struct net_device *netdev, /* Check for condition where there was already a port VLAN ID * filter set and now it is being deleted by setting it to zero. + * Additionally check for the condition where there was a port + * VLAN but now there is a new and different port VLAN being set. * Before deleting all the old VLAN filters we must add new ones * with -1 (I40E_VLAN_ANY) or otherwise we're left with all our * MAC addresses deleted. */ - if (!(vlan_id || qos) && vsi->info.pvid) + if ((!(vlan_id || qos) || + (vlan_id | qos) != le16_to_cpu(vsi->info.pvid)) && + vsi->info.pvid) ret = i40e_vsi_add_vlan(vsi, I40E_VLAN_ANY); if (vsi->info.pvid) { |