Page MenuHomeFreeBSD

iflib: Require sustained demand for TX watchdog
Needs ReviewPublic

Authored by kbowling on Thu, Aug 27, 2:35 AM.
Tags
None
Referenced Files
F168363994: D59204.id185174.diff
Thu, Aug 27, 7:13 PM
F168361134: D59204.diff
Thu, Aug 27, 6:58 PM
F168334934: D59204.id185174.diff
Thu, Aug 27, 4:20 PM
F168324701: D59204.diff
Thu, Aug 27, 3:20 PM
F168317692: D59204.id.diff
Thu, Aug 27, 2:41 PM
F168302802: D59204.id185174.diff
Thu, Aug 27, 12:58 PM
Unknown Object (File)
Thu, Aug 27, 10:22 AM
Unknown Object (File)
Thu, Aug 27, 9:39 AM

Details

Reviewers
glebius
netchild
gallatin
shurd
Group Reviewers
iflib
Summary
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.

Fixes:          69c3e0de01c1 ("iflib: restore TX watchdog functionality")
MFC after:      (directly after 69c3e0de01c1)

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped