iavf: fix VF stats not updating due to PTP command preemption
Subsystems (2)
PATCH 1/1 iavf: fix VF stats not updating due to PTP command preemption
Since the introduction of PTP support in iavf, commit 7c01dbfc8a1c ("iavf: periodically cache PHC time"), the periodic PTP clock caching task always provides a pending admin queue command, causing iavf_process_aq_command() to always return success and permanently preventing the stats fallback path from executing, which results in VF statistics remaining at zero despite traffic flowing.
Fix this by making the stats request unconditional when the adapter is in the running state, rather than relying on it as a fallback when no other admin queue commands were processed.
--- drivers/net/ethernet/intel/iavf/iavf_main.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-)
drivers/net/ethernet/intel/iavf/iavf_main.c +4 -10
@@ -2986,18 +2986,12 @@ static int iavf_watchdog_step(struct iavf_adapter *adapter)iavf_send_api_ver (adapter); } }else { -int ret =iavf_process_aq_command (adapter); - -/* An error will be returned if no commands were -* processed; use this opportunity to update stats -* if the error isn't -ENOTSUPP -*/ -if (ret && ret != -EOPNOTSUPP && - adapter->state == __IAVF_RUNNING) -iavf_request_stats (adapter); +iavf_process_aq_command (adapter); } -if (adapter->state == __IAVF_RUNNING) +if (adapter->state == __IAVF_RUNNING) { +iavf_request_stats (adapter);iavf_detect_recover_hung (&adapter->vsi); + }break ;case __IAVF_REMOVE:default :
Signature · 1 line
2.54.0
Quoted 56 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Tomasz Lichwala
Sent: Thursday, July 23, 2026 5:28 PM
To: [email protected]
Cc: Tomasz Lichwala <[email protected]>; Loktionov, Aleksandr <[email protected]>
Subject: [Intel-wired-lan] [iwl-net v1] iavf: fix VF stats not updating due to PTP command preemptionSince the introduction of PTP support in iavf, commit
7c01dbfc8a1c("iavf: periodically cache PHC time"), the periodic PTP clock caching task always provides a pending admin queue command, causingiavf_process_aq_command()to always return success and permanently preventing the stats fallback path from executing, which results in VF statistics remaining at zero despite traffic flowing.Fix this by making the stats request unconditional when the adapter is in the running state, rather than relying on it as a fallback when no other admin queue commands were processed.
Fixes 7c01dbfc8a1c ("iavf: periodically cache PHC time")Reviewed-by Aleksandr Loktionov <[email protected]>Signed-off-by Tomasz Lichwala <[email protected]>--- drivers/net/ethernet/intel/iavf/iavf_main.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-)drivers/net/ethernet/intel/iavf/iavf_main.c +4
-10@@ -2986,18 +2986,12 @@ static int iavf_watchdog_step(struct iavf_adapter *adapter)iavf_send_api_ver (adapter); } }else { -int ret =iavf_process_aq_command (adapter); - -/* An error will be returned if no commands were -* processed; use this opportunity to update stats -* if the error isn't -ENOTSUPP -*/ -if (ret && ret != -EOPNOTSUPP && - adapter->state == __IAVF_RUNNING) -iavf_request_stats (adapter); +iavf_process_aq_command (adapter); } -if (adapter->state == __IAVF_RUNNING) +if (adapter->state == __IAVF_RUNNING) { +iavf_request_stats (adapter);iavf_detect_recover_hung (&adapter->vsi); + }break ;case __IAVF_REMOVE:
Quoted 3 lines
default:
--
2.54.0