Skip to content
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

Wait for specified duration during LPmode on/off #503

Merged
merged 5 commits into from
Oct 11, 2024

Conversation

AnoopKamath
Copy link
Contributor

Description

Wait for power on/off duration advertised in EEPROM during LP mode on/off

Motivation and Context

How Has This Been Tested?

Ethernet496  2072,2073,2074,2075     400G   9100    N/A   etp62a  routed      up       up  QSFP-DD Double Density 8X Pluggable Transceiver         N/A
Ethernet500  2076,2077,2078,2079     400G   9100    N/A   etp62b  routed      up       up  QSFP-DD Double Density 8X Pluggable Transceiver         N/A
Ethernet504  2064,2065,2066,2067     400G   9100    N/A   etp63a  routed      up       up  QSFP-DD Double Density 8X Pluggable Transceiver         N/A
Ethernet508  2068,2069,2070,2071     400G   9100    N/A   etp63b  routed      up       up  QSFP-DD Double Density 8X Pluggable Transceiver         N/A

root@sonic:/home/admin# sfputil lpmode on  Ethernet496
Enabling low-power mode for port Ethernet496 ... ERROR:sonic_platform_base.sonic_xcvr.api.public.cmis: --- start_time 1727658036.2857926
ERROR:sonic_platform_base.sonic_xcvr.api.public.cmis:--- module adv time 1.0
ERROR:sonic_platform_base.sonic_xcvr.api.public.cmis:-- delta 0.010367155075073242
ERROR:sonic_platform_base.sonic_xcvr.api.public.cmis:--- retry 1727658036.3228872
ERROR:sonic_platform_base.sonic_xcvr.api.public.cmis:-- delta 0.13735604286193848

Ethernet496  2072,2073,2074,2075     400G   9100    N/A   etp62a  routed    down       up  QSFP-DD Double Density 8X Pluggable Transceiver         N/A
Ethernet500  2076,2077,2078,2079     400G   9100    N/A   etp62b  routed    down       up  QSFP-DD Double Density 8X Pluggable Transceiver         N/A
Ethernet504  2064,2065,2066,2067     400G   9100    N/A   etp63a  routed    down       up  QSFP-DD Double Density 8X Pluggable Transceiver         N/A
Ethernet508  2068,2069,2070,2071     400G   9100    N/A   etp63b  routed    down       up  QSFP-DD Double Density 8X Pluggable Transceiver         N/A

root@sonic:/home/admin# sfputil lpmode off  Ethernet496
Disabling low-power mode for port Ethernet496 ... ERROR:sonic_platform_base.sonic_xcvr.api.public.cmis:--- start_time 1727658051.8098736
ERROR:sonic_platform_base.sonic_xcvr.api.public.cmis:--- module advt time 10.0
ERROR:sonic_platform_base.sonic_xcvr.api.public.cmis:--- delta 0.003449678421020508
ERROR:sonic_platform_base.sonic_xcvr.api.public.cmis:--- retry 1727658051.8133779
ERROR:sonic_platform_base.sonic_xcvr.api.public.cmis:--- delta 0.10421037673950195
ERROR:sonic_platform_base.sonic_xcvr.api.public.cmis:--- retry 1727658051.9141643
ERROR:sonic_platform_base.sonic_xcvr.api.public.cmis:--- delta 0.20499515533447266
ERROR:sonic_platform_base.sonic_xcvr.api.public.cmis:--- retry 1727658052.014951
ERROR:sonic_platform_base.sonic_xcvr.api.public.cmis:--- delta 0.3057982921600342
ERROR:sonic_platform_base.sonic_xcvr.api.public.cmis:--- retry 1727658052.1157365
ERROR:sonic_platform_base.sonic_xcvr.api.public.cmis:--- delta 0.4065535068511963
ERROR:sonic_platform_base.sonic_xcvr.api.public.cmis:--- retry 1727658052.2164953
ERROR:sonic_platform_base.sonic_xcvr.api.public.cmis:--- delta 0.5073249340057373
ERROR:sonic_platform_base.sonic_xcvr.api.public.cmis:--- retry 1727658052.3172574
ERROR:sonic_platform_base.sonic_xcvr.api.public.cmis:--- delta 0.6081044673919678
ERROR:sonic_platform_base.sonic_xcvr.api.public.cmis:--- retry 1727658052.4180627
ERROR:sonic_platform_base.sonic_xcvr.api.public.cmis:--- delta 0.7088265419006348
ERROR:sonic_platform_base.sonic_xcvr.api.public.cmis:--- retry 1727658052.5188124
ERROR:sonic_platform_base.sonic_xcvr.api.public.cmis:--- delta 0.8098671436309814
ERROR:sonic_platform_base.sonic_xcvr.api.public.cmis:--- retry 1727658052.6199818
ERROR:sonic_platform_base.sonic_xcvr.api.public.cmis:--- delta 0.9108560085296631
ERROR:sonic_platform_base.sonic_xcvr.api.public.cmis:--- retry 1727658052.7208529
ERROR:sonic_platform_base.sonic_xcvr.api.public.cmis:--- delta 1.0118434429168701
ERROR:sonic_platform_base.sonic_xcvr.api.public.cmis:--- retry 1727658052.8219044
ERROR:sonic_platform_base.sonic_xcvr.api.public.cmis:--- delta 1.1129236221313477
ERROR:sonic_platform_base.sonic_xcvr.api.public.cmis:--- retry 1727658052.922967
ERROR:sonic_platform_base.sonic_xcvr.api.public.cmis:--- delta 1.2139770984649658
ERROR:sonic_platform_base.sonic_xcvr.api.public.cmis:--- retry 1727658053.0240204
ERROR:sonic_platform_base.sonic_xcvr.api.public.cmis:--- delta 1.314863920211792
ERROR:sonic_platform_base.sonic_xcvr.api.public.cmis:--- retry 1727658053.1248899
ERROR:sonic_platform_base.sonic_xcvr.api.public.cmis:--- delta 1.4159109592437744
ERROR:sonic_platform_base.sonic_xcvr.api.public.cmis:--- retry 1727658053.2259784
ERROR:sonic_platform_base.sonic_xcvr.api.public.cmis:--- delta 1.517002820968628
ERROR:sonic_platform_base.sonic_xcvr.api.public.cmis:--- retry 1727658053.3270552
ERROR:sonic_platform_base.sonic_xcvr.api.public.cmis:--- delta 1.6179804801940918
ERROR:sonic_platform_base.sonic_xcvr.api.public.cmis:--- retry 1727658053.427951
ERROR:sonic_platform_base.sonic_xcvr.api.public.cmis:--- delta 1.7188282012939453
ERROR:sonic_platform_base.sonic_xcvr.api.public.cmis:--- retry 1727658053.5288022
ERROR:sonic_platform_base.sonic_xcvr.api.public.cmis:--- delta 1.8196513652801514
OK

