Skip to content

Commit 2975851

Browse files
authored
Support yang model for bulk size per counter (#21783)
<!-- Please make sure you've read and understood our contributing guidelines: https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md failure_prs.log skip_prs.log Make sure all your commits include a signature generated with `git commit -s` ** If this is a bug fix, make sure your description includes "fixes #xxxx", or "closes #xxxx" or "resolves #xxxx" Please provide the following information: --> #### Why I did it Support yang model for bulk size per counter HLD: sonic-net/SONiC#1864 ##### Work item tracking - Microsoft ADO **(number only)**: #### How I did it #### How to verify it <!-- If PR needs to be backported, then the PR must be tested against the base branch and the earliest backport release branch and provide tested image version on these two branches. For example, if the PR is requested for master, 202211 and 202012, then the requester needs to provide test results on master and 202012. --> #### Which release branch to backport (provide reason below if selected) <!-- - Note we only backport fixes to a release branch, *not* features! - Please also provide a reason for the backporting below. - e.g. - [x] 202006 --> - [ ] 201811 - [ ] 201911 - [ ] 202006 - [ ] 202012 - [ ] 202106 - [ ] 202111 - [ ] 202205 - [ ] 202211 - [ ] 202305 #### Tested branch (Please provide the tested image version) <!-- - Please provide tested image version - e.g. - [x] 20201231.100 --> - [ ] <!-- image version 1 --> - [ ] <!-- image version 2 --> #### Description for the changelog <!-- Write a short (one line) summary that describes the changes in this pull request for inclusion in the changelog: --> <!-- Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU. --> #### Link to config_db schema for YANG module changes <!-- Provide a link to config_db schema for the table for which YANG model is defined Link should point to correct section on https://github.com/Azure/sonic-buildimage/blob/master/src/sonic-yang-models/doc/Configuration.md --> #### A picture of a cute animal (not mandatory but encouraged)
1 parent 492c1dc commit 2975851

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)