From e5d22f7321947bbdfe4866e2e4855ab7d3e0f74b Mon Sep 17 00:00:00 2001 From: "david.zagury" Date: Sun, 24 Apr 2022 19:59:38 +0300 Subject: [PATCH 1/2] [YANG] Update range of supported port speeds to support 800G ports --- src/sonic-yang-models/yang-models/sonic-port.yang | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sonic-yang-models/yang-models/sonic-port.yang b/src/sonic-yang-models/yang-models/sonic-port.yang index add4de25ce0..eab52996fb0 100644 --- a/src/sonic-yang-models/yang-models/sonic-port.yang +++ b/src/sonic-yang-models/yang-models/sonic-port.yang @@ -61,7 +61,7 @@ module sonic-port{ leaf speed { mandatory true; type uint32 { - range 1..400000; + range 1..800000; } } @@ -78,7 +78,7 @@ module sonic-port{ type union { type uint32 { - range 1..400000; + range 1..800000; } type string { pattern "all"; From 20134ff12f6c7c46316cd0ca1ac8b7d3d6c53de5 Mon Sep 17 00:00:00 2001 From: "david.zagury" Date: Thu, 28 Apr 2022 14:19:48 +0300 Subject: [PATCH 2/2] [YANG] Add yang tests for support of 800G ports --- .../tests/yang_model_tests/tests/port.json | 7 +++ .../yang_model_tests/tests_config/port.json | 51 +++++++++++++++++++ 2 files changed, 58 insertions(+) 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 b3aa253c2e7..db9b432714e 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 @@ -24,6 +24,13 @@ "eStrKey" : "Pattern", "eStr": ["on|off"] }, + "PORT_VALID_SPEEDS_TEST_1": { + "desc": "PORT_VALID_SPEEDS_TEST_1 no failure." + }, + "PORT_INVALID_SPEEDS_TEST_1": { + "desc": "PORT_INVALID_SPEEDS_TEST_1 InvalidValue condition failure.", + "eStr": ["pattern", "does not satisfy"] + }, "PORT_VALID_ADVSPEEDS_TEST_1": { "desc": "PORT_VALID_ADVSPEEDS_TEST_1 no failure." }, 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 e1549261cb9..db3334e80d2 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 @@ -90,6 +90,40 @@ } }, + "PORT_VALID_SPEEDS_TEST_1": { + "sonic-port:sonic-port": { + "sonic-port:PORT": { + "PORT_LIST": [ + { + "name": "Ethernet8", + "alias": "eth8", + "lanes": "65", + "speed": 800000, + "autoneg": "on", + "adv_speeds": [400000, 800000] + } + ] + } + } + }, + + "PORT_INVALID_SPEEDS_TEST_1": { + "sonic-port:sonic-port": { + "sonic-port:PORT": { + "PORT_LIST": [ + { + "name": "Ethernet8", + "alias": "eth8", + "lanes": "65", + "speed": 900000, + "autoneg": "on", + "adv_speeds": [25000,40000] + } + ] + } + } + }, + "PORT_VALID_ADVSPEEDS_TEST_1": { "sonic-port:sonic-port": { "sonic-port:PORT": { @@ -124,6 +158,23 @@ } }, + "PORT_VALID_ADVSPEEDS_TEST_3": { + "sonic-port:sonic-port": { + "sonic-port:PORT": { + "PORT_LIST": [ + { + "name": "Ethernet8", + "alias": "eth8", + "lanes": "65", + "speed": 25000, + "autoneg": "on", + "adv_speeds": [25000,800000] + } + ] + } + } + }, + "PORT_INVALID_ADVSPEEDS_TEST_1": { "sonic-port:sonic-port": { "sonic-port:PORT": {