[DPB][YANG] Add POLL_INTERVAL in flex_counter yang model (#9276)

#### Why I did it
DPB falls due to missing POLL_INTERVAL in sonic-flex_counter yang model.

#### How I did it
Added POLL_INTERVAL leaf to ACL container in sonic-flex_counter yang model.

#### How to verify it
Run the command config interface breakout <interface> <breakout_mode>

**NOTE:**
To verify this fix, a PR ([add set_owner to feature yang](https://github.com/Azure/sonic-buildimage/pull/9075)) that fix another bug in SONiC should be merged to master.
This commit is contained in:
Mykola Gerasymenko 2021-12-08 10:21:33 +02:00 committed by Judy Joseph
parent 546818f414
commit ec46a23bc6
4 changed files with 147 additions and 40 deletions

View File

@ -916,25 +916,31 @@
"FLEX_COUNTER_STATUS": "enable"
},
"PG_WATERMARK": {
"FLEX_COUNTER_STATUS": "enable"
"FLEX_COUNTER_STATUS": "enable",
"POLL_INTERVAL": "10000"
},
"PORT": {
"FLEX_COUNTER_STATUS": "enable"
"FLEX_COUNTER_STATUS": "enable",
"POLL_INTERVAL": "1000"
},
"PORT_RATES": {
"FLEX_COUNTER_STATUS": "enable"
},
"PORT_BUFFER_DROP": {
"FLEX_COUNTER_STATUS": "enable"
"FLEX_COUNTER_STATUS": "enable",
"POLL_INTERVAL": "60000"
},
"BUFFER_POOL_WATERMARK": {
"FLEX_COUNTER_STATUS": "enable"
"FLEX_COUNTER_STATUS": "enable",
"POLL_INTERVAL": "10000"
},
"QUEUE": {
"FLEX_COUNTER_STATUS": "enable"
"FLEX_COUNTER_STATUS": "enable",
"POLL_INTERVAL": "10000"
},
"QUEUE_WATERMARK": {
"FLEX_COUNTER_STATUS": "enable"
"FLEX_COUNTER_STATUS": "enable",
"POLL_INTERVAL": "10000"
},
"DEBUG_COUNTER": {
"FLEX_COUNTER_STATUS": "enable"
@ -1003,13 +1009,13 @@
},
"AAA": {
"authentication": {
"login": "local"
"login": "local"
},
"authorization": {
"login": "local"
"login": "local"
},
"accounting": {
"login": "local"
"login": "local"
}
},
"TACPLUS": {
@ -1313,73 +1319,73 @@
},
"DSCP_TO_TC_MAP": {
"Dscp_to_tc_map1": {
"Dscp_to_tc_map1": {
"1": "1",
"2": "2"
},
"Dscp_to_tc_map2": {
},
"Dscp_to_tc_map2": {
"3": "3",
"4": "4"
}
},
"DOT1P_TO_TC_MAP": {
"Dot1p_to_tc_map1": {
"Dot1p_to_tc_map1": {
"1": "1",
"2": "2"
},
"Dot1p_to_tc_map2": {
},
"Dot1p_to_tc_map2": {
"3": "3",
"4": "4"
}
},
"TC_TO_PRIORITY_GROUP_MAP": {
"tc_to_pg_map1": {
"tc_to_pg_map1": {
"1": "1",
"2": "2"
},
"tc_to_pg_map2": {
},
"tc_to_pg_map2": {
"3": "3",
"4": "4"
}
},
"TC_TO_QUEUE_MAP": {
"tc_to_q_map1": {
"tc_to_q_map1": {
"1": "1",
"2": "2"
},
"tc_to_q_map2": {
},
"tc_to_q_map2": {
"3": "3",
"4": "4"
}
},
"MAP_PFC_PRIORITY_TO_QUEUE": {
"pfc_prio_to_q_map1": {
"pfc_prio_to_q_map1": {
"1": "1",
"2": "2"
},
"pfc_prio_to_q_map2": {
},
"pfc_prio_to_q_map2": {
"3": "3",
"4": "4"
}
},
"PFC_PRIORITY_TO_PRIORITY_GROUP_MAP": {
"pfc_prio_to_pg_map1": {
"pfc_prio_to_pg_map1": {
"1": "1",
"2": "2"
},
"pfc_prio_to_pg_map2": {
},
"pfc_prio_to_pg_map2": {
"3": "3",
"4": "4"
}
},
"PORT_QOS_MAP": {
"Ethernet0": {
"Ethernet0": {
"dot1p_to_tc_map" : "Dot1p_to_tc_map1",
"dscp_to_tc_map": "Dscp_to_tc_map1",
"tc_to_queue_map": "tc_to_q_map1",
@ -1387,8 +1393,8 @@
"pfc_to_queue_map": "pfc_prio_to_q_map1",
"pfc_to_pg_map" : "pfc_prio_to_pg_map1",
"pfc_enable" : "3,4"
},
"Ethernet4": {
},
"Ethernet4": {
"dot1p_to_tc_map" : "Dot1p_to_tc_map2",
"dscp_to_tc_map": "Dscp_to_tc_map2",
"tc_to_queue_map": "tc_to_q_map2",

View File

@ -1,5 +1,10 @@
{
"FLEX_COUNTER_TABLE_WITH_CORRECT_USED_VALUE": {
"desc": "FLEX_COUNTER_TABLE_WITH_CORRECT_USED_VALUE no failure."
"desc": "FLEX_COUNTER_TABLE_WITH_CORRECT_USED_VALUE no failure."
},
"FLEX_COUNTER_TABLE_WITH_INVALID_POLL_INTERVAL": {
"desc": "Out of range poll interval.",
"eStrKey": "Range",
"eStr": "100..4294967295"
}
}

View File

@ -3,7 +3,8 @@
"sonic-flex_counter:sonic-flex_counter": {
"sonic-flex_counter:FLEX_COUNTER_TABLE": {
"BUFFER_POOL_WATERMARK": {
"FLEX_COUNTER_STATUS": "enable"
"FLEX_COUNTER_STATUS": "enable",
"POLL_INTERVAL": 10000
},
"DEBUG_COUNTER": {
"FLEX_COUNTER_STATUS": "enable"
@ -12,31 +13,90 @@
"FLEX_COUNTER_STATUS": "enable"
},
"PG_DROP": {
"FLEX_COUNTER_STATUS": "enable"
"FLEX_COUNTER_STATUS": "enable",
"POLL_INTERVAL": 10000
},
"PG_WATERMARK": {
"FLEX_COUNTER_STATUS": "enable"
"FLEX_COUNTER_STATUS": "enable",
"POLL_INTERVAL": 10000
},
"PORT": {
"FLEX_COUNTER_STATUS": "enable"
"FLEX_COUNTER_STATUS": "enable",
"POLL_INTERVAL": 1000
},
"PORT_BUFFER_DROP": {
"FLEX_COUNTER_STATUS": "enable"
"FLEX_COUNTER_STATUS": "enable",
"POLL_INTERVAL": 60000
},
"PORT_RATES": {
"FLEX_COUNTER_STATUS": "enable"
},
"QUEUE": {
"FLEX_COUNTER_STATUS": "enable"
"FLEX_COUNTER_STATUS": "enable",
"POLL_INTERVAL": 10000
},
"QUEUE_WATERMARK": {
"FLEX_COUNTER_STATUS": "enable"
"FLEX_COUNTER_STATUS": "enable",
"POLL_INTERVAL": 10000
},
"ACL": {
"FLEX_COUNTER_STATUS": "enable"
"FLEX_COUNTER_STATUS": "enable",
"POLL_INTERVAL": 10000
},
"FLOW_CNT_TRAP": {
"FLEX_COUNTER_STATUS": "enable",
"POLL_INTERVAL": 10000
}
}
}
},
"FLEX_COUNTER_TABLE_WITH_INVALID_POLL_INTERVAL": {
"sonic-flex_counter:sonic-flex_counter": {
"sonic-flex_counter:FLEX_COUNTER_TABLE": {
"BUFFER_POOL_WATERMARK": {
"FLEX_COUNTER_STATUS": "enable",
"POLL_INTERVAL": 99
},
"DEBUG_COUNTER": {
"FLEX_COUNTER_STATUS": "enable"
},
"PFCWD": {
"FLEX_COUNTER_STATUS": "enable"
},
"PG_DROP": {
"FLEX_COUNTER_STATUS": "enable",
"POLL_INTERVAL": 99
},
"PG_WATERMARK": {
"FLEX_COUNTER_STATUS": "enable",
"POLL_INTERVAL": 99
},
"PORT": {
"FLEX_COUNTER_STATUS": "enable",
"POLL_INTERVAL": 99
},
"PORT_BUFFER_DROP": {
"FLEX_COUNTER_STATUS": "enable",
"POLL_INTERVAL": 99
},
"PORT_RATES": {
"FLEX_COUNTER_STATUS": "enable"
},
"QUEUE": {
"FLEX_COUNTER_STATUS": "enable",
"POLL_INTERVAL": 99
},
"QUEUE_WATERMARK": {
"FLEX_COUNTER_STATUS": "enable",
"POLL_INTERVAL": 99
},
"ACL": {
"FLEX_COUNTER_STATUS": "enable",
"POLL_INTERVAL": 99
},
"FLOW_CNT_TRAP": {
"FLEX_COUNTER_STATUS": "enable",
"POLL_INTERVAL": 99
}
}
}

View File

@ -27,6 +27,12 @@ module sonic-flex_counter {
type boolean;
}
typedef poll_interval {
type uint32 {
range 100..4294967295;
}
}
description "FLEX_COUNTER_TABLE part of config_db.json";
/* below are in alphabetical order */
@ -39,6 +45,9 @@ module sonic-flex_counter {
leaf FLEX_COUNTER_DELAY_STATUS {
type flex_delay_status;
}
leaf POLL_INTERVAL {
type poll_interval;
}
}
container DEBUG_COUNTER {
@ -69,6 +78,9 @@ module sonic-flex_counter {
leaf FLEX_COUNTER_DELAY_STATUS {
type flex_delay_status;
}
leaf POLL_INTERVAL {
type poll_interval;
}
}
container PG_WATERMARK {
@ -79,6 +91,9 @@ module sonic-flex_counter {
leaf FLEX_COUNTER_DELAY_STATUS {
type flex_delay_status;
}
leaf POLL_INTERVAL {
type poll_interval;
}
}
container PORT {
@ -89,10 +104,13 @@ module sonic-flex_counter {
leaf FLEX_COUNTER_DELAY_STATUS {
type flex_delay_status;
}
leaf POLL_INTERVAL {
type poll_interval;
}
}
container PORT_RATES {
/* PORT_BUFFER_DROP_COUNTER_FLEX_COUNTER_GROUP */
/* PORT_RATES_COUNTER_FLEX_COUNTER_GROUP */
leaf FLEX_COUNTER_STATUS {
type flex_status;
}
@ -109,6 +127,9 @@ module sonic-flex_counter {
leaf FLEX_COUNTER_DELAY_STATUS {
type flex_delay_status;
}
leaf POLL_INTERVAL {
type poll_interval;
}
}
container QUEUE {
@ -119,6 +140,9 @@ module sonic-flex_counter {
leaf FLEX_COUNTER_DELAY_STATUS {
type flex_delay_status;
}
leaf POLL_INTERVAL {
type poll_interval;
}
}
container QUEUE_WATERMARK {
@ -129,6 +153,9 @@ module sonic-flex_counter {
leaf FLEX_COUNTER_DELAY_STATUS {
type flex_delay_status;
}
leaf POLL_INTERVAL {
type poll_interval;
}
}
container RIF {
@ -139,6 +166,9 @@ module sonic-flex_counter {
leaf FLEX_COUNTER_DELAY_STATUS {
type flex_delay_status;
}
leaf POLL_INTERVAL {
type poll_interval;
}
}
container RIF_RATES {
@ -159,6 +189,9 @@ module sonic-flex_counter {
leaf FLEX_COUNTER_DELAY_STATUS {
type flex_delay_status;
}
leaf POLL_INTERVAL {
type poll_interval;
}
}
container FLOW_CNT_TRAP {
@ -169,6 +202,9 @@ module sonic-flex_counter {
leaf FLEX_COUNTER_DELAY_STATUS {
type flex_delay_status;
}
leaf POLL_INTERVAL {
type poll_interval;
}
}
}