]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
ice: Refactor VF VSI release and setup functions
authorBrett Creeley <brett.creeley@intel.com>
Sat, 16 May 2020 00:51:16 +0000 (17:51 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Thu, 28 May 2020 23:25:19 +0000 (16:25 -0700)
commit3726cce258908ed6e30d52e2d4dfffe96ad2f962
tree72fcd97d33df332f97595fcd9581b1c60c41ee20
parent12bb018c538c3b9a050f69f62fa09fa6c9160bca
ice: Refactor VF VSI release and setup functions

Currently when a VF VSI calls ice_vsi_release() and ice_vsi_setup() it
subsequently clears/sets the VF cached variables for lan_vsi_idx and
lan_vsi_num. This works fine, but can be improved by handling this in
the VF specific VSI release and setup functions.

Also, when a VF VSI is setup too many parameters are passed that can be
derived from the VF. Fix this by only calling VF VSI setup with the bare
minimum parameters.

Also, add functionality to invalidate a VF's VSI when it's released
and/or setup fails. This will make it so a VF VSI cannot be accessed via
its cached vsi_idx/vsi_num in these cases.

Finally when a VF's VSI is invalidated set the lan_vsi_idx and
lan_vsi_num to ICE_NO_VSI to clearly show that there is no valid VSI
associated with this VF.

Signed-off-by: Brett Creeley <brett.creeley@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c