• Brett Creeley's avatar
    ice: Enable ip link show on the PF to display VF unicast MAC(s) · ed4c068d
    Brett Creeley authored
    Currently when there are SR-IOV VF(s) and the user does "ip link show <pf
    interface>" the VF unicast MAC addresses all show 00:00:00:00:00:00
    if the unicast MAC was set via VIRTCHNL (i.e. not administratively set
    by the host PF).
    
    This is misleading to the host administrator. Fix this by setting the
    VF's dflt_lan_addr.addr when the VF's unicast MAC address is
    configured via VIRTCHNL. There are a couple cases where we don't allow
    the dflt_lan_addr.addr field to be written. First, If the VF's
    pf_set_mac field is true and the VF is not trusted, then we don't allow
    the dflt_lan_addr.addr to be modified. Second, if the
    dflt_lan_addr.addr has already been set (i.e. via VIRTCHNL).
    
    Also a small refactor was done to separate the flow for add and delete
    MAC addresses in order to simplify the logic for error conditions
    and set/clear the VF's dflt_lan_addr.addr field.
    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>
    ed4c068d
ice_virtchnl_pf.c 91.5 KB