Skip to content

[Mellanox][Smartswitch] Platform API for Smartswtich#20944

Merged
kperumalbfn merged 14 commits intosonic-net:masterfrom
gpunathilell:pl_api_202411
Dec 5, 2024
Merged

[Mellanox][Smartswitch] Platform API for Smartswtich#20944
kperumalbfn merged 14 commits intosonic-net:masterfrom
gpunathilell:pl_api_202411

Conversation

@gpunathilell
Copy link
Contributor

@gpunathilell gpunathilell commented Nov 27, 2024

Should be merged after #20943

Why I did it

Introduction of SmartSwitchChassis, DpuModule classes for APIs required for Smartswitch PMON

  • module.py - Introduction of DpuModule for representing each DPU as a module
  • platform.py - Initialize SmartSwitchChassis based on number of DPUs on platform
  • chassis.py - Introduction of SmartSwitchChassis for representing each the smartswitch as a modular chassis with DPUS present
Work item tracking
  • Microsoft ADO (number only):

How I did it

How to verify it

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

Returns:
An integer, the number of modules available on this chassis
"""
return DeviceDataManager.get_dpu_count()
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems to be returning only DPUs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, only the DPUs are represented as modules, the switch itself is not a module

@gpunathilell
Copy link
Contributor Author

Dependent on for mellanox build to pass #20943

Copy link
Contributor

@vvolam vvolam left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@vvolam
Copy link
Contributor

vvolam commented Dec 3, 2024

@gpunathilell Please check the build errors.

@oleksandrivantsiv
Copy link
Collaborator

/azpw run

@oleksandrivantsiv
Copy link
Collaborator

/azpw run Azure.sonic-buildimage

@oleksandrivantsiv
Copy link
Collaborator

/azpw run

@gpunathilell
Copy link
Contributor Author

/azpw run Azure.sonic-buildimage

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@oleksandrivantsiv
Copy link
Collaborator

@kperumalbfn can we merge this?

logger.log_error(f"Failed to check midplane reachability for {self.get_name()}! {e}")
return False

def get_midplane_interface(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

@gpunathilell Do we have any new sonic-mgmt tests?

Copy link
Collaborator

Choose a reason for hiding this comment

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

This is vendor API implementation for Smart Switch PMON: https://github.com/sonic-net/SONiC/blob/master/doc/smart-switch/pmon/smartswitch-pmon.md
The test for the feature will be contributed by Cisco, who is working on the feature implementation.

Copy link
Contributor

Choose a reason for hiding this comment

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

@kperumalbfn kperumalbfn merged commit c57f727 into sonic-net:master Dec 5, 2024
VladimirKuk pushed a commit to Marvell-switching/sonic-buildimage that referenced this pull request Jan 21, 2025
[Mellanox][Smartswitch] Platform API for Smartswtich
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants