-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[Mellanox] optimize new platform api #3289
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. don't get all output of ethtool -m sfpx when testing whether sfp is present. only fetch the first 4 bytes is enough since the purpose here is to test whether the reading operation success rather than to get the data. this is a time-saving optimize. 2. test whether sfp module present ahead of getting its capabilities, which avoid the error msg "Cannot get module EEPROM information: Input/output error" from logging. 3. fix the get_transceiver_bulk_status's issue which returns None when failed to fetch dom data. this issue will fail snmp test. 4. pass caibration to sff8472Dom.
At any time only one daemon have priviledge of accessing watchdog device. To try accessing it from multiple daemons causes the latter ones fail and exit.
1. removing iniaializations of varient components out from constructor and providing one initializer for each. 2. only import other modules when initializing it. by doing so, initializing time is reduced and unnecessary dependencies of chassis is removed for daemons who don't need them.
…to be better aligned with base class
1. add platform.py 2. update __init__.py so that sonic_platform can be loaded as a whole
… is running on host or docker
keboliu
approved these changes
Aug 13, 2019
retest this please |
…tionary to handle reboot cause
…le call to ethtool into one
… been initialized
Npapi based daemon optimize
keboliu
approved these changes
Aug 27, 2019
jleveque
approved these changes
Aug 27, 2019
qiluo-msft
reviewed
Sep 17, 2019
@@ -0,0 +1,2 @@ | |||
__all__ = ["platform", "chassis"] | |||
from sonic_platform import * |
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.
- [](start = 27, length = 1)
Don't import wildcard in production code.
wangshengjun
pushed a commit
to wangshengjun/sonic-buildimage
that referenced
this pull request
Nov 16, 2020
optimize SFP module operations and fix issues. - split initialization of variant categories of devices and initialize each category of devices only when needed, so that unnecessary dependencies can be avoided. - update watchdog logic, only initializing watchdog when referenced. - support platform.py and enable to initialize variant devices on a host/docker basis - update init so that sonic_platform can be imported as a whole.
mssonicbld
added a commit
that referenced
this pull request
Sep 6, 2024
…atically (#20161) #### Why I did it src/sonic-utilities ``` * b82115c9 - (HEAD -> master, origin/master, origin/HEAD) Add show CLI for bmp related dataset. (#3289) (48 minutes ago) [Feng-msft] * 785d7bd5 - Fix multi-asic support to PFC config/show (#3521) (6 hours ago) [HP] * 8f5e4b6f - Fix multi-asic behaviour for mmuconfig (#3061) (10 hours ago) [bktsim] ``` #### How I did it #### How to verify it #### Description for the changelog
vvolam
pushed a commit
to vvolam/sonic-buildimage
that referenced
this pull request
Sep 12, 2024
…atically (sonic-net#20161) #### Why I did it src/sonic-utilities ``` * b82115c9 - (HEAD -> master, origin/master, origin/HEAD) Add show CLI for bmp related dataset. (sonic-net#3289) (48 minutes ago) [Feng-msft] * 785d7bd5 - Fix multi-asic support to PFC config/show (sonic-net#3521) (6 hours ago) [HP] * 8f5e4b6f - Fix multi-asic behaviour for mmuconfig (sonic-net#3061) (10 hours ago) [bktsim] ``` #### How I did it #### How to verify it #### Description for the changelog
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
- What I did
Optimize new platform API
- How I did it
- How to verify it
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)