Skip to content

[YANG]: Add Yang model support for Multi ASIC port and device_metadata#18444

Merged
qiluo-msft merged 18 commits intosonic-net:masterfrom
xincunli-sonic:xincun/add-voq-yang
Apr 10, 2024
Merged

[YANG]: Add Yang model support for Multi ASIC port and device_metadata#18444
qiluo-msft merged 18 commits intosonic-net:masterfrom
xincunli-sonic:xincun/add-voq-yang

Conversation

@xincunli-sonic
Copy link
Copy Markdown
Contributor

@xincunli-sonic xincunli-sonic commented Mar 22, 2024

Why I did it

In Multi ASIC scenario,

  1. PORT configuration table requires coreId, corePortId and numVoq:
{
    "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"
        }
    }
}
  1. DEVICE_METADATA configuration table requires 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
  • 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.

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)

@xincunli-sonic xincunli-sonic requested a review from arlakshm March 29, 2024 23:55
Copy link
Copy Markdown
Contributor

@arlakshm arlakshm left a comment

Choose a reason for hiding this comment

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

as comments

Copy link
Copy Markdown
Contributor

@arlakshm arlakshm left a comment

Choose a reason for hiding this comment

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

lgtm

@arlakshm arlakshm added the Chassis for 202205 branch PRs needed for 202205 branch in msft repo label Apr 9, 2024
@qiluo-msft qiluo-msft merged commit bb71ecf into sonic-net:master Apr 10, 2024
@xincunli-sonic
Copy link
Copy Markdown
Contributor Author

@gechiang would you mind backport to Chassis 202205 branch.

@gechiang
Copy link
Copy Markdown
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.
Thanks!

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Chassis for 202205 branch PRs needed for 202205 branch in msft repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants