Commit ba4b202
net: macb: gate TX stall watchdog on netif_carrier_ok, use warn_ratelimited
Commit 79dc190 ("net: macb: add TX stall watchdog as
defence-in-depth safety net") added a per-queue 1 Hz delayed_work
that fires macb_tx_restart() if tx_tail has not advanced. Two
operational follow-ups:
1. Boot-time false positive. Between macb_open() and link autoneg
completion, queue->tx_head can advance from kernel-queued packets
while tx_tail stays at 0 because no TCOMPs have arrived yet. The
first watchdog tick at +1000 ms then trips its head!=tail check
and fires a spurious TX-stall warning + re-kick. Observed at
~25% rate during fleet rolling reboots (6 of 24 nodes, all
tail=0 head=5-7). The re-kick itself is harmless on a healthy
ring (macb_tx_restart() verifies TBQP vs head before re-asserting
TSTART), but the warning is noise and confuses operators who
read it as a real silent-stall event.
Gate the stall check on netif_carrier_ok(). No carrier means no
completion is possible, so skipping the check is safe; the
watchdog still ticks so it picks up immediately once carrier
comes up.
2. netdev_warn_once() limits visibility to one event per netdev
lifetime, which is fine for a warn-once defensive log but defeats
any operator accounting of real stall events on long-running
nodes. Switch to pr_warn_ratelimited() with an explicit
netdev_name() prefix: bounded log noise, the events stay visible
in the journal for accounting, and it avoids
netdev_warn_ratelimited() which is not available in this tree.
This is the rpi-6.18.y portion of the v2 follow-up to the netdev RFC
submission; the mainline v2 is on lore:
https://lore.kernel.org/netdev/cover.1777064117.git.lukasz@raczylo.com/T/
Co-authored-by: John Laur <johnlaur@gmail.com>
Signed-off-by: Lukasz Raczylo <lukasz@raczylo.com>1 parent 2c929ca commit ba4b202
1 file changed
Lines changed: 15 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2075 | 2075 | | |
2076 | 2076 | | |
2077 | 2077 | | |
| 2078 | + | |
| 2079 | + | |
| 2080 | + | |
| 2081 | + | |
| 2082 | + | |
| 2083 | + | |
| 2084 | + | |
| 2085 | + | |
| 2086 | + | |
| 2087 | + | |
2078 | 2088 | | |
2079 | 2089 | | |
2080 | 2090 | | |
| |||
2084 | 2094 | | |
2085 | 2095 | | |
2086 | 2096 | | |
2087 | | - | |
2088 | | - | |
2089 | | - | |
2090 | | - | |
| 2097 | + | |
| 2098 | + | |
| 2099 | + | |
| 2100 | + | |
2091 | 2101 | | |
2092 | 2102 | | |
2093 | 2103 | | |
| 2104 | + | |
2094 | 2105 | | |
2095 | 2106 | | |
2096 | 2107 | | |
| |||
0 commit comments