]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit7b108dd0e0cfe605d11d947f977069cb9ecfb7ea
treeea67274684f7c054891cd645c30bc680948fd2d5
parent0514c02a0d6a102ea36f8d09e3fae9bdcb9e443a
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