Implement get_transceiver_dom_flags for SFF-8636 modules - #730
Open
lotus-nexthop wants to merge 2 commits into
Open
Implement get_transceiver_dom_flags for SFF-8636 modules#730lotus-nexthop wants to merge 2 commits into
lotus-nexthop wants to merge 2 commits into
Conversation
Collaborator
|
/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). |
lotus-nexthop
marked this pull request as draft
August 1, 2026 00:07
Collaborator
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
lotus-nexthop
force-pushed
the
implement-get-transceiver-dom-flags-sff
branch
from
August 1, 2026 19:52
a5ac335 to
3c35d77
Compare
Collaborator
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Signed-off-by: lotus-nexthop <lotus@nexthop.ai> Signed-off-by: Lotus Fenn <lotus@nexthop.ai>
Signed-off-by: Lotus Fenn <lotus@nexthop.ai>
lotus-nexthop
force-pushed
the
implement-get-transceiver-dom-flags-sff
branch
from
August 1, 2026 19:57
3c35d77 to
ef8cc05
Compare
Collaborator
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
lotus-nexthop
marked this pull request as ready for review
August 1, 2026 20:10
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Collaborator
|
@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 |
Contributor
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. |
Comment on lines
+309
to
+311
| # The flag latches clear on read: each byte must be read exactly | ||
| # once per call, in a single whole-byte access. | ||
| assert self.api.xcvr_eeprom.read.call_count == 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.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.How Has This Been Tested?
Validated live on hardware
Before fix
$ show platform temperature Sensor Temperature High TH Low TH Crit High TH Crit Low TH Warning Timestamp ---------------------------- ------------- --------- -------- -------------- ------------- --------- ----------------- ... xSFP module 35 Temp 0 N/A N/A N/A N/A N/A 20260731 23:38:42 xSFP module 36 Temp 0 N/A N/A N/A N/A N/A 20260731 23:38:42 xSFP module 37 Temp 0 N/A N/A N/A N/A N/A 20260731 23:38:42 xSFP module 38 Temp 0 N/A N/A N/A N/A N/A 20260731 23:38:42After fix
$ show platform temperature Sensor Temperature High TH Low TH Crit High TH Crit Low TH Warning Timestamp ---------------------------- ------------- --------- -------- -------------- ------------- --------- ----------------- ... xSFP module 36 Temp 0 N/A N/A N/A N/A False 20260801 00:46:25 xSFP module 37 Temp 0 N/A N/A N/A N/A False 20260801 00:46:25 xSFP module 38 Temp 0 N/A N/A N/A N/A False 20260801 00:46:25Additional Information (Optional)