Cable verdict folded into one console cell (length green, fault name red, xover amber, fail; diag rule lines and counters-reset line gone), reset fires at the press not diag completion, and the measure's blip is suppressed at every counter source instead of counted-hidden-reverted: worker error adds, loss-window write-offs (quiet slides state without charging; leaving the quiet era presumes in-window holes delivered so the gap's tail is never charged late), NIC poller tracks raw without accumulating, socket drops discarded, modules un-primed by the measure itself; display hold deleted so pre-existing errors no longer blink out during a measure
This commit is contained in:
@@ -110,13 +110,14 @@ func fillBack(frames, bytes []uint64) {
|
||||
}
|
||||
|
||||
type rxWorker struct {
|
||||
fd int
|
||||
batch int
|
||||
stream uint16
|
||||
spec *frameSpec
|
||||
stats *rxStats
|
||||
loss *lossWindow
|
||||
ready *sync.WaitGroup
|
||||
fd int
|
||||
batch int
|
||||
stream uint16
|
||||
spec *frameSpec
|
||||
stats *rxStats
|
||||
loss *lossWindow
|
||||
measuring *atomic.Bool
|
||||
ready *sync.WaitGroup
|
||||
}
|
||||
|
||||
func (w *rxWorker) run(done *atomic.Bool) {
|
||||
@@ -132,9 +133,12 @@ func (w *rxWorker) run(done *atomic.Bool) {
|
||||
w.ready.Done()
|
||||
|
||||
for !done.Load() {
|
||||
// One flag load covers the batch: failures seen while a cable measure
|
||||
// runs are its own link blip and are never counted.
|
||||
quiet := w.measuring.Load()
|
||||
n, err := recvmmsg(w.fd, hdrs, unix.MSG_WAITFORONE)
|
||||
if n <= 0 {
|
||||
if err != nil && err != unix.EAGAIN && err != unix.EINTR {
|
||||
if err != nil && err != unix.EAGAIN && err != unix.EINTR && !quiet {
|
||||
w.stats.rxErrs.Add(1)
|
||||
}
|
||||
continue
|
||||
@@ -145,6 +149,9 @@ func (w *rxWorker) run(done *atomic.Bool) {
|
||||
buf := bufs[i][:int(hdrs[i].len)]
|
||||
p, st := parseHeader(buf)
|
||||
if st != hdrOK {
|
||||
if quiet {
|
||||
continue
|
||||
}
|
||||
if st == hdrForeign {
|
||||
w.stats.badMagic.Add(1)
|
||||
} else {
|
||||
@@ -158,18 +165,22 @@ func (w *rxWorker) run(done *atomic.Bool) {
|
||||
// The ethertype this socket is bound to already says which stream the
|
||||
// frame belongs to, so a header naming another one is damaged, as is a
|
||||
// sequence number the sender never reached.
|
||||
if p.stream != w.stream || !w.loss.observe(p.seq) {
|
||||
w.stats.badHdr.Add(1)
|
||||
if p.stream != w.stream || !w.loss.observe(p.seq, quiet) {
|
||||
if !quiet {
|
||||
w.stats.badHdr.Add(1)
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
||||
want, ok := w.spec.expectedCRC(p.patIdx, p.payLen)
|
||||
if !ok {
|
||||
w.stats.badLen.Add(1)
|
||||
if !quiet {
|
||||
w.stats.badLen.Add(1)
|
||||
}
|
||||
continue
|
||||
}
|
||||
pay := buf[minFrame : minFrame+p.payLen]
|
||||
if crc32.Checksum(pay, crcTable) != want {
|
||||
if crc32.Checksum(pay, crcTable) != want && !quiet {
|
||||
w.stats.crcErr.Add(1)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user