From ff4be8e8bca66b73a45939320559f747857ab023 Mon Sep 17 00:00:00 2001 From: Rajesh Perumal R <100286527+rpmarvell@users.noreply.github.com> Date: Wed, 14 Jun 2023 10:59:35 +0530 Subject: [PATCH] sonic-yang-models: WRED statistics yang (#14758) * 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 4d1fb79263..29e1272044 100644 --- a/src/sonic-yang-models/doc/Configuration.md +++ b/src/sonic-yang-models/doc/Configuration.md @@ -1102,6 +1102,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 87ac2c6987..73da6d21d2 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 96745fc5e4..90c75eadc6 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 */