git: 492bd0db44ba - main - if_bnxt: Collect hw stats every 250 milliseconds
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 09 Oct 2026 10:12:45 UTC
The branch main has been updated by ssaxena:
URL: https://cgit.FreeBSD.org/src/commit/?id=492bd0db44bace9475e15dfebdc17076b536533f
commit 492bd0db44bace9475e15dfebdc17076b536533f
Author: Sumit Saxena <sumit.saxena@broadcom.com>
AuthorDate: 2026-07-31 15:49:32 +0000
Commit: Sumit Saxena <ssaxena@FreeBSD.org>
CommitDate: 2026-10-09 08:24:44 +0000
if_bnxt: Collect hw stats every 250 milliseconds
bnxt_if_timer() only scheduled bnxt_update_admin_status(), which
polls HW stats, once per second. Drop the interval to 250ms so stats
collection is timely.
Reviewed by: gallatin
MFC after: 2 weeks
Sponsored by: Broadcom Inc.
Differential Revision: https://reviews.freebsd.org/D58610
---
sys/dev/bnxt/bnxt_en/if_bnxt.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/sys/dev/bnxt/bnxt_en/if_bnxt.c b/sys/dev/bnxt/bnxt_en/if_bnxt.c
index f6aeab9095d6..6768e313f78d 100644
--- a/sys/dev/bnxt/bnxt_en/if_bnxt.c
+++ b/sys/dev/bnxt/bnxt_en/if_bnxt.c
@@ -4260,6 +4260,10 @@ bnxt_update_admin_status(if_ctx_t ctx)
return;
}
+/* Poll interval for bnxt_update_admin_status(); not sysctl-tunable, unlike
+ * other driver intervals. */
+#define BNXT_ADMIN_POLL_TICKS (hz / 4) /* 250ms */
+
static void
bnxt_if_timer(if_ctx_t ctx, uint16_t qid)
{
@@ -4267,8 +4271,7 @@ bnxt_if_timer(if_ctx_t ctx, uint16_t qid)
struct bnxt_softc *softc = iflib_get_softc(ctx);
uint64_t ticks_now = ticks;
- /* Schedule bnxt_update_admin_status() once per sec */
- if (ticks_now - softc->admin_ticks >= hz) {
+ if (ticks_now - softc->admin_ticks >= BNXT_ADMIN_POLL_TICKS) {
softc->admin_ticks = ticks_now;
iflib_admin_intr_deferred(ctx);
}