Switch Cable Diagnostic with TDR Using SAI and PAI
Author: Chuan Chen, Broadcom Collection: 2023 Global Summit - Networking
Summary
Broadcom presents a Time-Domain Reflectometer (TDR) cable diagnostic capability implemented in SONiC using SAI and PAI (PHY Abstraction Interface). TDR works by sending a pulse into a copper cable and analyzing the reflected signal to determine cable faults (short circuit, open circuit, crosstalk) or cable length. The implementation introduces three new SAI port attributes for TDR: cable pair state, cable pair length, and cable type. The feature supports four types of copper PHY devices: built-in PHY on Broadcom switch ASICs (via SAI/switch SDK), legacy standalone copper PHY (via SAI/switch SDK), modern standalone copper PHY (via PAI/EPDM software), and AVAGO 1G copper SFP (via extended I2C registers, not covered by SAI or PAI).
The SONiC integration follows a multi-process flow: the CLI initiates a TDR test by writing to APPL_DB, the transceiver daemon (xcvrd) handles RJ45 copper SFP ports, while the orchestration agent routes commands to either syncd/SAI (for built-in or legacy PHY) or gbsyncd/PAI (for modern standalone gearbox PHY). Results are written to STATE_DB and retrieved via a separate CLI command. The TDR test is disruptive to traffic and provides per-pair status (OK, OPEN, SHORT, CROSSTALK, UNKNOWN, FAILURE) along with cable length in meters with plus/minus 10-meter accuracy.
Broadcom contributed the TDR cable diagnostics SAI pull request (PR #1816) to the OCP SAI GitHub repository, making the API available for any NPU vendor to support built-in PHYs and any PHY vendor to support standalone PHYs.
Sign in to read the full article.
Sign In