• Michal Swiatkowski's avatar
    ice: cleanup in VSI config/deconfig code · 0db66d20
    Michal Swiatkowski authored
    Do few small cleanups:
    
    1) Rename the function to reflect that it doesn't configure all things
    related to VSI. ice_vsi_cfg_lan() better fits to what function is doing.
    
    ice_vsi_cfg() can be use to name function that will configure whole VSI.
    
    2) Remove unused ethtype field from VSI. There is no need to set
    ethtype here, because it is never used.
    
    3) Remove unnecessary check for ICE_VSI_CHNL. There is check for
    ICE_VSI_CHNL in ice_vsi_get_qs, so there is no need to check it before
    calling the function.
    
    4) Simplify ice_vsi_alloc() call. There is no need to check the type of
    VSI before calling ice_vsi_alloc(). For ICE_VSI_CHNL vf is always NULL
    (ice_vsi_setup() is called with vf=NULL).
    For ICE_VSI_VF or ICE_VSI_CTRL ch is always NULL and for other VSI types
    ch and vf are always NULL.
    
    5) Remove unnecessary call to ice_vsi_dis_irq(). ice_vsi_dis_irq() will
    be called in ice_vsi_close() flow (ice_vsi_close() -> ice_vsi_down() ->
    ice_vsi_dis_irq()). Remove unnecessary call.
    
    6) Don't remove specific filters in release. All hw filters are removed
    in ice_fltr_remove_alli(), which is always called in VSI release flow.
    There is no need to remove only ethertype filters before calling
    ice_fltr_remove_all().
    
    7) Rename ice_vsi_clear() to ice_vsi_free(). As ice_vsi_clear() only
    free memory allocated in ice_vsi_alloc() rename it to ice_vsi_free()
    which better shows what function is doing.
    
    8) Free coalesce param in rebuild. There is potential memory leak if
    configuration of VSI lan fails. Free coalesce to avoid it.
    Signed-off-by: default avatarMichal Swiatkowski <michal.swiatkowski@linux.intel.com>
    Tested-by: Gurucharan G <gurucharanx.g@intel.com> (A Contingent worker at Intel)
    Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
    0db66d20
ice_ethtool.c 128 KB