Skip to content

Commit

Permalink
[DPB] update flex counter yang model, fix BUFFER_POOL_WATERMARK (#6178)
Browse files Browse the repository at this point in the history
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<string, string> 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},
  • Loading branch information
dmytroxshevchuk authored Dec 19, 2020
1 parent 0755f29 commit f7d0822
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/sonic-yang-models/tests/yang_model_tests/yangTest.json
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,7 @@
"PORT_BUFFER_DROP": {
"FLEX_COUNTER_STATUS": "enable"
},
"BUFFER_POOL_WATERMARK_KEY": {
"BUFFER_POOL_WATERMARK": {
"FLEX_COUNTER_STATUS": "enable"
},
"QUEUE": {
Expand Down Expand Up @@ -1689,7 +1689,7 @@
"PORT_BUFFER_DROP": {
"FLEX_COUNTER_STATUS": "enable"
},
"BUFFER_POOL_WATERMARK_KEY": {
"BUFFER_POOL_WATERMARK": {
"FLEX_COUNTER_STATUS": "enable"
},
"QUEUE": {
Expand Down
2 changes: 1 addition & 1 deletion src/sonic-yang-models/yang-models/sonic-flex_counter.yang
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f7d0822

Please sign in to comment.