[Intel-wired-lan] [intel-next PATCH 12/14] ice: print message if ice_mbx_vf_state_handler returns an error

Szlosek, Marek marek.szlosek at intel.com
Fri Mar 10 13:18:53 UTC 2023



> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces at osuosl.org> On Behalf Of
> Jacob Keller
> Sent: środa, 22 lutego 2023 18:09
> To: Intel Wired LAN <intel-wired-lan at lists.osuosl.org>
> Cc: Nguyen, Anthony L <anthony.l.nguyen at intel.com>; Brandeburg, Jesse
> <jesse.brandeburg at intel.com>
> Subject: [Intel-wired-lan] [intel-next PATCH 12/14] ice: print message if
> ice_mbx_vf_state_handler returns an error
> 
> If ice_mbx_vf_state_handler() returns an error, the ice_is_malicious_vf()
> function just exits without printing anything.
> 
> Instead, use dev_warn_ratelimited to print a warning that we were unable to
> check the status for this VF. The _ratelimited variant is used to avoid
> potentially spamming the log if this function is failing consistently for every
> single mailbox message.
> 
> Also we can drop the "goto" as it simply skips over a report_malvf check.
> That variable should always be false if ice_mbx_vf_state_handler returns
> non-zero.
> 
> Signed-off-by: Jacob Keller <jacob.e.keller at intel.com>
> Reviewed-by: Michal Swiatkowski <michal.swiatkowski at linux.intel.com>
> ---
>  drivers/net/ethernet/intel/ice/ice_sriov.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/intel/ice/ice_sriov.c
> b/drivers/net/ethernet/intel/ice/ice_sriov.c
> index 5ae923ea979c..f0daeda236de 100644
> --- a/drivers/net/ethernet/intel/ice/ice_sriov.c
> +++ b/drivers/net/ethernet/intel/ice/ice_sriov.c

Tested-by: Marek Szlosek <marek.szlosek at intel.com>


More information about the Intel-wired-lan mailing list