Additional Information (Optional)

@AnoopKamath AnoopKamath changed the title Wair for specified duration during LPmode on/off Wait for specified duration during LPmode on/off Sep 30, 2024
@AnoopKamath
Copy link
Contributor Author

@prgeor , @mihirpat1 : Can you please review this?

Copy link
Contributor

@mihirpat1 mihirpat1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AnoopKamath Can you please fix the code coverage check?

sonic_platform_base/sonic_xcvr/api/public/cmis.py Outdated Show resolved Hide resolved
@AnoopKamath
Copy link
Contributor Author

@AnoopKamath Can you please fix the code coverage check?

Taken care

@shivuv
Copy link

shivuv commented Oct 8, 2024

@mihirpat1 @prgeor : Can you approve and merge this into master and cherry pick this into 202405, 202311 and 202305 branches?

@AnoopKamath
Copy link
Contributor Author

@prgeor : Can you please review/approve these changes?

@prgeor prgeor merged commit f07a6aa into sonic-net:master Oct 11, 2024
5 checks passed
@AnoopKamath
Copy link
Contributor Author

Thanks @prgeor, can you please request it for 202311 and 202305 as well?

@prgeor
Copy link
Collaborator

prgeor commented Oct 16, 2024

@bingwang-ms @StormLiangMS can you take this fix for 202311 and 202305 @AnoopKamath fyi

@mihirpat1
Copy link
Contributor

@bingwang-ms @StormLiangMS can you take this fix for 202311 and 202305 @AnoopKamath fyi

@StormLiangMS @yxieca Can you please help with the cherry-pick to 202305 and 202311?

mssonicbld pushed a commit to mssonicbld/sonic-platform-common that referenced this pull request Oct 18, 2024
* wait for specified duration during LPmode on/off

* Add Macro and remove redundant sleep

* Update test_cmis.py

* Address review comments

* Indentation issue
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202405: #506

mssonicbld pushed a commit that referenced this pull request Oct 18, 2024
* wait for specified duration during LPmode on/off

* Add Macro and remove redundant sleep

* Update test_cmis.py

* Address review comments

* Indentation issue
mssonicbld pushed a commit to mssonicbld/sonic-platform-common that referenced this pull request Oct 23, 2024
* wait for specified duration during LPmode on/off

* Add Macro and remove redundant sleep

* Update test_cmis.py

* Address review comments

* Indentation issue
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202311: #508

mssonicbld pushed a commit that referenced this pull request Oct 23, 2024
* wait for specified duration during LPmode on/off

* Add Macro and remove redundant sleep

* Update test_cmis.py

* Address review comments

* Indentation issue
oleksandrivantsiv pushed a commit to oleksandrivantsiv/sonic-platform-common that referenced this pull request Oct 25, 2024
@mihirpat1
Copy link
Contributor

@prgeor @StormLiangMS for viz.

@AnoopKamath Can you please justify why this is needed to be cherry-picked to 202305 branch?

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.

7 participants