From 3f36abf8d43382938ef049a966c072fe6eecd618 Mon Sep 17 00:00:00 2001 From: Xincun Li <147451452+xincunli-sonic@users.noreply.github.com> Date: Wed, 10 Apr 2024 13:29:55 -0700 Subject: [PATCH 1/2] [YANG]: Add Yang model support for Multi ASIC port and device_metadata (#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. --- src/sonic-yang-models/doc/Configuration.md | 17 +++++- .../tests/files/sample_config_db.json | 10 ++++ .../tests/device_metadata.json | 6 ++ .../tests/yang_model_tests/tests/port.json | 9 +++ .../tests_config/device_metadata.json | 28 +++++++++ .../yang_model_tests/tests_config/port.json | 60 +++++++++++++++++++ .../yang-models/sonic-device_metadata.yang | 7 +++ .../yang-models/sonic-port.yang | 25 +++++++- 8 files changed, 157 insertions(+), 5 deletions(-) diff --git a/src/sonic-yang-models/doc/Configuration.md b/src/sonic-yang-models/doc/Configuration.md index 562ef837acac..b439d4d26e47 100644 --- a/src/sonic-yang-models/doc/Configuration.md +++ b/src/sonic-yang-models/doc/Configuration.md @@ -845,6 +845,8 @@ instance is supported in SONiC. { "DEVICE_METADATA": { "localhost": { + "asic_id": "06:00.0", + "asic_name": "asic0", "hwsku": "Force10-S6100", "default_bgp_status": "up", "docker_routing_config_mode": "unified", @@ -1375,7 +1377,10 @@ optional attributes. "speed": "40000", "link_training": "off", "laser_freq": "191300", - "tx_power": "-27.3" + "tx_power": "-27.3", + "coreId": "1", + "corePortId": "1", + "numVoq": "8" }, "Ethernet1": { "index": "1", @@ -1387,7 +1392,10 @@ optional attributes. "speed": "40000", "link_training": "on", "laser_freq": "191300", - "tx_power": "-27.3" + "tx_power": "-27.3", + "coreId": "0", + "corePortId": "14", + "numVoq": "8" }, "Ethernet63": { "index": "63", @@ -1397,7 +1405,10 @@ optional attributes. "alias": "fortyGigE1/4/16", "speed": "40000", "laser_freq": "191300", - "tx_power": "-27.3" + "tx_power": "-27.3", + "coreId": "0", + "corePortId": "15", + "numVoq": "8" } } } diff --git a/src/sonic-yang-models/tests/files/sample_config_db.json b/src/sonic-yang-models/tests/files/sample_config_db.json index 16b652fb23b0..d34ec328c459 100644 --- a/src/sonic-yang-models/tests/files/sample_config_db.json +++ b/src/sonic-yang-models/tests/files/sample_config_db.json @@ -305,6 +305,7 @@ "DEVICE_METADATA": { "localhost": { "type": "ToRRouter", + "asic_id": "06:00.0", "mac": "00:11:22:33:dd:5a", "hostname": "asw.dc", "bgp_asn": "64850", @@ -449,6 +450,9 @@ "PORT": { "Ethernet0": { "alias": "Eth1/1", + "coreId": "1", + "corePortId": "1", + "numVoq": "8", "lanes": "65", "description": "", "speed": "11100", @@ -464,6 +468,9 @@ }, "Ethernet1": { "alias": "Eth1/2", + "coreId": "1", + "corePortId": "1", + "numVoq": "8", "lanes": "66", "description": "", "speed": "11100", @@ -478,6 +485,9 @@ }, "Ethernet2": { "alias": "Eth1/3", + "coreId": "1", + "corePortId": "1", + "numVoq": "8", "lanes": "67", "description": "", "speed": "11100", diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests/device_metadata.json b/src/sonic-yang-models/tests/yang_model_tests/tests/device_metadata.json index d2779804d594..8c96fdc4558f 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests/device_metadata.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests/device_metadata.json @@ -2,6 +2,12 @@ "DEV_META_DEV_NEIGH_VERSION_TABLE": { "desc": "DEVICE_METADATA DEVICE_NEIGHBOR VERSION TABLE." }, + "DEVICE_METADATA_ASIC_ID": { + "desc": "DEVICE_METADATA ASIC ID." + }, + "DEVICE_METADATA_ASIC_NAME": { + "desc": "DEVICE_METADATA ASIC NAME." + }, "DEVICE_METADATA_DEFAULT_BGP_STATUS": { "desc": "DEVICE_METADATA DEFAULT VALUE FOR BGP_STATUS FIELD.", "eStrKey" : "Verify", diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests/port.json b/src/sonic-yang-models/tests/yang_model_tests/tests/port.json index c8a3ce102c25..e93df4e6af93 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests/port.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests/port.json @@ -49,6 +49,15 @@ "PORT_VALID_TYPE_TEST": { "desc": "PORT_VALID_TYPE_TEST no failure." }, + "PORT_COREID_TYPE_TEST": { + "desc": "PORT_COREID_TYPE_TEST no failure." + }, + "PORT_COREPORTID_TYPE_TEST": { + "desc": "PORT_COREPORTID_TYPE_TEST no failure." + }, + "PORT_NUMVOQ_TYPE_TEST": { + "desc": "PORT_NUMVOQ_TYPE_TEST no failure." + }, "PORT_INVALID_TYPE_TEST": { "desc": "PORT_INVALID_TYPE_TEST InvalidValue condition failure.", "eStrKey" : "InvalidValue", diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests_config/device_metadata.json b/src/sonic-yang-models/tests/yang_model_tests/tests_config/device_metadata.json index 21cf3808a636..16c42a92a398 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests_config/device_metadata.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests_config/device_metadata.json @@ -11,6 +11,34 @@ } } }, + "DEVICE_METADATA_ASIC_ID": { + "sonic-device_metadata:sonic-device_metadata": { + "sonic-device_metadata:DEVICE_METADATA": { + "sonic-device_metadata:localhost": { + "bgp_asn": "65001", + "default_bgp_status": "up", + "hostname": "DUT-CSW", + "asic_id": "06:00.0", + "asic_name": "asic0", + "platform": "Stone-DX010" + } + } + } + }, + "DEVICE_METADATA_ASIC_NAME": { + "sonic-device_metadata:sonic-device_metadata": { + "sonic-device_metadata:DEVICE_METADATA": { + "sonic-device_metadata:localhost": { + "bgp_asn": "65001", + "default_bgp_status": "up", + "hostname": "DUT-CSW", + "asic_id": "06:00.0", + "asic_name": "asic0", + "platform": "Stone-DX010" + } + } + } + }, "DEVICE_METADATA_DEFAULT_DOCKER_ROUTING_CONFIG_MODE": { "sonic-device_metadata:sonic-device_metadata": { "sonic-device_metadata:DEVICE_METADATA": { diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests_config/port.json b/src/sonic-yang-models/tests/yang_model_tests/tests_config/port.json index 7444040036e9..090c6ba76d4c 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests_config/port.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests_config/port.json @@ -226,6 +226,66 @@ } }, + "PORT_COREID_TYPE_TEST": { + "sonic-port:sonic-port": { + "sonic-port:PORT": { + "PORT_LIST": [ + { + "name": "Ethernet8", + "alias": "eth8", + "coreId": "1", + "corePortId": "1", + "numVoq": "8", + "lanes": "65", + "speed": 25000, + "autoneg": "on", + "interface_type": "CR4" + } + ] + } + } + }, + + "PORT_COREPORTID_TYPE_TEST": { + "sonic-port:sonic-port": { + "sonic-port:PORT": { + "PORT_LIST": [ + { + "name": "Ethernet8", + "alias": "eth8", + "coreId": "1", + "corePortId": "1", + "numVoq": "8", + "lanes": "65", + "speed": 25000, + "autoneg": "on", + "interface_type": "CR4" + } + ] + } + } + }, + + "PORT_NUMVOQ_TYPE_TEST": { + "sonic-port:sonic-port": { + "sonic-port:PORT": { + "PORT_LIST": [ + { + "name": "Ethernet8", + "alias": "eth8", + "coreId": "1", + "corePortId": "1", + "numVoq": "8", + "lanes": "65", + "speed": 25000, + "autoneg": "on", + "interface_type": "CR4" + } + ] + } + } + }, + "PORT_INVALID_TYPE_TEST": { "sonic-port:sonic-port": { "sonic-port:PORT": { diff --git a/src/sonic-yang-models/yang-models/sonic-device_metadata.yang b/src/sonic-yang-models/yang-models/sonic-device_metadata.yang index 83e113cff3ae..5657e55ef22f 100644 --- a/src/sonic-yang-models/yang-models/sonic-device_metadata.yang +++ b/src/sonic-yang-models/yang-models/sonic-device_metadata.yang @@ -40,6 +40,13 @@ module sonic-device_metadata { type stypes:hwsku; } + leaf asic_id { + type string { + length 1..16; + } + description "asic_id is unique identifier of the asic used by SAI for initialization."; + } + leaf default_bgp_status { type enumeration { enum up; diff --git a/src/sonic-yang-models/yang-models/sonic-port.yang b/src/sonic-yang-models/yang-models/sonic-port.yang index 1b9c6b14b5a9..86331fafec74 100644 --- a/src/sonic-yang-models/yang-models/sonic-port.yang +++ b/src/sonic-yang-models/yang-models/sonic-port.yang @@ -39,6 +39,27 @@ module sonic-port{ } } + leaf numVoq { + description "The number of virtual output queue supportted on this port."; + type string { + length 1..16; + } + } + + leaf coreId { + description "The ASIC core where the port belongs to."; + type string { + length 1..16; + } + } + + leaf corePortId { + description "The ASIC core port for this port."; + type string { + length 1..16; + } + } + leaf alias { type string { length 1..128; @@ -163,8 +184,8 @@ module sonic-port{ leaf tpid { description "This leaf describes the possible TPID value that can be configured - to the specified port if the HW supports TPID configuration. The possible - values are 0x8100, 0x9100, 0x9200, 0x88a8, and 0x88A8"; + to the specified port if the HW supports TPID configuration. The possible + values are 0x8100, 0x9100, 0x9200, 0x88a8, and 0x88A8"; type stypes:tpid_type; } From 879cd74719bbcfe92951659a828cdee8ed9d73ae Mon Sep 17 00:00:00 2001 From: Xincun Li <147451452+xincunli-sonic@users.noreply.github.com> Date: Fri, 26 Apr 2024 13:15:20 -0700 Subject: [PATCH 2/2] Rename the leaf nodes to lower case. (#18704) ### Why I did it Consolidate the `numvoq`, `coreid`, `coreportid` to be lower case which matches other leaf node convention. ### How I did it Rename to lower case. #### How to verify it No need to verify. --- .../Arista-7800R3-48CQ2-C48/port_config.ini | 2 +- .../Arista-7800R3A-36D2-C36/0/port_config.ini | 2 +- .../Arista-7800R3A-36D2-C36/1/port_config.ini | 2 +- .../Arista-7800R3A-36D2-C72/0/port_config.ini | 2 +- .../Arista-7800R3A-36D2-C72/1/port_config.ini | 2 +- .../Arista-7800R3A-36D2-D36/0/port_config.ini | 2 +- .../Arista-7800R3A-36D2-D36/1/port_config.ini | 2 +- .../Nokia-IXR7250E-36x100G/0/port_config.ini | 2 +- .../Nokia-IXR7250E-36x100G/1/port_config.ini | 2 +- .../Nokia-IXR7250E-36x400G/0/port_config.ini | 2 +- .../Nokia-IXR7250E-36x400G/1/port_config.ini | 2 +- .../cli-plugin-tests/config_db.json | 24 +++++++++---------- src/sonic-yang-models/doc/Configuration.md | 18 +++++++------- .../tests/files/sample_config_db.json | 18 +++++++------- .../yang_model_tests/tests_config/port.json | 18 +++++++------- .../yang-models/sonic-port.yang | 12 +++++----- 16 files changed, 56 insertions(+), 56 deletions(-) diff --git a/device/arista/x86_64-arista_7800r3_48cq2_lc/Arista-7800R3-48CQ2-C48/port_config.ini b/device/arista/x86_64-arista_7800r3_48cq2_lc/Arista-7800R3-48CQ2-C48/port_config.ini index 07a78421dd4b..3f5543738aa6 100644 --- a/device/arista/x86_64-arista_7800r3_48cq2_lc/Arista-7800R3-48CQ2-C48/port_config.ini +++ b/device/arista/x86_64-arista_7800r3_48cq2_lc/Arista-7800R3-48CQ2-C48/port_config.ini @@ -1,4 +1,4 @@ -# name lanes alias index role speed asic_port_name coreId corePortId numVoq +# name lanes alias index role speed asic_port_name core_id core_port_id num_voq Ethernet0 6,7 Ethernet1/1 1 Ext 100000 Eth0 0 1 8 Ethernet4 2,3 Ethernet2/1 2 Ext 100000 Eth4 0 2 8 Ethernet8 4,5 Ethernet3/1 3 Ext 100000 Eth8 0 3 8 diff --git a/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-C36/0/port_config.ini b/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-C36/0/port_config.ini index a67c9b3f7d2f..c199d4af0b47 100644 --- a/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-C36/0/port_config.ini +++ b/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-C36/0/port_config.ini @@ -1,4 +1,4 @@ -# name lanes alias index role speed asic_port_name coreId corePortId numVoq +# name lanes alias index role speed asic_port_name core_id core_port_id num_voq Ethernet0 72,73,74,75 Ethernet1/1 1 Ext 100000 Eth0 1 1 8 Ethernet8 80,81,82,83 Ethernet2/1 2 Ext 100000 Eth8 1 2 8 Ethernet16 88,89,90,91 Ethernet3/1 3 Ext 100000 Eth16 1 3 8 diff --git a/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-C36/1/port_config.ini b/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-C36/1/port_config.ini index 4af1dc77b2a6..6763a4342594 100644 --- a/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-C36/1/port_config.ini +++ b/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-C36/1/port_config.ini @@ -1,4 +1,4 @@ -# name lanes alias index role speed asic_port_name coreId corePortId numVoq +# name lanes alias index role speed asic_port_name core_id core_port_id num_voq Ethernet144 72,73,74,75 Ethernet19/1 19 Ext 100000 Eth0 1 1 8 Ethernet152 80,81,82,83 Ethernet20/1 20 Ext 100000 Eth8 1 2 8 Ethernet160 88,89,90,91 Ethernet21/1 21 Ext 100000 Eth16 1 3 8 diff --git a/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-C72/0/port_config.ini b/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-C72/0/port_config.ini index f9f02ffb83a0..e38d580c72cd 100644 --- a/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-C72/0/port_config.ini +++ b/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-C72/0/port_config.ini @@ -1,4 +1,4 @@ -# name lanes alias index role speed asic_port_name coreId corePortId numVoq +# name lanes alias index role speed asic_port_name core_id core_port_id num_voq Ethernet0 72,73,74,75 Ethernet1/1 1 Ext 100000 Eth0 1 1 8 Ethernet4 76,77,78,79 Ethernet1/5 1 Ext 100000 Eth4 1 2 8 Ethernet8 80,81,82,83 Ethernet2/1 2 Ext 100000 Eth8 1 3 8 diff --git a/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-C72/1/port_config.ini b/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-C72/1/port_config.ini index 53988f0b7a26..ec3f5fbf971c 100644 --- a/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-C72/1/port_config.ini +++ b/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-C72/1/port_config.ini @@ -1,4 +1,4 @@ -# name lanes alias index role speed asic_port_name coreId corePortId numVoq +# name lanes alias index role speed asic_port_name core_id core_port_id num_voq Ethernet144 72,73,74,75 Ethernet19/1 19 Ext 100000 Eth144 1 1 8 Ethernet148 76,77,78,79 Ethernet19/5 19 Ext 100000 Eth148 1 2 8 Ethernet152 80,81,82,83 Ethernet20/1 20 Ext 100000 Eth152 1 3 8 diff --git a/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-D36/0/port_config.ini b/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-D36/0/port_config.ini index d6b5da8404dd..3ba9272d43a4 100644 --- a/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-D36/0/port_config.ini +++ b/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-D36/0/port_config.ini @@ -1,4 +1,4 @@ -# name lanes alias index role speed asic_port_name coreId corePortId numVoq +# name lanes alias index role speed asic_port_name core_id core_port_id num_voq Ethernet0 72,73,74,75,76,77,78,79 Ethernet1/1 1 Ext 400000 Eth0 1 1 8 Ethernet8 80,81,82,83,84,85,86,87 Ethernet2/1 2 Ext 400000 Eth8 1 2 8 Ethernet16 88,89,90,91,92,93,94,95 Ethernet3/1 3 Ext 400000 Eth16 1 3 8 diff --git a/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-D36/1/port_config.ini b/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-D36/1/port_config.ini index 6e6b7765b749..84839fb90957 100644 --- a/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-D36/1/port_config.ini +++ b/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-D36/1/port_config.ini @@ -1,4 +1,4 @@ -# name lanes alias index role speed asic_port_name coreId corePortId numVoq +# name lanes alias index role speed asic_port_name core_id core_port_id num_voq Ethernet144 72,73,74,75,76,77,78,79 Ethernet19/1 19 Ext 400000 Eth0 1 1 8 Ethernet152 80,81,82,83,84,85,86,87 Ethernet20/1 20 Ext 400000 Eth8 1 2 8 Ethernet160 88,89,90,91,92,93,94,95 Ethernet21/1 21 Ext 400000 Eth16 1 3 8 diff --git a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x100G/0/port_config.ini b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x100G/0/port_config.ini index d9df84b6ed9a..8b4e625ec7a5 100644 --- a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x100G/0/port_config.ini +++ b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x100G/0/port_config.ini @@ -1,4 +1,4 @@ -# name lanes alias index role speed asic_port_name coreid coreportid numvoq +# name lanes alias index role speed asic_port_name core_id core_port_id num_voq Ethernet0 72,73,74,75 Ethernet1/1 1 Ext 100000 Eth0 1 1 8 Ethernet8 80,81,82,83 Ethernet2/1 2 Ext 100000 Eth8 1 2 8 Ethernet16 88,89,90,91 Ethernet3/1 3 Ext 100000 Eth16 1 3 8 diff --git a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x100G/1/port_config.ini b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x100G/1/port_config.ini index 4d769b17db84..630e5109d077 100644 --- a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x100G/1/port_config.ini +++ b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x100G/1/port_config.ini @@ -1,4 +1,4 @@ -# name lanes alias index role speed asic_port_name coreid coreportid numvoq +# name lanes alias index role speed asic_port_name core_id core_port_id num_voq Ethernet144 72,73,74,75 Ethernet19/1 19 Ext 100000 Eth0 1 1 8 Ethernet152 80,81,82,83 Ethernet20/1 20 Ext 100000 Eth8 1 2 8 Ethernet160 88,89,90,91 Ethernet21/1 21 Ext 100000 Eth16 1 3 8 diff --git a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x400G/0/port_config.ini b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x400G/0/port_config.ini index 478b5cb1ca60..18449e8cbcba 100644 --- a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x400G/0/port_config.ini +++ b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x400G/0/port_config.ini @@ -1,4 +1,4 @@ -# name lanes alias index role speed asic_port_name coreid coreportid numvoq +# name lanes alias index role speed asic_port_name core_id core_port_id num_voq Ethernet0 72,73,74,75,76,77,78,79 Ethernet1/1 1 Ext 400000 Eth0 1 1 8 Ethernet8 80,81,82,83,84,85,86,87 Ethernet2/1 2 Ext 400000 Eth8 1 2 8 Ethernet16 88,89,90,91,92,93,94,95 Ethernet3/1 3 Ext 400000 Eth16 1 3 8 diff --git a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x400G/1/port_config.ini b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x400G/1/port_config.ini index 92c0731ddcc5..faccc8e39def 100644 --- a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x400G/1/port_config.ini +++ b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x400G/1/port_config.ini @@ -1,4 +1,4 @@ -# name lanes alias index role speed asic_port_name coreid coreportid numvoq +# name lanes alias index role speed asic_port_name core_id core_port_id num_voq Ethernet144 72,73,74,75,76,77,78,79 Ethernet19/1 19 Ext 400000 Eth0 1 1 8 Ethernet152 80,81,82,83,84,85,86,87 Ethernet20/1 20 Ext 400000 Eth8 1 2 8 Ethernet160 88,89,90,91,92,93,94,95 Ethernet21/1 21 Ext 400000 Eth16 1 3 8 diff --git a/dockers/docker-macsec/cli-plugin-tests/config_db.json b/dockers/docker-macsec/cli-plugin-tests/config_db.json index 9f4c266d4284..d145fb7c724e 100644 --- a/dockers/docker-macsec/cli-plugin-tests/config_db.json +++ b/dockers/docker-macsec/cli-plugin-tests/config_db.json @@ -11,14 +11,14 @@ "PORT|Ethernet0": { "alias": "Ethernet1/1", "asic_port_name": "Eth0-ASIC0", - "coreid": "1", - "coreportid": "1", + "core_id": "1", + "core_port_id": "1", "description": "Ethernet1/1", "index": "1", "lanes": "72,73,74,75,76,77,78,79", "macsec": "macsec_profile", "mtu": "9100", - "numvoq": "8", + "num_voq": "8", "pfc_asym": "off", "role": "Ext", "speed": "400000", @@ -27,14 +27,14 @@ "PORT|Ethernet1": { "alias": "Ethernet2/1", "asic_port_name": "Eth0-ASIC0", - "coreid": "1", - "coreportid": "1", + "core_id": "1", + "core_port_id": "1", "description": "Ethernet2/1", "index": "1", "lanes": "72,73,74,75,76,77,78,79", "macsec": "macsec_profile", "mtu": "9100", - "numvoq": "8", + "num_voq": "8", "pfc_asym": "off", "role": "Ext", "speed": "400000", @@ -43,14 +43,14 @@ "PORT|Ethernet4": { "alias": "Ethernet5/1", "asic_port_name": "Eth0-ASIC0", - "coreid": "1", - "coreportid": "1", + "core_id": "1", + "core_port_id": "1", "description": "Ethernet5/1", "index": "1", "lanes": "72,73,74,75,76,77,78,79", "macsec": "macsec_profile", "mtu": "9100", - "numvoq": "8", + "num_voq": "8", "pfc_asym": "off", "role": "Ext", "speed": "400000", @@ -59,14 +59,14 @@ "PORT|Ethernet5": { "alias": "Ethernet6/1", "asic_port_name": "Eth0-ASIC0", - "coreid": "1", - "coreportid": "1", + "core_id": "1", + "core_port_id": "1", "description": "Ethernet6/1", "index": "1", "lanes": "72,73,74,75,76,77,78,79", "macsec": "macsec_profile", "mtu": "9100", - "numvoq": "8", + "num_voq": "8", "pfc_asym": "off", "role": "Ext", "speed": "400000", diff --git a/src/sonic-yang-models/doc/Configuration.md b/src/sonic-yang-models/doc/Configuration.md index b439d4d26e47..931094cd1541 100644 --- a/src/sonic-yang-models/doc/Configuration.md +++ b/src/sonic-yang-models/doc/Configuration.md @@ -1378,9 +1378,9 @@ optional attributes. "link_training": "off", "laser_freq": "191300", "tx_power": "-27.3", - "coreId": "1", - "corePortId": "1", - "numVoq": "8" + "core_id": "1", + "core_port_id": "1", + "num_voq": "8" }, "Ethernet1": { "index": "1", @@ -1393,9 +1393,9 @@ optional attributes. "link_training": "on", "laser_freq": "191300", "tx_power": "-27.3", - "coreId": "0", - "corePortId": "14", - "numVoq": "8" + "core_id": "0", + "core_port_id": "14", + "num_voq": "8" }, "Ethernet63": { "index": "63", @@ -1406,9 +1406,9 @@ optional attributes. "speed": "40000", "laser_freq": "191300", "tx_power": "-27.3", - "coreId": "0", - "corePortId": "15", - "numVoq": "8" + "core_id": "0", + "core_port_id": "15", + "num_voq": "8" } } } diff --git a/src/sonic-yang-models/tests/files/sample_config_db.json b/src/sonic-yang-models/tests/files/sample_config_db.json index d34ec328c459..ebac36294eba 100644 --- a/src/sonic-yang-models/tests/files/sample_config_db.json +++ b/src/sonic-yang-models/tests/files/sample_config_db.json @@ -450,9 +450,9 @@ "PORT": { "Ethernet0": { "alias": "Eth1/1", - "coreId": "1", - "corePortId": "1", - "numVoq": "8", + "core_id": "1", + "core_port_id": "1", + "num_voq": "8", "lanes": "65", "description": "", "speed": "11100", @@ -468,9 +468,9 @@ }, "Ethernet1": { "alias": "Eth1/2", - "coreId": "1", - "corePortId": "1", - "numVoq": "8", + "core_id": "1", + "core_port_id": "1", + "num_voq": "8", "lanes": "66", "description": "", "speed": "11100", @@ -485,9 +485,9 @@ }, "Ethernet2": { "alias": "Eth1/3", - "coreId": "1", - "corePortId": "1", - "numVoq": "8", + "core_id": "1", + "core_port_id": "1", + "num_voq": "8", "lanes": "67", "description": "", "speed": "11100", diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests_config/port.json b/src/sonic-yang-models/tests/yang_model_tests/tests_config/port.json index 090c6ba76d4c..d511d6cdda92 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests_config/port.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests_config/port.json @@ -233,9 +233,9 @@ { "name": "Ethernet8", "alias": "eth8", - "coreId": "1", - "corePortId": "1", - "numVoq": "8", + "core_id": "1", + "core_port_id": "1", + "num_voq": "8", "lanes": "65", "speed": 25000, "autoneg": "on", @@ -253,9 +253,9 @@ { "name": "Ethernet8", "alias": "eth8", - "coreId": "1", - "corePortId": "1", - "numVoq": "8", + "core_id": "2", + "core_port_id": "2", + "num_voq": "8", "lanes": "65", "speed": 25000, "autoneg": "on", @@ -273,9 +273,9 @@ { "name": "Ethernet8", "alias": "eth8", - "coreId": "1", - "corePortId": "1", - "numVoq": "8", + "core_id": "3", + "core_port_id": "3", + "num_voq": "8", "lanes": "65", "speed": 25000, "autoneg": "on", diff --git a/src/sonic-yang-models/yang-models/sonic-port.yang b/src/sonic-yang-models/yang-models/sonic-port.yang index 86331fafec74..6ad6919c0c13 100644 --- a/src/sonic-yang-models/yang-models/sonic-port.yang +++ b/src/sonic-yang-models/yang-models/sonic-port.yang @@ -39,22 +39,22 @@ module sonic-port{ } } - leaf numVoq { - description "The number of virtual output queue supportted on this port."; + leaf core_id { + description "The ASIC core where the port belongs to."; type string { length 1..16; } } - leaf coreId { - description "The ASIC core where the port belongs to."; + leaf core_port_id { + description "The ASIC core port for this port."; type string { length 1..16; } } - leaf corePortId { - description "The ASIC core port for this port."; + leaf num_voq { + description "The number of virtual output queue supportted on this port."; type string { length 1..16; }