Skip to content

Support for Custom Amphenol 800G Backplane catridge#555

Merged
prgeor merged 5 commits intosonic-net:masterfrom
prgeor:amph-bp
Apr 4, 2025
Merged

Support for Custom Amphenol 800G Backplane catridge#555
prgeor merged 5 commits intosonic-net:masterfrom
prgeor:amph-bp

Conversation

@prgeor
Copy link
Copy Markdown
Collaborator

@prgeor prgeor commented Mar 30, 2025

Description

Added support for reading custom EEPROM of Amphenol 800G Backplane catridge

Motivation and Context

For custom application this catridge eeprom information parsing is required

How Has This Been Tested?

Tested on custom switch

Additional Information (Optional)

@prgeor prgeor requested a review from mihirpat1 March 30, 2025 06:08
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

vendor_name = self._get_vendor_name()
vendor_pn = self._get_vendor_part_num()

# Mapping of IDs to their corresponding configurations
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

fix comment

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Copy Markdown
Contributor

@mihirpat1 mihirpat1 left a comment

Choose a reason for hiding this comment

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

@prgeor Can you please attach the output of show int transceiver eeprom EthernerXX for both CMIS and Custom Amphenol 800G Backplane catridge cables?

@mihirpat1 mihirpat1 requested a review from Copilot March 31, 2025 15:17
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 adds support for reading custom EEPROM information from the Amphenol 800G Backplane cartridge by integrating new API, memory map, and code definitions along with associated test cases.

  • Added new test cases for the AmphBackplaneImpl API
  • Introduced AmphBackplaneMemMap, AmphBackplaneCodes, and AmphBackplaneImpl to handle backplane-specific behavior
  • Updated the xcvr_api_factory and modified the public memmap and codes for consistency with the new backplane support

Reviewed Changes

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

Show a summary per file
File Description
tests/sonic_xcvr/test_xcvr_api_factory.py Added tests for validating the new backplane API implementation
sonic_platform_base/sonic_xcvr/xcvr_eeprom.py Minor code cleanup
sonic_platform_base/sonic_xcvr/xcvr_api_factory.py Updated factory mapping to include the new AmphBackplaneImpl API
sonic_platform_base/sonic_xcvr/mem_maps/public/cmis.py Introduced CmisFlatMemMap and adjusted CmisMemMap for clarity
sonic_platform_base/sonic_xcvr/mem_maps/amphenol/backplane.py Added a custom memory map for Amphenol backplane with a potential super() call issue
sonic_platform_base/sonic_xcvr/fields/consts.py Added a new constant for the cartridge slot ID (note potential misspelling)
sonic_platform_base/sonic_xcvr/codes/public/sff8024.py Updated code definitions to include a backplane cartridge entry
sonic_platform_base/sonic_xcvr/codes/amphenol/backplane.py Added new codes for the Amphenol backplane module
sonic_platform_base/sonic_xcvr/api/amphenol/backplane.py Provided a custom API implementation for the backplane, also with a potential super() call issue

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@prgeor
Copy link
Copy Markdown
Collaborator Author

prgeor commented Apr 2, 2025

@davidm-arista @bobbymcgonigle would you be able to review this PR please?

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@prgeor prgeor merged commit b536f2c into sonic-net:master Apr 4, 2025
5 checks passed
@r12f
Copy link
Copy Markdown

r12f commented Apr 7, 2025

hi @prgeor , do you mind to help create a manual PR to bring this to 202412?

@r12f
Copy link
Copy Markdown

r12f commented Apr 18, 2025

hi @prgeor , gently ping on this one :D

mssonicbld added a commit to mssonicbld/sonic-platform-common.msft that referenced this pull request Apr 23, 2025
<!-- Provide a general summary of your changes in the Title above -->

#### Description
<!--
     Describe your changes in detail
-->
Add missing Amphenol package to support changes merged via sonic-net/sonic-platform-common#555

#### 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 current changeset is to fix the below traceback seen while building SONiC image

```
<frozen importlib._bootstrap>:690: in _load_unlocked
    ???
/usr/lib/python3/dist-packages/_pytest/assertion/rewrite.py:168: in exec_module
    exec(co, module.__dict__)
tests/test_PsuChassisInfo.py:14: in <module>
    from .mock_platform import MockChassis, MockPsu, MockFanDrawer, MockModule
tests/mock_platform.py:1: in <module>
    from sonic_platform_base import chassis_base
/usr/local/lib/python3.11/dist-packages/sonic_platform_base/__init__.py:1: in <module>
    from . import chassis_base
/usr/local/lib/python3.11/dist-packages/sonic_platform_base/chassis_base.py:10: in <module>
    from . import sfp_base
/usr/local/lib/python3.11/dist-packages/sonic_platform_base/sfp_base.py:11: in <module>
    from .sonic_xcvr.xcvr_api_factory import XcvrApiFactory
/usr/local/lib/python3.11/dist-packages/sonic_platform_base/sonic_xcvr/xcvr_api_factory.py:22: in <module>
    from .api.amphenol.backplane import AmphBackplaneImpl
E   ModuleNotFoundError: No module named 'sonic_platform_base.sonic_xcvr.api.amphenol'

```

#### 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.
-->
Confirmed image build is successful and loaded image on DUT to confirm the fix to ensure that xcvrd is running without crashing.

#### Additional Information (Optional)
MSFT ADO - 32488018
r12f added a commit to Azure/sonic-platform-common.msft that referenced this pull request Apr 23, 2025
<!-- Provide a general summary of your changes in the Title above -->

#### Description
<!--
     Describe your changes in detail
-->
Add missing Amphenol package to support changes merged via sonic-net/sonic-platform-common#555

#### 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 current changeset is to fix the below traceback seen while building SONiC image

```
<frozen importlib._bootstrap>:690: in _load_unlocked
    ???
/usr/lib/python3/dist-packages/_pytest/assertion/rewrite.py:168: in exec_module
    exec(co, module.__dict__)
tests/test_PsuChassisInfo.py:14: in <module>
    from .mock_platform import MockChassis, MockPsu, MockFanDrawer, MockModule
tests/mock_platform.py:1: in <module>
    from sonic_platform_base import chassis_base
/usr/local/lib/python3.11/dist-packages/sonic_platform_base/__init__.py:1: in <module>
    from . import chassis_base
/usr/local/lib/python3.11/dist-packages/sonic_platform_base/chassis_base.py:10: in <module>
    from . import sfp_base
/usr/local/lib/python3.11/dist-packages/sonic_platform_base/sfp_base.py:11: in <module>
    from .sonic_xcvr.xcvr_api_factory import XcvrApiFactory
/usr/local/lib/python3.11/dist-packages/sonic_platform_base/sonic_xcvr/xcvr_api_factory.py:22: in <module>
    from .api.amphenol.backplane import AmphBackplaneImpl
E   ModuleNotFoundError: No module named 'sonic_platform_base.sonic_xcvr.api.amphenol'

```

#### 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.
-->
Confirmed image build is successful and loaded image on DUT to confirm the fix to ensure that xcvrd is running without crashing.

#### Additional Information (Optional)
MSFT ADO - 32488018
jianyuewu pushed a commit to jianyuewu/sonic-platform-common that referenced this pull request May 7, 2025
* Support for Custom Amphenol 800G Backplane catridge

* Address comment

* Fix xcvrd crash

* Fix the crash

* Improve code coverage
jianyuewu pushed a commit to jianyuewu/sonic-platform-common that referenced this pull request May 7, 2025
Support for Custom Amphenol 800G Backplane catridge (sonic-net#555)
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.

8 participants