]> git.baikalelectronics.ru Git - kernel.git/commit
ice: refactor spoofchk control code in ice_sriov.c
authorJacob Keller <jacob.e.keller@intel.com>
Wed, 23 Feb 2022 00:26:54 +0000 (16:26 -0800)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 15 Mar 2022 00:22:59 +0000 (17:22 -0700)
commit74724b4b399dc96de73e2e00de90d5b4c9d2e558
tree0a6da9ab468b4b3558da886740452658da96f383
parent5340d9952b952e673f6062fbe3e1be6c2641a6e7
ice: refactor spoofchk control code in ice_sriov.c

The API to control the VSI spoof checking for a VF VSI has three
functions: enable, disable, and set. The set function takes the VSI and
the VF and decides whether to call enable or disable based on the
vf->spoofchk field.

In some flows, vf->spoofchk is not yet set, such as the function used to
control the setting for a VF. (vf->spoofchk is only updated after a
success).

Simplify this API by refactoring ice_vf_set_spoofchk_cfg to be
"ice_vsi_apply_spoofchk" which takes the boolean and allows all callers
to avoid having to determine whether to call enable or disable
themselves.

This matches the expected callers better, and will prevent the need to
export more than one function when this code must be called from another
file.

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_sriov.c