Skip to content

[action] [PR:18223] [Mellanox] Fix timing issue in lpmode change (#18223)#18268

Merged
mssonicbld merged 1 commit intosonic-net:202311from
mssonicbld:cherry/202311/18223
Mar 5, 2024
Merged

[action] [PR:18223] [Mellanox] Fix timing issue in lpmode change (#18223)#18268
mssonicbld merged 1 commit intosonic-net:202311from
mssonicbld:cherry/202311/18223

Conversation

@mssonicbld
Copy link
Copy Markdown
Collaborator

  • Why I did it
    Changing LPMODE timing is different between cables.
    We want to add functionality to make sure LPMODE has changed.
    For that, the wait_until utility is used and every 1 second (until timeout), it will check with lower-layers what is the current Lpmode.
    Once it is the expected mode, set_lpmode() functino will return True.
    If after seconds, Lpmode is still not in the expected mode, set_lpmode() function will return False.

  • How I did it
    Add use of wait_until function to make sure lpmode was changed.

  • How to verify it
    sfputil lpmode on
    sfputil lpmode off

- Why I did it
Changing LPMODE timing is different between cables.
We want to add functionality to make sure LPMODE has changed.
For that, the wait_until utility is used and every 1 second (until timeout), it will check with lower-layers what is the current Lpmode.
Once it is the expected mode, set_lpmode() functino will return True.
If after seconds, Lpmode is still not in the expected mode, set_lpmode() function will return False.

- How I did it
Add use of wait_until function to make sure lpmode was changed.

- How to verify it
sfputil lpmode on
sfputil lpmode off
@mssonicbld
Copy link
Copy Markdown
Collaborator Author

Original PR: #18223

@mssonicbld mssonicbld merged commit 86613b8 into sonic-net:202311 Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants