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 3b94cedab4d9..6f7af54c4ad8 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 @@ -13,6 +13,12 @@ "eStrKey" : "Pattern", "eStr": ["rc"] }, + "PORT_VALID_MTU_TEST_1": { + "desc": "PORT_VALID_MTU_TEST_1 no failure." + }, + "PORT_VALID_MTU_TEST_2": { + "desc": "PORT_VALID_MTU_TEST_2 no failure." + }, "PORT_VALID_AUTONEG_TEST_1": { "desc": "PORT_VALID_AUTONEG_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 b6ccf9ec8780..684caa2432b9 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 @@ -39,6 +39,36 @@ } } }, + "PORT_VALID_MTU_TEST_1": { + "sonic-port:sonic-port": { + "sonic-port:PORT": { + "PORT_LIST": [ + { + "name": "Ethernet8", + "alias": "eth8", + "lanes": "65", + "speed": 25000, + "mtu": 68 + } + ] + } + } + }, + "PORT_VALID_MTU_TEST_2": { + "sonic-port:sonic-port": { + "sonic-port:PORT": { + "PORT_LIST": [ + { + "name": "Ethernet8", + "alias": "eth8", + "lanes": "65", + "speed": 25000, + "mtu": 9216 + } + ] + } + } + }, "PORT_VALID_AUTONEG_TEST_1": { "sonic-port:sonic-port": { "sonic-port:PORT": { diff --git a/src/sonic-yang-models/yang-models/sonic-port.yang b/src/sonic-yang-models/yang-models/sonic-port.yang index 6e03f777a859..a60e6b1624a3 100644 --- a/src/sonic-yang-models/yang-models/sonic-port.yang +++ b/src/sonic-yang-models/yang-models/sonic-port.yang @@ -117,7 +117,7 @@ module sonic-port{ leaf mtu { type uint16 { - range 1..9216; + range 68..9216; } }