iavf: Fix updating statistics
Subsystems (2)
Tony Nguyen
maintainerPATCH 1/1 iavf: Fix updating statistics
Commit bac8486116b0 ("iavf: Refactor the watchdog state machine") inverted the logic for when to update statistics. Statistics should be updated when no other commands are pending, instead they were only requested when a command was processed. iavf_request_stats() would see a pending request and not request statistics to be updated. This caused statistics to never be updated; fix the logic.
--- drivers/net/ethernet/intel/iavf/iavf_main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/net/ethernet/intel/iavf/iavf_main.c +4 -1
@@ -1937,7 +1937,10 @@ static void iavf_watchdog_task(struct work_struct *work)iavf_send_api_ver (adapter); } }else { -if (!iavf_process_aq_command (adapter) && +/* An error will be returned if no commands were +* processed; use this opportunity to update stats +*/ +if (iavf_process_aq_command (adapter) && adapter->state == __IAVF_RUNNING)iavf_request_stats (adapter); }
Signature · 1 line
2.20.1
Bowers
PATCH 1/1 iavf: Fix updating statistics
Quoted 14 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Tony Nguyen
Sent: Wednesday, June 24, 2020 9:04 AM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [PATCH] iavf: Fix updating statisticsCommit
bac8486116b0("iavf: Refactor the watchdog state machine") inverted the logic for when to update statistics. Statistics should be updated when no other commands are pending, instead they were only requested when a command was processed.iavf_request_stats()would see a pending request and not request statistics to be updated. This caused statistics to never be updated; fix the logic.
Quoted 5 lines
Fixes bac8486116b0 ("iavf: Refactor the watchdog state machine")Signed-off-by Tony Nguyen <[email protected]>--- drivers/net/ethernet/intel/iavf/iavf_main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)