ice: move clear_malvf call in ice_free_vfs
authorJacob Keller <jacob.e.keller@intel.com>
Wed, 16 Feb 2022 21:37:31 +0000 (13:37 -0800)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Thu, 3 Mar 2022 16:46:48 +0000 (08:46 -0800)
commit294627a67e964d3000357e8ac57cc26f049da296
treeea67274684f7c054891cd645c30bc680948fd2d5
parentcd0f4f3b2c048fe99ccd2e0df2c0900408ce8507
ice: move clear_malvf call in ice_free_vfs

The ice_mbx_clear_malvf function is used to clear the indication and
count of how many times a VF was detected as malicious. During
ice_free_vfs, we use this function to ensure that all removed VFs are
reset to a clean state.

The call currently is done at the end of ice_free_vfs() using a tmp
value to iterate over all of the entries in the bitmap.

This separate iteration using tmp is problematic for a planned refactor
of the VF array data structure. To avoid this, lets move the call
slightly higher into the function inside the loop where we teardown all
of the VFs. This avoids one use of the tmp value used for iteration.
We'll fix the other user in a future change.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c