aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ice/ice_main.c
diff options
context:
space:
mode:
authorMartyna Szapar-Mudlaw <[email protected]>2025-05-15 10:50:09 +0000
committerTony Nguyen <[email protected]>2025-06-09 16:56:18 +0000
commite7aee24a89c863f2cab0d367df3265a66ad428d7 (patch)
tree34663b94d30ce82325d8edee1c7cd4cf3f0e788a /drivers/net/ethernet/intel/ice/ice_main.c
parentnet: intel: move RSS packet classifier types to libie (diff)
downloadkernel-e7aee24a89c863f2cab0d367df3265a66ad428d7.tar.gz
kernel-e7aee24a89c863f2cab0d367df3265a66ad428d7.zip
ice: add link_down_events statistic
Introduce a link_down_events counter to the ice driver, incremented each time the link transitions from up to down. This counter can help diagnose issues related to link stability, such as port flapping or unexpected link drops. The value is exposed via ethtool's get_link_ext_stats() interface. Reviewed-by: Kory Maincent <[email protected]> Tested-by: Rinitha S <[email protected]> (A Contingent worker at Intel) Signed-off-by: Martyna Szapar-Mudlaw <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_main.c')
-rw-r--r--drivers/net/ethernet/intel/ice/ice_main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index d97d4b25b30d..4e04721467bf 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -1144,6 +1144,9 @@ ice_link_event(struct ice_pf *pf, struct ice_port_info *pi, bool link_up,
if (link_up == old_link && link_speed == old_link_speed)
return 0;
+ if (!link_up && old_link)
+ pf->link_down_events++;
+
ice_ptp_link_change(pf, link_up);
if (ice_is_dcb_active(pf)) {