• Jacob Keller's avatar
    ice: refactor spoofchk control code in ice_sriov.c · a8ea6d86
    Jacob Keller authored
    
    
    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: default avatarJacob Keller <jacob.e.keller@intel.com>
    Tested-by: default avatarKonrad Jankowski <konrad0.jankowski@intel.com>
    Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
    a8ea6d86
ice_sriov.c 180 KB