Support TC value above 7 in yang model (#11630)

This commit is contained in:
bingwang-ms 2022-08-09 09:34:13 +08:00 committed by Ying Xie
parent 6391b0a8ee
commit b389931262
6 changed files with 83 additions and 26 deletions

View File

@ -13,6 +13,10 @@
{
"dscp":"2",
"tc":"2"
},
{
"dscp":"8",
"tc":"8"
}
]
},
@ -26,6 +30,10 @@
{
"dscp":"2",
"tc":"2"
},
{
"dscp":"8",
"tc":"8"
}
]
}
@ -65,7 +73,7 @@
"DSCP_TO_TC_MAP": [
{
"dscp": "1",
"tc": "8"
"tc": "16"
},
{
"dscp":"2",
@ -92,6 +100,10 @@
{
"dot1p":"2",
"tc":"2"
},
{
"dot1p":"3",
"tc":"8"
}
]
},
@ -105,6 +117,10 @@
{
"dot1p":"2",
"tc":"2"
},
{
"dot1p":"3",
"tc":"8"
}
]
}
@ -144,7 +160,7 @@
"DOT1P_TO_TC_MAP": [
{
"dot1p": "1",
"tc": "8"
"tc": "16"
},
{
"dot1p":"2",
@ -171,6 +187,10 @@
{
"tc":"2",
"qindex":"2"
},
{
"tc":"8",
"qindex":"3"
}
]
},
@ -184,6 +204,10 @@
{
"tc":"2",
"qindex":"2"
},
{
"tc":"8",
"qindex":"3"
}
]
}
@ -250,6 +274,10 @@
{
"tc":"2",
"pg":"2"
},
{
"tc":"8",
"pg":"3"
}
]
},
@ -263,6 +291,10 @@
{
"tc":"2",
"pg":"2"
},
{
"tc":"8",
"pg":"3"
}
]
}
@ -487,6 +519,10 @@
{
"dscp":"2",
"tc":"2"
},
{
"dscp":"8",
"tc":"8"
}
]
}
@ -507,6 +543,10 @@
{
"dot1p":"2",
"tc":"2"
},
{
"dot1p":"3",
"tc":"8"
}
]
}
@ -527,6 +567,10 @@
{
"tc":"2",
"qindex":"2"
},
{
"tc":"8",
"qindex":"3"
}
]
}
@ -546,6 +590,10 @@
{
"tc":"2",
"pg":"2"
},
{
"tc":"8",
"pg":"3"
}
]
}
@ -643,6 +691,10 @@
{
"dscp":"2",
"tc":"2"
},
{
"dscp":"8",
"tc":"8"
}
]
}

View File

@ -6,6 +6,10 @@ module sonic-dot1p-tc-map {
prefix dot1ptm;
import sonic-types {
prefix stypes;
}
organization
"SONiC";
@ -54,12 +58,7 @@ module sonic-dot1p-tc-map {
}
leaf tc {
type string {
pattern "[0-7]?"{
error-message "Invalid Traffic Class";
error-app-tag tc-invalid;
}
}
type stypes:tc_type;
}
}
}

View File

@ -6,6 +6,10 @@ module sonic-dscp-tc-map {
prefix dtm;
import sonic-types {
prefix stypes;
}
organization
"SONiC";
@ -54,12 +58,7 @@ module sonic-dscp-tc-map {
}
leaf tc {
type string {
pattern "[0-7]?" {
error-message "Invalid Traffic Class";
error-app-tag tc-invalid;
}
}
type stypes:tc_type;
}
}
}

View File

@ -6,6 +6,10 @@ module sonic-tc-priority-group-map {
prefix tpgm;
import sonic-types {
prefix stypes;
}
organization
"SONiC";
@ -45,12 +49,7 @@ module sonic-tc-priority-group-map {
key "tc";
leaf tc {
type string {
pattern "[0-7]?" {
error-message "Invalid Traffic Class";
error-app-tag tc-invalid;
}
}
type stypes:tc_type;
}
leaf pg {

View File

@ -6,6 +6,10 @@ module sonic-tc-queue-map {
prefix tqm;
import sonic-types {
prefix stypes;
}
organization
"SONiC";
@ -45,12 +49,7 @@ module sonic-tc-queue-map {
key "tc";
leaf tc {
type string {
pattern "[0-7]?" {
error-message "Invalid Traffic Class";
error-app-tag tc-invalid;
}
}
type stypes:tc_type;
}
leaf qindex {

View File

@ -262,6 +262,15 @@ module sonic-types {
}
}
typedef tc_type {
type uint8 {
range "0..15" {
error-message "Invalid Traffic Class";
error-app-tag tc-invalid;
}
}
}
{% if yang_model_type == "cvl" %}
/* Required for CVL */
container operation {