• Wojciech Drewek's avatar
    ice: Move devlink port to PF/VF struct · 2ae0aa47
    Wojciech Drewek authored
    Keeping devlink port inside VSI data structure causes some issues.
    Since VF VSI is released during reset that means that we have to
    unregister devlink port and register it again every time reset is
    triggered. With the new changes in devlink API it
    might cause deadlock issues. After calling
    devlink_port_register/devlink_port_unregister devlink API is going to
    lock rtnl_mutex. It's an issue when VF reset is triggered in netlink
    operation context (like setting VF MAC address or VLAN),
    because rtnl_lock is already taken by netlink. Another call of
    rtnl_lock from devlink API results in dead-lock.
    
    By moving devlink port to PF/VF we avoid creating/destroying it
    during reset. Since this patch, devlink ports are created during
    ice_probe, destroyed during ice_remove for PF and created during
    ice_repr_add, destroyed during ice_repr_rem for VF.
    Signed-off-by: default avatarWojciech Drewek <wojciech.drewek@intel.com>
    Tested-by: default avatarSandeep Penigalapati <sandeep.penigalapati@intel.com>
    Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
    2ae0aa47
ice_virtchnl_pf.h 8.43 KB