• Brett Creeley's avatar
    ice: Check if unicast MAC exists before setting VF MAC · 47ebc7b0
    Brett Creeley authored
    Currently if a unicast MAC is set via ndo_set_vf_mac, the PF driver will
    set the VF's dflt_lan_addr.addr once some basic checks have passed. The
    VF is then reset. During reset the PF driver will attempt to program the
    VF's MAC from the dflt_lan_addr.addr field. This fails when the MAC
    already exists on the PF's switch.
    
    This is causing the VF to be completely disabled until removing/enabling
    any VFs via sysfs.
    
    Fix this by checking if the unicast MAC exists before triggering a VF
    reset directly in ndo_set_vf_mac. Also, add a check if the unicast MAC
    is set to the same value as before and return 0 if that is the case.
    Signed-off-by: default avatarBrett Creeley <brett.creeley@intel.com>
    Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
    Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
    47ebc7b0
ice_virtchnl_pf.c 105 KB