Change verbosity of events related to malicious VFs to DP_NOTICE
from DP_INFO. They are not just informational events.

Signed-off-by: Rasesh Mody <rasesh.m...@cavium.com>
---
 drivers/net/qede/base/common_hsi.h  |    4 ++--
 drivers/net/qede/base/ecore_sriov.c |   16 +++++++++++-----
 2 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/drivers/net/qede/base/common_hsi.h 
b/drivers/net/qede/base/common_hsi.h
index bfe50e1..a1257fb 100644
--- a/drivers/net/qede/base/common_hsi.h
+++ b/drivers/net/qede/base/common_hsi.h
@@ -718,8 +718,8 @@ struct iscsi_eqe_data {
  * Event Ring malicious VF data
  */
 struct malicious_vf_eqe_data {
-       u8 vfId /* Malicious VF ID */;
-       u8 errId /* Malicious VF error */;
+       u8 vf_id /* Malicious VF ID */;
+       u8 err_id /* Malicious VF error */;
        __le16 reserved[3];
 };
 
diff --git a/drivers/net/qede/base/ecore_sriov.c 
b/drivers/net/qede/base/ecore_sriov.c
index 6d3fc4e..b1ab80b 100644
--- a/drivers/net/qede/base/ecore_sriov.c
+++ b/drivers/net/qede/base/ecore_sriov.c
@@ -4192,16 +4192,22 @@ static void ecore_sriov_vfpf_malicious(struct 
ecore_hwfn *p_hwfn,
 {
        struct ecore_vf_info *p_vf;
 
-       p_vf = ecore_sriov_get_vf_from_absid(p_hwfn, p_data->vfId);
+       p_vf = ecore_sriov_get_vf_from_absid(p_hwfn, p_data->vf_id);
 
        if (!p_vf)
                return;
 
-       DP_INFO(p_hwfn,
-               "VF [%d] - Malicious behavior [%02x]\n",
-               p_vf->abs_vf_id, p_data->errId);
+       if (!p_vf->b_malicious) {
+               DP_NOTICE(p_hwfn, false,
+                         "VF [%d] - Malicious behavior [%02x]\n",
+                         p_vf->abs_vf_id, p_data->err_id);
 
-       p_vf->b_malicious = true;
+               p_vf->b_malicious = true;
+       } else {
+               DP_INFO(p_hwfn,
+                       "VF [%d] - Malicious behavior [%02x]\n",
+                       p_vf->abs_vf_id, p_data->err_id);
+       }
 
        OSAL_PF_VF_MALICIOUS(p_hwfn, p_vf->relative_vf_id);
 }
-- 
1.7.10.3

Reply via email to