From fbf3b461a26a112f75a083a5a4aac9fe01ab1744 Mon Sep 17 00:00:00 2001 From: rpmarvell Date: Thu, 20 Apr 2023 06:06:03 -0700 Subject: [PATCH] sonic-yang-models: WRED statistics yang * Yang added for WRED_ECN_QUEUE flex counter group * Yang added for WRED_ECN_PORT flex counter group Signed-off-by: rperumal@marvell.com --- src/sonic-yang-models/doc/Configuration.md | 8 ++++++ .../tests_config/flex_counter.json | 16 ++++++++++++ .../yang-models/sonic-flex_counter.yang | 26 +++++++++++++++++++ 3 files changed, 50 insertions(+) diff --git a/src/sonic-yang-models/doc/Configuration.md b/src/sonic-yang-models/doc/Configuration.md index eccf550ecef9..7e7f68949c7e 100644 --- a/src/sonic-yang-models/doc/Configuration.md +++ b/src/sonic-yang-models/doc/Configuration.md @@ -1099,6 +1099,14 @@ The FG_NHG_PREFIX table provides the FG_NHG_PREFIX for which FG behavior is desi "TUNNEL": { "FLEX_COUNTER_STATUS": "enable", "POLL_INTERVAL": "10000" + }, + "WRED_ECN_QUEUE": { + "FLEX_COUNTER_STATUS": "enable", + "POLL_INTERVAL": "10000" + }, + "WRED_ECN_PORT": { + "FLEX_COUNTER_STATUS": "enable", + "POLL_INTERVAL": "1000" } } } diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests_config/flex_counter.json b/src/sonic-yang-models/tests/yang_model_tests/tests_config/flex_counter.json index 87ac2c6987eb..73da6d21d2d9 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests_config/flex_counter.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests_config/flex_counter.json @@ -54,6 +54,14 @@ "FLOW_CNT_ROUTE": { "FLEX_COUNTER_STATUS": "enable", "POLL_INTERVAL": 10000 + }, + "WRED_ECN_QUEUE": { + "FLEX_COUNTER_STATUS": "enable", + "POLL_INTERVAL": 10000 + }, + "WRED_ECN_PORT": { + "FLEX_COUNTER_STATUS": "enable", + "POLL_INTERVAL": 1000 } } } @@ -113,6 +121,14 @@ "FLOW_CNT_ROUTE": { "FLEX_COUNTER_STATUS": "enable", "POLL_INTERVAL": 99 + }, + "WRED_ECN_QUEUE": { + "FLEX_COUNTER_STATUS": "enable", + "POLL_INTERVAL": 99 + }, + "WRED_ECN_PORT": { + "FLEX_COUNTER_STATUS": "enable", + "POLL_INTERVAL": 99 } } } diff --git a/src/sonic-yang-models/yang-models/sonic-flex_counter.yang b/src/sonic-yang-models/yang-models/sonic-flex_counter.yang index 96745fc5e4a6..90c75eadc60d 100644 --- a/src/sonic-yang-models/yang-models/sonic-flex_counter.yang +++ b/src/sonic-yang-models/yang-models/sonic-flex_counter.yang @@ -241,6 +241,32 @@ module sonic-flex_counter { } } + container WRED_ECN_QUEUE { + /* WRED_ECN_QUEUE_FLEX_COUNTER_GROUP */ + leaf FLEX_COUNTER_STATUS { + type flex_status; + } + leaf FLEX_COUNTER_DELAY_STATUS { + type flex_delay_status; + } + leaf POLL_INTERVAL { + type poll_interval; + } + } + + container WRED_ECN_PORT { + /* WRED_ECN_QUEUE_FLEX_COUNTER_GROUP */ + leaf FLEX_COUNTER_STATUS { + type flex_status; + } + leaf FLEX_COUNTER_DELAY_STATUS { + type flex_delay_status; + } + leaf POLL_INTERVAL { + type poll_interval; + } + } + } /* end of container FLEX_COUNTER_TABLE */