-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix VDM freeze and unfreeze needed for PM stats collection #386 #387
Conversation
please address the test failure in the pre-commit check. |
/easycla |
|
rerun p1 |
1 similar comment
rerun p1 |
@jaganbal-a please sign the EasyCLA |
if (retry <= 0) and (status != expected_status): | ||
return 1 | ||
|
||
def freeze_vdm_stats(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jaganbal-a After writing to Freeze, we should wait at max tVDMF Timeout = 10msec and if still VDM_FREEZE_DONE is not SET return failure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
post setting freeze, it waits for tVDMF time '10ms' on each retry, added 3 retry before returning error for the worst case as the delay is 10ms.
#Retry for freeze done status | ||
return self.util_status_check_with_retry(VDM_FREEZE_UNFREEZE_DONE_RETRY, SLEEP_10MS, consts.VDM_FREEZE_DONE, 1) | ||
|
||
def unfreeze_vdm_stats(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jaganbal-a After writing to un-Freeze, we should wait at max tVDMF Timeout = 10msec and if still VDM_UNFREEZE_DONE is not SET return failure
@@ -51,6 +51,14 @@ def get_transceiver_pm(self): | |||
api = self.get_xcvr_api() | |||
return api.get_transceiver_pm() if api is not None else None | |||
|
|||
def freeze_vdm_stats(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jaganbal-a can you add comment for return value status for True(Success) and False(Failure)
api = self.get_xcvr_api() | ||
return api.freeze_vdm_stats() if api is not None else None | ||
|
||
def unfreeze_vdm_stats(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jaganbal-a can you add comment for return value status for True(Success) and False(Failure)
Finding issues in signing the EasyCLA for the commits made in this PR, so created new pull request with PR comment addressed : #402 |
In order to collect PM stats without loss of data following vdm freeze and unfreeze request needs to be followed.
Description
Currently incorrect order of freeze and unfreeze request is followed to collect PM statistics, with this the data collected prior PM interval will be lost once the unfreeze request is raised before data collection from PM stats register.
Motivation and Context
fixes #386
How Has This Been Tested?
This is tested by dumping the PM table from state-DB for the interface which holds the collected PM stats for each PM interval.
Additional Information (Optional)
freeze request timestamp is added to PM table which will be used for PM time window based stats collection.
Refer PR sonic-net/SONiC#1258