Skip to content

Commit

Permalink
Support yang model for bulk size per prefix (#21266)
Browse files Browse the repository at this point in the history
Why I did it
Support yang model for bulk size per counter

HLD: sonic-net/SONiC#1864
  • Loading branch information
stephenxs authored Feb 13, 2025
1 parent d742902 commit 360d425
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@
"PORT": {
"FLEX_COUNTER_STATUS": "enable",
"BULK_CHUNK_SIZE": 100,
"BULK_CHUNK_SIZE_PER_PREFIX": "SAI_PORT_STAT_IF_OUT_QLEN:0;SAI_PORT_STAT_IF_IN_FEC:32",
"POLL_INTERVAL": 1000
},
"PORT_BUFFER_DROP": {
Expand Down
23 changes: 23 additions & 0 deletions src/sonic-yang-models/yang-models/sonic-flex_counter.yang
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ module sonic-flex_counter {
}
}

typedef bulk_chunk_size_per_prefix {
type string;
description "Bulk chunk size per counter name prefix";
}

description "FLEX_COUNTER_TABLE part of config_db.json";

/* below are in alphabetical order */
Expand Down Expand Up @@ -111,6 +116,9 @@ module sonic-flex_counter {
leaf BULK_CHUNK_SIZE {
type bulk_chunk_size;
}
leaf BULK_CHUNK_SIZE_PER_PREFIX {
type bulk_chunk_size_per_prefix;
}
}

container PG_WATERMARK {
Expand All @@ -127,6 +135,9 @@ module sonic-flex_counter {
leaf BULK_CHUNK_SIZE {
type bulk_chunk_size;
}
leaf BULK_CHUNK_SIZE_PER_PREFIX {
type bulk_chunk_size_per_prefix;
}
}

container PORT {
Expand All @@ -143,6 +154,9 @@ module sonic-flex_counter {
leaf BULK_CHUNK_SIZE {
type bulk_chunk_size;
}
leaf BULK_CHUNK_SIZE_PER_PREFIX {
type bulk_chunk_size_per_prefix;
}
}

container PORT_RATES {
Expand All @@ -169,6 +183,9 @@ module sonic-flex_counter {
leaf BULK_CHUNK_SIZE {
type bulk_chunk_size;
}
leaf BULK_CHUNK_SIZE_PER_PREFIX {
type bulk_chunk_size_per_prefix;
}
}

container QUEUE {
Expand All @@ -185,6 +202,9 @@ module sonic-flex_counter {
leaf BULK_CHUNK_SIZE {
type bulk_chunk_size;
}
leaf BULK_CHUNK_SIZE_PER_PREFIX {
type bulk_chunk_size_per_prefix;
}
}

container QUEUE_WATERMARK {
Expand All @@ -201,6 +221,9 @@ module sonic-flex_counter {
leaf BULK_CHUNK_SIZE {
type bulk_chunk_size;
}
leaf BULK_CHUNK_SIZE_PER_PREFIX {
type bulk_chunk_size_per_prefix;
}
}

container RIF {
Expand Down

0 comments on commit 360d425

Please sign in to comment.