Implement get_transceiver_dom_flags for SFF-8636 modules - #730
Implement get_transceiver_dom_flags for SFF-8636 modules#730lotus-nexthop wants to merge 3 commits into
Conversation
|
/azp run |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
a5ac335 to
3c35d77
Compare
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
3c35d77 to
ef8cc05
Compare
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
@lotus-nexthop why are these fields still showing NA? Don't we need to fix? Temperature High TH Low TH Crit High TH Crit Low TH |
There was a problem hiding this comment.
Pull request overview
This PR extends the sonic_platform_base transceiver abstraction by implementing get_transceiver_dom_flags() for SFF-8636 (QSFP28) modules, aligning its returned flag schema with the existing CMIS implementation so higher-level consumers can uniformly populate TRANSCEIVER_DOM_FLAG.
Changes:
- Implement
Sff8636Api.get_transceiver_dom_flags()by reading and decoding the latched interrupt flag bytes for temperature and Vcc. - Add new EEPROM field definitions (
TempFlags,VccFlags) to the SFF-8636 public memory map and constants. - Add pytest coverage for the new DOM-flag decoding behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/sonic_xcvr/test_sff8636.py | Adds unit tests validating SFF-8636 DOM flag decoding and EEPROM read behavior. |
| sonic_platform_base/sonic_xcvr/mem_maps/public/sff8636.py | Adds whole-byte fields for the latched temp/Vcc flag bytes to avoid per-bit clearing reads. |
| sonic_platform_base/sonic_xcvr/fields/consts.py | Introduces new field-name constants used by the SFF-8636 mem map and API. |
| sonic_platform_base/sonic_xcvr/api/public/sff8636.py | Implements DOM flag retrieval/decoding for SFF-8636 modules using the CMIS-compatible key schema. |
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
thanks @prgeor, I updated the PR to now gate behind whether the module supports temperature monitoring before reporting the temperature flags, same for the Vcc flags. Previously I tested on passive DAC, hence the N/A. Please take a look at the updated PR descripton with testing on SFF-8636 optics which support reading temperature. |
Signed-off-by: lotus-nexthop <lotus@nexthop.ai> Signed-off-by: Lotus Fenn <lotus@nexthop.ai>
Signed-off-by: Lotus Fenn <lotus@nexthop.ai>
Signed-off-by: Lotus Fenn <lotus@nexthop.ai>
4c24f55 to
9ffaa52
Compare
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Description
Implement
get_transceiver_dom_flags()onSff8636Api, reading the latched free side monitor interrupt flags (SFF-8636 Rev 2.12 Table 6-6, lower page 00h byte 6 = temperature, byte 7 = supply voltage, bits 7–4). The returned dict uses the same key schema as the CMIS implementation.Gate temperature flags behind temperature monitoring support.
Gate Vcc flags behind voltage monitoring support.
Fixes sonic-net/sonic-buildimage#28779
Motivation and Context
show platform temperaturereportsWarning=N/Afor every xSFP row backed by a non-CMIS (SFF-8636/QSFP28) module.get_transceiver_dom_flags()was only ever implemented for CMIS/eLSFP; for SFF-8636 the base class raisesNotImplementedError, so xcvrd silently skips writingTRANSCEIVER_DOM_FLAGfor those ports. This gap was latent until two upstream changes merged 2026-05-13 moved the Warning column's source onto that table:TEMPERATURE_INFO(perf fix). thermalctld had computedwarning_statusleniently — missing data defaulted toFalse.TRANSCEIVER_DOM_FLAGand renderingN/Awhen absent.Spec here:

https://members.snia.org/document/dl/26418
How Has This Been Tested?
Valiated on the following optical 8636 modules:
Ethernet0(module 1) supports temperature and voltage monitoringEthernet64(module 17) does not support temperature and does not support voltage monitoring.Before fix
After fix
Additional Information (Optional)