-
Notifications
You must be signed in to change notification settings - Fork 2
HW Verify Issue 50 Fiber Link Health
Item: Issue #50 (How to check health of the fiber link?). Board status: Needs HW Test · Track: Firmware · Priority: P1.
← back to Hardware Verification
Helper script:
software/scripts/hwtest/check_link_health.pyautomates the counter read/poll and doubles as thecheck_link_healthhelper this issue asks for.python check_link_health.py --host localhost --port 9099 --seconds 30 # while perturbing the fiber (Part 2), invert the verdict: python check_link_health.py --host localhost --port 9099 --expect-faultsInducing the actual fiber fault (Part 2) is still manual.
UIUC saw intermittent issues suspected to be a bad fiber connection, and asked which counters expose malformed/corrupted packets so a link-health check function can be built. This task is to (1) find and read the right counters on hardware, (2) confirm they respond to a real link fault, and (3) capture the recipe so it can be wrapped into a helper.
The deployed transport is Ethernet + RSSI (the PGP core is disabled by default), so the primary link-health source is the RSSI cores' counters, backed up by PGP counters if a PGP link is in use.
Under ColumnBoard[c].WarmTdmCore.ComCore (firmware/python/warm_tdm/_ComCore.py):
-
EthCore.SRP_RSSIandEthCore.Data_RSSI— the two RSSI connections (register access + data). Both default toenabled=Falseand are in theNoConfiggroup — you must enable them before their counters read valid. -
PgpCore.Pgp2bAxi[0]— PGP counters, butPgpCoreisenabled=Falseby default (only relevant if a PGP link is actually up).
Key RSSI counters (surf .../protocols/rssi/_RssiCore.py, all RO):
OpenConn, DropCnt (dropped segments), RetransmitCnt, ReconnectCnt,
ValidCnt, TxFrameRate/RxFrameRate, TxBandwidth/RxBandwidth, and FSM
states (ConnState, TxTspState, RxTspState, …).
Key PGP counters (surf .../protocols/pgp/_Pgp2bAxi.py, RO): link-ready booleans
RxPhyReady/TxPhyReady/RxRemLinkReady, and error counters
RxCellErrorCount, RxLinkDownCount, RxLinkErrorCount, RxFrameErrorCount,
RxRemOverflow*Count, TxFrameErrorCount, plus RxFrameCount/TxFrameCount.
-
Start the server against real hardware and connect (see Common bench setup).
-
Enable the RSSI cores and read the baseline counters:
cc = sess.group.ColumnBoard[0].WarmTdmCore.ComCore for rssi in (cc.EthCore.SRP_RSSI, cc.EthCore.Data_RSSI): rssi.enable.set(True) rssi.ReadDevice() print(rssi.path, "Open=", rssi.OpenConn.get(), "Conn=", rssi.ConnState.get(), "Drop=", rssi.DropCnt.get(), "Retx=", rssi.RetransmitCnt.get(), "Recon=", rssi.ReconnectCnt.get(), "RxRate=", rssi.RxFrameRate.get())
On a healthy link:
OpenConnTrue,ConnStateconnected,DropCnt/RetransmitCnt/ReconnectCntlow and not increasing, frame rates nonzero while data flows. -
Poll over ~30 s (or enable polling) with normal traffic and confirm the error counters stay flat. Record the baseline values.
-
Induce a real fault so you can confirm the counters actually register it. Use the gentlest that reproduces — e.g. briefly reseat/partially unseat the fiber, or introduce a lossy connection — while polling:
import time for _ in range(30): cc.EthCore.SRP_RSSI.ReadDevice() print(cc.EthCore.SRP_RSSI.DropCnt.get(), cc.EthCore.SRP_RSSI.RetransmitCnt.get(), cc.EthCore.SRP_RSSI.ReconnectCnt.get()) time.sleep(1)
-
Confirm
DropCnt/RetransmitCnt/ReconnectCnt(and/or PGPRx*ErrorCountif PGP is in use) increment during the fault and thatConnState/OpenConnreflect a drop+reconnect. This proves the counters are a usable health signal.
- Capture the exact set of variables that best indicate health (the delta of
DropCnt/RetransmitCnt/ReconnectCntover an interval, plusConnState) so it can be wrapped into acheck_link_health()-style helper. Note whether the RSSI counters or PGP counters were the live source on this bench.
- RSSI (and/or PGP) counters read cleanly on a healthy link, baseline recorded.
- A deliberately perturbed fiber makes the error/reconnect counters increment
and
ConnState/OpenConnreflect the fault. - A documented minimal set of variables + interpretation, ready to wrap into a link-health helper.
- Firmware build stamp + git hash, software commit, conda env:
- Which cores were live (RSSI vs. PGP):
- Baseline vs. during-fault counter values:
- Proposed health-check variable set:
- Issue #50 (request for malformed/corrupted-packet counters)
-
firmware/python/warm_tdm/_ComCore.py—EthCore(SRP_RSSI,Data_RSSI),PgpCore(Pgp2bAxi[0]) -
surf .../protocols/rssi/_RssiCore.py— RSSI counters -
surf .../protocols/pgp/_Pgp2bAxi.py— PGP counters - RTL:
PgpEthCore.vhd,EthCore.vhd,RingRouter.vhd(linkRxGood/linkTxGood)