Add Support for Arista CMIS Enhanced LPO Debug Registers#688
Add Support for Arista CMIS Enhanced LPO Debug Registers#688mzwang-arista wants to merge 1 commit into
Conversation
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
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
|
There was a problem hiding this comment.
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
CmisEnhancedLpoMemMapdefining Enhanced LPO pages/registers (01h, C1h, C2h) and new Arista LPO field constants. - Added
CmisEnhancedLpoApito 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. |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: Michael Wang <mzwang@arista.com>
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
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:
TRANSCEIVER_INFO|EthernetX
TRANSCEIVER_DOM_SENSOR|EthernetX
TRANSCEIVER_DOM_THRESHOLD|EthernetX
TRANSCEIVER_DOM_FLAG|EthernetX
TRANSCEIVER_DOM_FLAG_SET_TIME|EthernetX
TRANSCEIVER_DOM_FLAG_CLEAR_TIME|EthernetX
TRANSCEIVER_DOM_FLAG_CHANGE_COUNT|EthernetX
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?