From f82980784de91fb9106be133282e894991f07147 Mon Sep 17 00:00:00 2001 From: Zain Budhwani <99770260+zbud-msft@users.noreply.github.com> Date: Tue, 12 Dec 2023 11:35:46 -0800 Subject: [PATCH] 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 --- .../yang_model_tests/tests_config/sonic-events-swss.json | 6 +++--- src/sonic-yang-models/yang-models/sonic-events-swss.yang | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests_config/sonic-events-swss.json b/src/sonic-yang-models/tests/yang_model_tests/tests_config/sonic-events-swss.json index 6b50ccd55acf..e56acc0a477d 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests_config/sonic-events-swss.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests_config/sonic-events-swss.json @@ -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" } } diff --git a/src/sonic-yang-models/yang-models/sonic-events-swss.yang b/src/sonic-yang-models/yang-models/sonic-events-swss.yang index f7b3ca3ea5e6..93c617776ca6 100644 --- a/src/sonic-yang-models/yang-models/sonic-events-swss.yang +++ b/src/sonic-yang-models/yang-models/sonic-events-swss.yang @@ -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;