BCM module diagnostics replace timestamp probes: bringup forces EEE off and runs ECD (re-run on every reset, re-baselining past its blip), 1 Hz SNR margin + corrected counters on panel and console; X520 bench divergences bypassed and tracked in open-questions

This commit is contained in:
flamingcow
2026-08-13 07:10:39 -07:00
parent a00f2216b7
commit 979dc7a772
18 changed files with 1240 additions and 416 deletions
+30 -8
View File
@@ -567,18 +567,40 @@ func checkCoalesce(fd int, ifname string, rxUsecs, txUsecs uint32) checkResult {
return fmt.Sprintf("adaptive rx=%d tx=%d rx-usecs=%d tx-usecs=%d",
e.useAdaptiveRxCoalesce, e.useAdaptiveTxCoalesce, e.rxCoalesceUsecs, e.txCoalesceUsecs)
}
if ec.useAdaptiveRxCoalesce == 0 && ec.useAdaptiveTxCoalesce == 0 &&
ec.rxCoalesceUsecs == rxUsecs && ec.txCoalesceUsecs == txUsecs {
settled := func(e ethtoolCoalesce, tx uint32) bool {
return e.useAdaptiveRxCoalesce == 0 && e.useAdaptiveTxCoalesce == 0 &&
e.rxCoalesceUsecs == rxUsecs && e.txCoalesceUsecs == tx
}
if settled(ec, txUsecs) {
res.state = desc(ec)
return res
}
was := desc(ec)
ec.cmd = unix.ETHTOOL_SCOALESCE
ec.useAdaptiveRxCoalesce = 0
ec.useAdaptiveTxCoalesce = 0
ec.rxCoalesceUsecs = rxUsecs
ec.txCoalesceUsecs = txUsecs
if err := ethtoolCall(fd, ifname, unsafe.Pointer(&ec)); err != nil {
set := func(tx uint32) error {
s := ec
s.cmd = unix.ETHTOOL_SCOALESCE
s.useAdaptiveRxCoalesce = 0
s.useAdaptiveTxCoalesce = 0
s.rxCoalesceUsecs = rxUsecs
s.txCoalesceUsecs = tx
return ethtoolCall(fd, ifname, unsafe.Pointer(&s))
}
err = set(txUsecs)
// A driver running mixed rx/tx vectors has one moderation value per
// vector and rejects a tx-specific one: rx-usecs covers both, and get
// reports the tx side as zero.
if err == unix.EINVAL {
if settled(ec, 0) {
res.state = desc(ec) + " (tx shares rx)"
return res
}
if err = set(0); err == nil {
res.fixed = true
res.state = fmt.Sprintf("was %s, now adaptive off rx-usecs=%d shared with tx", was, rxUsecs)
return res
}
}
if err != nil {
res.err = err
res.state = "could not set"
return res