Skip to content

Commit 360d425

Browse files
authored
Support yang model for bulk size per prefix (sonic-net#21266)
Why I did it Support yang model for bulk size per counter HLD: sonic-net/SONiC#1864
1 parent d742902 commit 360d425

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

src/sonic-yang-models/tests/yang_model_tests/tests_config/flex_counter.json

+1
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@
163163
"PORT": {
164164
"FLEX_COUNTER_STATUS": "enable",
165165
"BULK_CHUNK_SIZE": 100,
166+
"BULK_CHUNK_SIZE_PER_PREFIX": "SAI_PORT_STAT_IF_OUT_QLEN:0;SAI_PORT_STAT_IF_IN_FEC:32",
166167
"POLL_INTERVAL": 1000
167168
},
168169
"PORT_BUFFER_DROP": {

src/sonic-yang-models/yang-models/sonic-flex_counter.yang

+23
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ module sonic-flex_counter {
4747
}
4848
}
4949

50+
typedef bulk_chunk_size_per_prefix {
51+
type string;
52+
description "Bulk chunk size per counter name prefix";
53+
}
54+
5055
description "FLEX_COUNTER_TABLE part of config_db.json";
5156

5257
/* below are in alphabetical order */
@@ -111,6 +116,9 @@ module sonic-flex_counter {
111116
leaf BULK_CHUNK_SIZE {
112117
type bulk_chunk_size;
113118
}
119+
leaf BULK_CHUNK_SIZE_PER_PREFIX {
120+
type bulk_chunk_size_per_prefix;
121+
}
114122
}
115123

116124
container PG_WATERMARK {
@@ -127,6 +135,9 @@ module sonic-flex_counter {
127135
leaf BULK_CHUNK_SIZE {
128136
type bulk_chunk_size;
129137
}
138+
leaf BULK_CHUNK_SIZE_PER_PREFIX {
139+
type bulk_chunk_size_per_prefix;
140+
}
130141
}
131142

132143
container PORT {
@@ -143,6 +154,9 @@ module sonic-flex_counter {
143154
leaf BULK_CHUNK_SIZE {
144155
type bulk_chunk_size;
145156
}
157+
leaf BULK_CHUNK_SIZE_PER_PREFIX {
158+
type bulk_chunk_size_per_prefix;
159+
}
146160
}
147161

148162
container PORT_RATES {
@@ -169,6 +183,9 @@ module sonic-flex_counter {
169183
leaf BULK_CHUNK_SIZE {
170184
type bulk_chunk_size;
171185
}
186+
leaf BULK_CHUNK_SIZE_PER_PREFIX {
187+
type bulk_chunk_size_per_prefix;
188+
}
172189
}
173190

174191
container QUEUE {
@@ -185,6 +202,9 @@ module sonic-flex_counter {
185202
leaf BULK_CHUNK_SIZE {
186203
type bulk_chunk_size;
187204
}
205+
leaf BULK_CHUNK_SIZE_PER_PREFIX {
206+
type bulk_chunk_size_per_prefix;
207+
}
188208
}
189209

190210
container QUEUE_WATERMARK {
@@ -201,6 +221,9 @@ module sonic-flex_counter {
201221
leaf BULK_CHUNK_SIZE {
202222
type bulk_chunk_size;
203223
}
224+
leaf BULK_CHUNK_SIZE_PER_PREFIX {
225+
type bulk_chunk_size_per_prefix;
226+
}
204227
}
205228

206229
container RIF {

0 commit comments

Comments
 (0)