[YANG]: Add Yang model support for Multi ASIC port and device_metadata#18444
Merged
qiluo-msft merged 18 commits intosonic-net:masterfrom Apr 10, 2024
Merged
[YANG]: Add Yang model support for Multi ASIC port and device_metadata#18444qiluo-msft merged 18 commits intosonic-net:masterfrom
qiluo-msft merged 18 commits intosonic-net:masterfrom
Conversation
arlakshm
reviewed
Apr 2, 2024
qiluo-msft
reviewed
Apr 4, 2024
qiluo-msft
reviewed
Apr 4, 2024
Contributor
Author
|
@gechiang would you mind backport to Chassis 202205 branch. |
Collaborator
|
@xincunli-sonic this PR failed to be able to cleanly picked into the msft repo. Please raise a PR directly under the msft repo 202205 branch for this change and tag me for review. |
11 tasks
mlok-nokia
pushed a commit
to mlok-nokia/sonic-buildimage
that referenced
this pull request
Jun 5, 2024
sonic-net#18444) ### Why I did it In Multi ASIC scenario, 1. PORT configuration table requires `coreId`, `corePortId` and `numVoq`: ```json { "PORT": { "Ethernet0": { "index": "0", "lanes": "101,102", "description": "fortyGigE1/1/1", "mtu": "9100", "alias": "fortyGigE1/1/1", "speed": "40000", "link_training": "off", "laser_freq": "191300", "tx_power": "-27.3", "dom_polling": "enabled", "coreId": "1", "corePortId": "1", "numVoq": "8" }, "Ethernet1": { "index": "1", "lanes": "103,104", "description": "fortyGigE1/1/2", "mtu": "9100", "alias": "fortyGigE1/1/2", "admin_status": "up", "speed": "40000", "link_training": "on", "laser_freq": "191300", "tx_power": "-27.3", "dom_polling": "enabled", "coreId": "0", "corePortId": "14", "numVoq": "8" }, "Ethernet63": { "index": "63", "lanes": "87,88", "description": "fortyGigE1/4/16", "mtu": "9100", "alias": "fortyGigE1/4/16", "speed": "40000", "laser_freq": "191300", "tx_power": "-27.3", "dom_polling": "disabled", "coreId": "0", "corePortId": "15", "numVoq": "8" } } } ``` 2. DEVICE_METADATA configuration table requires `asic_id`: ```json { "DEVICE_METADATA": { "localhost": { "asic_id": "06:00.0", "asic_name": "asic0", "hwsku": "Force10-S6100", "default_bgp_status": "up", "docker_routing_config_mode": "unified", "hostname": "sonic-s6100-01", "platform": "x86_64-dell_s6100_c2538-r0", "mac": "4c:76:25:f4:70:82", "default_pfcwd_status": "disable", "bgp_asn": "65100", "deployment_id": "1", "type": "ToRRouter", "bgp_adv_lo_prefix_as_128" : "true", "buffer_model": "traditional", "yang_config_validation": "disable", "rack_mgmt_map": "dummy_value", "timezome": "Europe/Kiev" } } } ``` ##### Work item tracking - Microsoft ADO **(number only)**: 27252814, 27253157 #### How I did it 1. Added `coreId`, `corePortId` and `numVoq` field to CONFIG_DB PORT table. 2. Added `asic_id` and `asic_name` field to CONFIG_DB DEVICE_METADATA table.
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.
Why I did it
In Multi ASIC scenario,
coreId,corePortIdandnumVoq:{ "PORT": { "Ethernet0": { "index": "0", "lanes": "101,102", "description": "fortyGigE1/1/1", "mtu": "9100", "alias": "fortyGigE1/1/1", "speed": "40000", "link_training": "off", "laser_freq": "191300", "tx_power": "-27.3", "dom_polling": "enabled", "coreId": "1", "corePortId": "1", "numVoq": "8" }, "Ethernet1": { "index": "1", "lanes": "103,104", "description": "fortyGigE1/1/2", "mtu": "9100", "alias": "fortyGigE1/1/2", "admin_status": "up", "speed": "40000", "link_training": "on", "laser_freq": "191300", "tx_power": "-27.3", "dom_polling": "enabled", "coreId": "0", "corePortId": "14", "numVoq": "8" }, "Ethernet63": { "index": "63", "lanes": "87,88", "description": "fortyGigE1/4/16", "mtu": "9100", "alias": "fortyGigE1/4/16", "speed": "40000", "laser_freq": "191300", "tx_power": "-27.3", "dom_polling": "disabled", "coreId": "0", "corePortId": "15", "numVoq": "8" } } }asic_id:{ "DEVICE_METADATA": { "localhost": { "asic_id": "06:00.0", "asic_name": "asic0", "hwsku": "Force10-S6100", "default_bgp_status": "up", "docker_routing_config_mode": "unified", "hostname": "sonic-s6100-01", "platform": "x86_64-dell_s6100_c2538-r0", "mac": "4c:76:25:f4:70:82", "default_pfcwd_status": "disable", "bgp_asn": "65100", "deployment_id": "1", "type": "ToRRouter", "bgp_adv_lo_prefix_as_128" : "true", "buffer_model": "traditional", "yang_config_validation": "disable", "rack_mgmt_map": "dummy_value", "timezome": "Europe/Kiev" } } }Work item tracking
How I did it
coreId,corePortIdandnumVoqfield to CONFIG_DB PORT table.asic_idandasic_namefield to CONFIG_DB DEVICE_METADATA table.How to verify it
Which release branch to backport (provide reason below if selected)
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)