Skip to content

Add Support for Arista CMIS Enhanced LPO Debug Registers#688

Open
mzwang-arista wants to merge 1 commit into
sonic-net:masterfrom
mzwang-arista:master
Open

Add Support for Arista CMIS Enhanced LPO Debug Registers#688
mzwang-arista wants to merge 1 commit into
sonic-net:masterfrom
mzwang-arista:master

Conversation

@mzwang-arista

Copy link
Copy Markdown

Add Support for Arista CMIS Enhanced LPO Debug Registers

Description

This PR adds a eeprom map and implements a child of CmisAPI - CmisEnhancedLpoApi.

The following fields are read from the transceiver and populated into Redis:

  1. TRANSCEIVER_INFO|EthernetX

    • LPOTxPolarityInverted
    • LPORxPolarityInverted
    • LPOTxHostInputVMAMonAccuracySupported
    • LPORxInputOMAMonAccuracySupported
    • LPOTxOuterExtinctionRatioMax
  2. TRANSCEIVER_DOM_SENSOR|EthernetX

    • LPOHostInputVMATx[1-8]
    • LPOInputOMARx[1-8]
  3. TRANSCEIVER_DOM_THRESHOLD|EthernetX

    • LPOTxHostInputVMAHighAlarmThreshold
    • LPOTxHostInputVMALowAlarmThreshold
    • LPOTxHostInputVMAHighWarningThreshold
    • LPOTxHostInputVMALowWarningThreshold
    • LPORxInputOMAHighAlarmThreshold
    • LPORxInputOMALowAlarmThreshold
    • LPORxInputOMAHighWarningThreshold
    • LPORxInputOMALowWarningThreshold
  4. TRANSCEIVER_DOM_FLAG|EthernetX
    TRANSCEIVER_DOM_FLAG_SET_TIME|EthernetX
    TRANSCEIVER_DOM_FLAG_CLEAR_TIME|EthernetX
    TRANSCEIVER_DOM_FLAG_CHANGE_COUNT|EthernetX

    • LPOTxHostInputVMAHighAlarmFlag
    • LPOTxHostInputVMALowAlarmFlag
    • LPOTxHostInputVMAHighWarningFlag
    • LPOTxHostInputVMALowWarningFlag
    • LPORxInputOMAHighAlarmFlag
    • LPORxInputOMALowAlarmFlag
    • LPORxInputOMAHighWarningFlag
    • LPORxInputOMALowWarningFlag

Please see HLD for more details (https://github.com/sonic-net/SONiC/blob/master/doc/cmis-lpo-enhancement/cmis-lpo-enhancement.md)

Motivation and Context

The additional enhanced LPO registers provided additional debug information for LPO modules

How Has This Been Tested?

  1. A unit test is added. At a high level, the following are tested
  • get_transceiver_info
  • get_transceiver_dom_real_value
  • get_transceiver_threshold_info
  • get_transceiver_dom_flags
  • Memory map field offsets and sizes
  • XcvrApiFactory dispatch to CmisEnhancedLpoApi
  1. Tested in the lab with Arista LPO-800G-2DR4. Verified all fields are populated correctly

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@mzwang-arista mzwang-arista marked this pull request as ready for review June 8, 2026 17:35
@mssonicbld

Copy link
Copy Markdown
Collaborator

Hi, there are workflow run(s) waiting for approval, you may be first-time contributor. I will notify maintainers to help approve once PR is approved. Thanks!

---Powered by SONiC BuildBot

Comment thread sonic_platform_base/sonic_xcvr/api/arista/cmis_enhanced_lpo.py Outdated
Comment thread sonic_platform_base/sonic_xcvr/api/arista/cmis_enhanced_lpo.py Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends sonic-platform-common’s CMIS transceiver support to handle Arista “Enhanced LPO” debug registers by introducing a dedicated EEPROM memory map and a CmisApi subclass, and wiring factory dispatch so supported modules automatically use the new API. This enables additional LPO debug/telemetry fields to be surfaced via the existing transceiver API surface (and ultimately consumed by higher layers that populate Redis/state DB).

Changes:

  • Added CmisEnhancedLpoMemMap defining Enhanced LPO pages/registers (01h, C1h, C2h) and new Arista LPO field constants.
  • Added CmisEnhancedLpoApi to read/scale Enhanced LPO VMA/OMA values, thresholds, and flags into the returned dictionaries.
  • Updated XcvrApiFactory + packaging (setup.py) and added unit tests covering API behavior, mem-map offsets/sizes, and factory dispatch.

Reviewed changes

Copilot reviewed 6 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/sonic_xcvr/test_cmis_enhanced_lpo.py New pytest coverage for Enhanced LPO API behaviors, mem-map offsets/sizes, and factory dispatch.
sonic_platform_base/sonic_xcvr/xcvr_api_factory.py Adds Arista Enhanced LPO vendor PN dispatch to CmisEnhancedLpoApi + CmisEnhancedLpoMemMap.
sonic_platform_base/sonic_xcvr/mem_maps/arista/cmis_enhanced_lpo.py New EEPROM memory map for Enhanced LPO registers/pages.
sonic_platform_base/sonic_xcvr/fields/arista_lpo_consts.py New constants defining Enhanced LPO field/group names.
sonic_platform_base/sonic_xcvr/api/arista/cmis_enhanced_lpo.py New API subclass implementing reads/scaling/unpacking for Enhanced LPO values/thresholds/flags.
setup.py Adds Arista xcvr API + mem-map packages to the distribution.

Comment thread sonic_platform_base/sonic_xcvr/api/arista/cmis_enhanced_lpo.py Outdated
Comment thread sonic_platform_base/sonic_xcvr/api/arista/cmis_enhanced_lpo.py Outdated
Comment thread sonic_platform_base/sonic_xcvr/api/arista/cmis_enhanced_lpo.py Outdated
Comment thread sonic_platform_base/sonic_xcvr/api/arista/cmis_enhanced_lpo.py Outdated
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@mzwang-arista mzwang-arista marked this pull request as draft July 6, 2026 18:01
Signed-off-by: Michael Wang <mzwang@arista.com>
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@mzwang-arista mzwang-arista marked this pull request as ready for review July 6, 2026 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants