From: Tomasz Lichwala <tomasz.lichwala@linux.intel.com>
To: intel-wired-lan@lists.osuosl.org
Cc: Tomasz Lichwala <tomasz.lichwala@linux.intel.com>,
Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Subject: [Intel-wired-lan] [iwl-net v1] iavf: fix VF stats not updating due to PTP command preemption
Date: Thu, 23 Jul 2026 17:28:23 +0200 [thread overview]
Message-ID: <20260723152823.645558-1-tomasz.lichwala@linux.intel.com> (raw)
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.
Fixes: 7c01dbfc8a1c ("iavf: periodically cache PHC time")
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Signed-off-by: Tomasz Lichwala <tomasz.lichwala@linux.intel.com>
---
drivers/net/ethernet/intel/iavf/iavf_main.c | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c
index f5697d9c97fe..a05bd61d7de1 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_main.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
@@ -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:
--
2.54.0
reply other threads:[~2026-07-23 15:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260723152823.645558-1-tomasz.lichwala@linux.intel.com \
--to=tomasz.lichwala@linux.intel.com \
--cc=aleksandr.loktionov@intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox