aboutsummaryrefslogtreecommitdiff
path: root/mac.h
diff options
context:
space:
mode:
authorKevin Bowling <kbowling@FreeBSD.org>2026-08-27 02:00:34 +0000
committerKevin Bowling <kbowling@FreeBSD.org>2026-09-02 17:36:20 +0000
commita550e8280b9881c8c207b842f51065f155b84951 (patch)
treeaac001bf96f820086d3e84edb4d5dd1f95ce106f /mac.h
parente2cf718062ccabb20601f8051848f3ab5f28ba2b (diff)
iflib: Require sustained demand for TX watchdogHEADmain
The restored watchdog arms when the outstanding descriptor count grows, but then continues counting based only on the queue remaining frozen. A single growth sample can therefore leave a quiet, nearly empty queue armed until the watchdog resets the interface. Lockless sampling of the queue counters can also manufacture the initial growth sample. This matches watchdog reports from I354 queues with 979 or 980 of 1022 usable descriptors still available. Neither queue was under transmit backpressure when the reset flapped its link. Keep the watchdog armed only while the outstanding count continues to grow, the software ring is stalled, or the hardware ring is at iflib's backpressure threshold. The last condition preserves hang detection with simple-TX, which bypasses the software ring. A busy hang still reaches the verdict while a frozen but quiet tail disarms. Retain the final driver completion peek so a missed completion interrupt schedules the queue task instead of resetting it. Validated on an 82580 with one and four queue sets in the default mp_ring and simple-TX modes. Sustained traffic and repeated burst/idle cycles produced no false resets. Sixteen-flow runs exercised all four queues in both modes. Clearing TCTL.EN under load in each configuration filled the rings; the reset counter advanced once per injection, reset restored TCTL and the link, and traffic recovered. Tested by: glebius Reviewed by: iflib (gallatin), manpages (ziaee) Fixes: 69c3e0de01c1 ("iflib: restore TX watchdog functionality") MFC after: 6 days (after 69c3e0de01c1) Sponsored by: BBOX.io
Diffstat (limited to 'mac.h')
0 files changed, 0 insertions, 0 deletions