mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-05 20:33:49 -04:00
ice: move ice_vf_vsi_release into ice_vf_lib.c
The ice_vf_vsi_release function will be used in a future change to refactor the .vsi_rebuild function. Move this over to ice_vf_lib.c so that it can be used there. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Marek Szlosek <marek.szlosek@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
This commit is contained in:
committed by
Tony Nguyen
parent
e158819706
commit
1efee0734b
@@ -40,21 +40,6 @@ static void ice_free_vf_entries(struct ice_pf *pf)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ice_vf_vsi_release - invalidate the VF's VSI after freeing it
|
||||
* @vf: invalidate this VF's VSI after freeing it
|
||||
*/
|
||||
static void ice_vf_vsi_release(struct ice_vf *vf)
|
||||
{
|
||||
struct ice_vsi *vsi = ice_get_vf_vsi(vf);
|
||||
|
||||
if (WARN_ON(!vsi))
|
||||
return;
|
||||
|
||||
ice_vsi_release(vsi);
|
||||
ice_vf_invalidate_vsi(vf);
|
||||
}
|
||||
|
||||
/**
|
||||
* ice_free_vf_res - Free a VF's resources
|
||||
* @vf: pointer to the VF info
|
||||
|
||||
@@ -1143,6 +1143,24 @@ void ice_vf_invalidate_vsi(struct ice_vf *vf)
|
||||
vf->lan_vsi_num = ICE_NO_VSI;
|
||||
}
|
||||
|
||||
/**
|
||||
* ice_vf_vsi_release - Release the VF VSI and invalidate indexes
|
||||
* @vf: pointer to the VF structure
|
||||
*
|
||||
* Release the VF associated with this VSI and then invalidate the VSI
|
||||
* indexes.
|
||||
*/
|
||||
void ice_vf_vsi_release(struct ice_vf *vf)
|
||||
{
|
||||
struct ice_vsi *vsi = ice_get_vf_vsi(vf);
|
||||
|
||||
if (WARN_ON(!vsi))
|
||||
return;
|
||||
|
||||
ice_vsi_release(vsi);
|
||||
ice_vf_invalidate_vsi(vf);
|
||||
}
|
||||
|
||||
/**
|
||||
* ice_vf_set_initialized - VF is ready for VIRTCHNL communication
|
||||
* @vf: VF to set in initialized state
|
||||
|
||||
@@ -36,6 +36,7 @@ void ice_vf_ctrl_invalidate_vsi(struct ice_vf *vf);
|
||||
void ice_vf_ctrl_vsi_release(struct ice_vf *vf);
|
||||
struct ice_vsi *ice_vf_ctrl_vsi_setup(struct ice_vf *vf);
|
||||
void ice_vf_invalidate_vsi(struct ice_vf *vf);
|
||||
void ice_vf_vsi_release(struct ice_vf *vf);
|
||||
void ice_vf_set_initialized(struct ice_vf *vf);
|
||||
|
||||
#endif /* _ICE_VF_LIB_PRIVATE_H_ */
|
||||
|
||||
Reference in New Issue
Block a user