Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[smart-switch] Extend config generator for t1-smartswitch topology. #19056

Merged

Conversation

oleksandrivantsiv
Copy link
Collaborator

Why I did it

The Smart Switch includes two types of devices (Switch and DPU) that require the sample configuration. Generate Smart Switch sample configurations for Switch or DPU based on the device type.

Work item tracking
  • Microsoft ADO (number only):

How I did it

Extend the sample config generator for t1-smartswitch topology.

How to verify it

Run sonic-cfggen UT.

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)

@oleksandrivantsiv
Copy link
Collaborator Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@oleksandrivantsiv oleksandrivantsiv marked this pull request as draft May 25, 2024 02:35
@oleksandrivantsiv
Copy link
Collaborator Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@oleksandrivantsiv oleksandrivantsiv marked this pull request as ready for review July 11, 2024 21:57
@oleksandrivantsiv
Copy link
Collaborator Author

@prabhataravind kindly reminder. Please review the PR

data['DEVICE_METADATA']['localhost']['hostname'] = 'sonic'
data['DEVICE_METADATA']['localhost']['switch_type'] = 'dpu'
data['DEVICE_METADATA']['localhost']['type'] = 'SonicDpu'
data['DEVICE_METADATA']['localhost']['subtype'] = 'SmartSwitcch'
Copy link
Contributor

Choose a reason for hiding this comment

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

typo? SmartSwitch

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good catch. Thanks!

@@ -14,25 +15,29 @@
except KeyError:
pass

DPUS_TABLE = 'DPUS'
DPU_TABLE = 'DPU'
Copy link
Contributor

@prabhataravind prabhataravind Jul 15, 2024

Choose a reason for hiding this comment

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

Why do we have these both -- DPU_TABLE and DPUS_TABLE?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

DPUS indicates that the image is running on the switch.
DPU indicates that the image is running on the DPU.
https://github.com/sonic-net/SONiC/blob/master/doc/smart-switch/ip-address-assigment/smart-switch-ip-address-assignment.md#device-data-and-platform

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Based on the type of device we can generate different configurations for switch and DPU for the same topology

"hostname": "sonic",
"switch_type": "dpu",
"type": "SonicDpu",
"subtype": "SmartSwitcch",
Copy link
Contributor

Choose a reason for hiding this comment

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

typo here?

@oleksandrivantsiv
Copy link
Collaborator Author

@prabhataravind, @prsunny who can help to resolve ms-conflict?

@oleksandrivantsiv
Copy link
Collaborator Author

/azpw ms_conflict

@prabhataravind
Copy link
Contributor

@prabhataravind, @prsunny who can help to resolve ms-conflict?

@prsunny could you help here? This needs your approval as well.

@prabhataravind
Copy link
Contributor

/azpw ms_conflict

1 similar comment
@oleksandrivantsiv
Copy link
Collaborator Author

/azpw ms_conflict

@kperumalbfn kperumalbfn merged commit c4a7658 into sonic-net:master Jul 19, 2024
22 checks passed
arun1355492 pushed a commit to arun1355492/sonic-buildimage that referenced this pull request Jul 26, 2024
liushilongbuaa pushed a commit to liushilongbuaa/sonic-buildimage that referenced this pull request Aug 1, 2024
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.

6 participants