Skip to content

[code sync] Merge code from sonic-net/sonic-platform-common:202505 to 202506#104

Merged
mssonicbld merged 3 commits intoAzure:202506from
mssonicbld:sonicbld/202506-merge
Aug 9, 2025
Merged

[code sync] Merge code from sonic-net/sonic-platform-common:202505 to 202506#104
mssonicbld merged 3 commits intoAzure:202506from
mssonicbld:sonicbld/202506-merge

Conversation

@mssonicbld
Copy link
Collaborator

* 381432b - (origin/202505) [CMIS] Moving flat memory register handling from CmisMemMap to CmisFlatMemMap (#592) (2025-08-09) [mssonicbld]
* 3e6a8ba - [CMIS] Remove application-dependent fields from get_transceiver_info (#593) (2025-08-09) [mssonicbld]<br>```

mssonicbld and others added 3 commits August 9, 2025 09:23
…(#593)

<!-- Provide a general summary of your changes in the Title above -->

#### Description
<!--
 Describe your changes in detail
-->
This PR updates the `get_transceiver_info()` API in the CMIS module to remove fields from the returned `XCVR_INFO` dictionary that are dependent on the active application ID. These fields include:
- host_electrical_interface
- media_interface_code
- host_lane_assignment_option
- media_lane_assignment_option

#### Motivation and Context
<!--
 Why is this change required? What problem does it solve?
 If this pull request closes/resolves an open Issue, make sure you
 include the text "fixes #xxxx", "closes #xxxx" or "resolves #xxxx" here
-->
These fields are only meaningful when the active application ID is explicitly shown. Including them without context can lead to confusion or misinterpretation of transceiver capabilities. This change ensures the API response reflects only valid and context-aware data.

#### How Has This Been Tested?
<!--
 Please describe in detail how you tested your changes.
 Include details of your testing environment, and the tests you ran to
 see how your change affects other areas of the code, etc.
-->
Please refer to the test section of sonic-net/sonic-utilities#4020

#### Additional Information (Optional)
MSFT ADO - 34325583
…atMemMap (#592)

<!-- Provide a general summary of your changes in the Title above -->

#### Description
<!--
 Describe your changes in detail
-->
On the custom backplane cartridge cable, following error is periodically seen in syslog as part of DOM monitoring.
```
2025 Aug 7 16:26:43.826059 dut WARNING pmon#DomInfoUpdateTask[34]: Got exception KeyError('ModuleFlagByte1') while processing dom flags for port Ethernet464, ignored
```

#### Motivation and Context
<!--
 Why is this change required? What problem does it solve?
 If this pull request closes/resolves an open Issue, make sure you
 include the text "fixes #xxxx", "closes #xxxx" or "resolves #xxxx" here
-->
The traceback is seen since some registers which are on page 0 are still defined in `CmisMemMap` instead of `CmisFlatMemMap`. This causes the KeyError to be seen since the backplane cartridge has a memory map as an instance of `CmisFlatMemMap`.
(https://github.com/sonic-net/sonic-platform-common/blob/af47c73007206a9e3c7b37680ec69dfb59877d30/sonic_platform_base/sonic_xcvr/mem_maps/amphenol/backplane.py#L13)
Hence, moving all registers which access page 0 to `CmisFlatMemMap` class.

#### How Has This Been Tested?
<!--
 Please describe in detail how you tested your changes.
 Include details of your testing environment, and the tests you ran to
 see how your change affects other areas of the code, etc.
-->
Verified that the error is not seen in syslog anymore.

#### Additional Information (Optional)
MSFT ADO - 34346395
@mssonicbld mssonicbld merged commit 444daf5 into Azure:202506 Aug 9, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant