summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-01-15 08:01:03 (GMT)
committerDavid S. Miller <davem@davemloft.net>2014-01-15 08:01:03 (GMT)
commite3e4e01cb7c8b56b634fca53fcb05563c23fb656 (patch)
tree6790cf433cf7f48537dc17408f5f229991acfef3 /drivers/net
parente07d4ca83d047716b8cc87deea7d5e4b2c42193a (diff)
parent8d82a7c5d8646b5fa68db2c9e695298bd95230cf (diff)
downloadlinux-e3e4e01cb7c8b56b634fca53fcb05563c23fb656.tar.xz
Merge branch 'i40e-next'
Aaron Brown says: ==================== Intel Wired LAN Driver Updates This series contains updates to i40e from Greg Rose for VLAN filtering. Greg Rose (2): i40e: Warn admin to reload VF driver on port VLAN configuration. When an administrator sets a port VLAN filters for the virtual function (VF) after the VF has already set its own VLAN filters a conflict requiring the VF be reloaded can occur. This patch logs a message indicating to the system administrator that the VF driver must be reloaded for the new port VLAN settings to take effect i40e: Retain MAC filters on port VLAN deletion On port VLAN deletion the list of MAC filters for the virtual function (VF) VSI were all deleted. Let's keep them around, they come in handy for keeping the VF functional. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_main.c3
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c18
2 files changed, 21 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 62418ee..7bfa789 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -1844,7 +1844,10 @@ int i40e_vsi_add_vlan(struct i40e_vsi *vsi, s16 vid)
return -ENOMEM;
}
}
+ }
+ /* Do not assume that I40E_VLAN_ANY should be reset to VLAN 0 */
+ if (vid > 0 && !vsi->info.pvid) {
list_for_each_entry(f, &vsi->mac_filter_list, list) {
if (i40e_find_filter(vsi, f->macaddr, I40E_VLAN_ANY,
is_vf, is_netdev)) {
diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
index 53069c0..44bb359 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
@@ -2076,6 +2076,20 @@ int i40e_ndo_set_vf_port_vlan(struct net_device *netdev,
goto error_pvid;
}
+ if (vsi->info.pvid == 0 && i40e_is_vsi_in_vlan(vsi))
+ dev_err(&pf->pdev->dev,
+ "VF %d has already configured VLAN filters and the administrator is requesting a port VLAN override.\nPlease unload and reload the VF driver for this change to take effect.\n",
+ vf_id);
+
+ /* Check for condition where there was already a port VLAN ID
+ * filter set and now it is being deleted by setting it to zero.
+ * 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)
+ ret = i40e_vsi_add_vlan(vsi, I40E_VLAN_ANY);
+
if (vsi->info.pvid) {
/* kill old VLAN */
ret = i40e_vsi_kill_vlan(vsi, (le16_to_cpu(vsi->info.pvid) &
@@ -2104,6 +2118,10 @@ int i40e_ndo_set_vf_port_vlan(struct net_device *netdev,
vsi->back->hw.aq.asq_last_status);
goto error_pvid;
}
+ /* Kill non-vlan MAC filters - ignore error return since
+ * there might not be any non-vlan MAC filters.
+ */
+ i40e_vsi_kill_vlan(vsi, I40E_VLAN_ANY);
}
if (ret) {