Commit bf8987df authored by Paul Greenwalt's avatar Paul Greenwalt Committed by Jeff Kirsher
Browse files

ice: set VF default LAN address



Remove is_zero_ether_add() check when setting the VF default LAN address.
This check assumed that the address had been delete and zeroed before
calling ice_vc_add_mac_addr(). Now the default LAN address will be set
to the last unicast MAC address added by the VF.

The default LAN address is reported by the PF via ndo_get_vf_config.

Signed-off-by: default avatarPaul Greenwalt <paul.greenwalt@intel.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent f0cbbb9c
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -2862,9 +2862,11 @@ ice_vc_add_mac_addr(struct ice_vf *vf, struct ice_vsi *vsi, u8 *mac_addr)
		return -EIO;
	}

	/* only set dflt_lan_addr once */
	if (is_zero_ether_addr(vf->dflt_lan_addr.addr) &&
	    is_unicast_ether_addr(mac_addr))
	/* Set the default LAN address to the latest unicast MAC address added
	 * by the VF. The default LAN address is reported by the PF via
	 * ndo_get_vf_config.
	 */
	if (is_unicast_ether_addr(mac_addr))
		ether_addr_copy(vf->dflt_lan_addr.addr, mac_addr);

	vf->num_mac++;