ice: convert vf_ops .vsi_rebuild to .create_vsi
authorJacob Keller <jacob.e.keller@intel.com>
Thu, 19 Jan 2023 01:16:50 +0000 (17:16 -0800)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Mon, 6 Feb 2023 17:42:55 +0000 (09:42 -0800)
commit5531bb851fba2a93ed0c1de1873ea563d8c1da76
treeee51eb82bea6c8e53a902f4192850b32d1072a82
parentb1b5694235efcc0b7d724961e8300c9a8cae993d
ice: convert vf_ops .vsi_rebuild to .create_vsi

The .vsi_rebuild function exists for ice_reset_vf. It is used to release
and re-create the VSI during a single-VF reset.

This function is only called when we need to re-create the VSI, and not
when rebuilding an existing VSI. This makes the single-VF reset process
different from the process used to restore functionality after a
hardware reset such as the PF reset or EMP reset.

When we add support for Scalable IOV VFs, the implementation will be very
similar. The primary difference will be in the fact that each VF type uses
a different underlying VSI type in hardware.

Move the common functionality into a new ice_vf_recreate VSI function. This
will allow the two IOV paths to share this functionality. Rework the
.vsi_rebuild vf_op into .create_vsi, only performing the task of creating a
new VSI.

This creates a nice dichotomy between the ice_vf_rebuild_vsi and
ice_vf_recreate_vsi, and should make it more clear why the two flows atre
distinct.

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>
drivers/net/ethernet/intel/ice/ice_sriov.c
drivers/net/ethernet/intel/ice/ice_vf_lib.c
drivers/net/ethernet/intel/ice/ice_vf_lib.h