Commit 29f71bb0 authored by Greg Rose's avatar Greg Rose Committed by Jeff Kirsher

i40e: Delete stale MAC filters after change

Delete all the old and stale MAC filters for the VF VSI when the host
administrator changes the VF MAC address from under its feet.  Also don't
bother to add a filter for the VSI when its going to go away anyway.
Just record the new address and punch the VF reset.

Change-ID: Ic0d12055926f41989d1965ccf500053729c063ad
Signed-off-by: default avatarGreg Rose <gregory.v.rose@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent bbe7d0e0
...@@ -2063,14 +2063,11 @@ int i40e_ndo_set_vf_mac(struct net_device *netdev, int vf_id, u8 *mac) ...@@ -2063,14 +2063,11 @@ int i40e_ndo_set_vf_mac(struct net_device *netdev, int vf_id, u8 *mac)
i40e_del_filter(vsi, vf->default_lan_addr.addr, vf->port_vlan_id, i40e_del_filter(vsi, vf->default_lan_addr.addr, vf->port_vlan_id,
true, false); true, false);
/* add the new mac address */ /* Delete all the filters for this VSI - we're going to kill it
f = i40e_add_filter(vsi, mac, vf->port_vlan_id, true, false); * anyway.
if (!f) { */
dev_err(&pf->pdev->dev, list_for_each_entry(f, &vsi->mac_filter_list, list)
"Unable to add VF ucast filter\n"); i40e_del_filter(vsi, f->macaddr, f->vlan, true, false);
ret = -ENOMEM;
goto error_param;
}
dev_info(&pf->pdev->dev, "Setting MAC %pM on VF %d\n", mac, vf_id); dev_info(&pf->pdev->dev, "Setting MAC %pM on VF %d\n", mac, vf_id);
/* program mac filter */ /* program mac filter */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment