Dear Pawel, dear Liang-min,

Am 24.10.23 um 13:29 schrieb Pawel Chmielewski:
From: Liang-min Wang <[email protected]>

Should min start with a capital letter Liang-Min?

In cases when VF sends malformed packets that are classified as malicious,
sometimes it causes Tx queue to freeze. This frozen queue can be stuck
for several minutes being unusable.

Did you analyze the cause for this. Why does it freeze only sometimes? Are you able to reproduce it?

When MDD event occurs, perform graceful VF reset to quickly bring VF
back to operational state.

I’d spell out Malicious Driver Detection.

Please mention, that a new log message is added.

Signed-off-by: Liang-min Wang <[email protected]>
Signed-off-by: Pawel Chmielewski <[email protected]>
Reviewed-by: Michal Swiatkowski <[email protected]>
---
  drivers/net/ethernet/intel/ice/ice_main.c | 14 ++++++++++++--
  1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/ice/ice_main.c 
b/drivers/net/ethernet/intel/ice/ice_main.c
index 66095e9b094e..cf9fd1f168f7 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -1836,8 +1836,13 @@ static void ice_handle_mdd_event(struct ice_pf *pf)
                        vf->mdd_tx_events.count++;
                        set_bit(ICE_MDD_VF_PRINT_PENDING, pf->state);
                        if (netif_msg_tx_err(pf))
-                               dev_info(dev, "Malicious Driver Detection event 
TX_TCLAN detected on VF %d\n",
+                               dev_info(dev,
+                                        "Malicious Driver Detection event TX_TCLAN 
detected on VF %d\n",
                                         vf->vf_id);

I’d refrain from formatting changes.

+                       dev_info(dev,
+                                "PF-to-VF reset on VF %d due to Tx MDD TX_TCLAN 
event\n",
+                                vf->vf_id);
+                       ice_reset_vf(vf, ICE_VF_RESET_NOTIFY);
                }
reg = rd32(hw, VP_MDET_TX_TDPU(vf->vf_id));
@@ -1846,8 +1851,13 @@ static void ice_handle_mdd_event(struct ice_pf *pf)
                        vf->mdd_tx_events.count++;
                        set_bit(ICE_MDD_VF_PRINT_PENDING, pf->state);
                        if (netif_msg_tx_err(pf))
-                               dev_info(dev, "Malicious Driver Detection event 
TX_TDPU detected on VF %d\n",
+                               dev_info(dev,
+                                        "Malicious Driver Detection event TX_TDPU 
detected on VF %d\n",
                                         vf->vf_id);
+                       dev_info(dev,
+                                "PF-to-VF reset on VF %d due to Tx MDD TX_TCLAN 
event\n",
+                                vf->vf_id);
+                       ice_reset_vf(vf, ICE_VF_RESET_NOTIFY);
                }
reg = rd32(hw, VP_MDET_RX(vf->vf_id));

It look like, a patch could be added ahead to factor these parts in a separate function.


Kind regards,

Paul
_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

Reply via email to