From f7d082244a067a340e112ae168843f56c2c7c3af Mon Sep 17 00:00:00 2001 From: Dmytro Shevchuk <68949102+dmytroxshevchuk@users.noreply.github.com> Date: Sat, 19 Dec 2020 20:14:06 +0200 Subject: [PATCH] [DPB] update flex counter yang model, fix BUFFER_POOL_WATERMARK (#6178) Looks like we have redefinition of BUFFER_POOL_WATERMARK_KEY to BUFFER_POOL_WATERMARK, so DPB fall. https://github.com/Azure/sonic-swss/blob/c7ee75f0b92e3bbbd34938fb6ceca50f0491b5f9/orchagent/flexcounterorch.cpp#L18 #define BUFFER_POOL_WATERMARK_KEY "BUFFER_POOL_WATERMARK" unordered_map flexCounterGroupMap = { {"PORT", PORT_STAT_COUNTER_FLEX_COUNTER_GROUP}, {"PORT_RATES", PORT_RATE_COUNTER_FLEX_COUNTER_GROUP}, {"PORT_BUFFER_DROP", PORT_STAT_COUNTER_FLEX_COUNTER_GROUP}, {"QUEUE", QUEUE_STAT_COUNTER_FLEX_COUNTER_GROUP}, {"PFCWD", PFC_WD_FLEX_COUNTER_GROUP}, {"QUEUE_WATERMARK", QUEUE_WATERMARK_STAT_COUNTER_FLEX_COUNTER_GROUP}, {"PG_WATERMARK", PG_WATERMARK_STAT_COUNTER_FLEX_COUNTER_GROUP}, {BUFFER_POOL_WATERMARK_KEY, BUFFER_POOL_WATERMARK_STAT_COUNTER_FLEX_COUNTER_GROUP}, --- src/sonic-yang-models/tests/yang_model_tests/yangTest.json | 4 ++-- src/sonic-yang-models/yang-models/sonic-flex_counter.yang | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sonic-yang-models/tests/yang_model_tests/yangTest.json b/src/sonic-yang-models/tests/yang_model_tests/yangTest.json index 90d748309d..527b528332 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/yangTest.json +++ b/src/sonic-yang-models/tests/yang_model_tests/yangTest.json @@ -850,7 +850,7 @@ "PORT_BUFFER_DROP": { "FLEX_COUNTER_STATUS": "enable" }, - "BUFFER_POOL_WATERMARK_KEY": { + "BUFFER_POOL_WATERMARK": { "FLEX_COUNTER_STATUS": "enable" }, "QUEUE": { @@ -1689,7 +1689,7 @@ "PORT_BUFFER_DROP": { "FLEX_COUNTER_STATUS": "enable" }, - "BUFFER_POOL_WATERMARK_KEY": { + "BUFFER_POOL_WATERMARK": { "FLEX_COUNTER_STATUS": "enable" }, "QUEUE": { 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 83b0512aeb..dbafc33bae 100644 --- a/src/sonic-yang-models/yang-models/sonic-flex_counter.yang +++ b/src/sonic-yang-models/yang-models/sonic-flex_counter.yang @@ -27,7 +27,7 @@ module sonic-flex_counter { /* below are in alphabetical order */ - container BUFFER_POOL_WATERMARK_KEY { + container BUFFER_POOL_WATERMARK { /* BUFFER_POOL_WATERMARK_STAT_COUNTER_FLEX_COUNTER_GROUP */ leaf FLEX_COUNTER_STATUS { type flex_status;