Skip to content

Commit

Permalink
Change leaf value of used_cnt of sonic-events-swss:chk_crm_threshold (s…
Browse files Browse the repository at this point in the history
…onic-net#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
  • Loading branch information
zbud-msft authored Dec 12, 2023
1 parent 5efb123 commit f829807
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,9 @@
"SONIC_EVENTS_SWSS_CHK_CRM_THRESHOLD_VALID": {
"sonic-events-swss:sonic-events-swss": {
"sonic-events-swss:chk_crm_threshold": {
"percent": 0,
"used_cnt": 0,
"free_cnt": 0,
"percent": 80,
"used_cnt": 6414,
"free_cnt": 65300,
"timestamp": "1985-04-12T23:20:50.52Z"
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/sonic-yang-models/yang-models/sonic-events-swss.yang
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,11 @@ module sonic-events-swss {
}

leaf used_cnt {
type uint8;
type uint32;
}

leaf free_cnt {
type uint64;
type uint32;
}

uses evtcmn:sonic-events-cmn;
Expand Down

0 comments on commit f829807

Please sign in to comment.