]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
ice: print message if ice_mbx_vf_state_handler returns an error
authorJacob Keller <jacob.e.keller@intel.com>
Wed, 22 Feb 2023 17:09:18 +0000 (09:09 -0800)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Mon, 13 Mar 2023 18:06:06 +0000 (11:06 -0700)
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@intel.com>
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Tested-by: Marek Szlosek <marek.szlosek@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_sriov.c

index 5ae923ea979c6019325083cda315f66e6b4718aa..f0daeda236def9bfaaa339cf21578ea17ab27491 100644 (file)
@@ -1805,7 +1805,8 @@ ice_is_malicious_vf(struct ice_pf *pf, struct ice_rq_event_info *event,
        status = ice_mbx_vf_state_handler(&pf->hw, mbxdata, &vf->mbx_info,
                                          &report_malvf);
        if (status)
-               goto out_put_vf;
+               dev_warn_ratelimited(dev, "Unable to check status of mailbox overflow for VF %u MAC %pM, status %d\n",
+                                    vf->vf_id, vf->dev_lan_addr, status);
 
        if (report_malvf) {
                struct ice_vsi *pf_vsi = ice_get_main_vsi(pf);