Skip to content

Commit f829807

Browse files
authored
Change leaf value of used_cnt of sonic-events-swss:chk_crm_threshold (#17430)
### Why I did it Current YANG model of sonic-events-swss:chk_crm_threshold has the type uint8 for leaf used_cnt which is too small of a range to hold values of used_cnt which can greatly exceed that. Updating leaf type of used_cnt and free_cnt to match defined definition. Changed to uint32 as per defined here: https://github.com/sonic-net/sonic-swss/blob/master/orchagent/crmorch.h#L99 ##### Work item tracking - Microsoft ADO **(number only)**:26091912 #### How I did it Update leaf value #### How to verify it UT and sonic-mgmt PR checker
1 parent 5efb123 commit f829807

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/sonic-yang-models/tests/yang_model_tests/tests_config/sonic-events-swss.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,9 @@
180180
"SONIC_EVENTS_SWSS_CHK_CRM_THRESHOLD_VALID": {
181181
"sonic-events-swss:sonic-events-swss": {
182182
"sonic-events-swss:chk_crm_threshold": {
183-
"percent": 0,
184-
"used_cnt": 0,
185-
"free_cnt": 0,
183+
"percent": 80,
184+
"used_cnt": 6414,
185+
"free_cnt": 65300,
186186
"timestamp": "1985-04-12T23:20:50.52Z"
187187
}
188188
}

src/sonic-yang-models/yang-models/sonic-events-swss.yang

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,11 @@ module sonic-events-swss {
102102
}
103103

104104
leaf used_cnt {
105-
type uint8;
105+
type uint32;
106106
}
107107

108108
leaf free_cnt {
109-
type uint64;
109+
type uint32;
110110
}
111111

112112
uses evtcmn:sonic-events-cmn;

0 commit comments

Comments
 (0)