-
Notifications
You must be signed in to change notification settings - Fork 177
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
[sfputilbase] Extend get_transceiver_change_event return event #50
Conversation
merge from upstream master
merge from upstream
:events: dictionary for physical port index and the SFP status, | ||
status='1' represent plug in, '0' represent plug out like {'0': '1', '31':'0'} | ||
when it comes to system level event/error, the index will be '-1', | ||
and status can be 'system_not_ready', 'system_become_ready', 'system_fail', |
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.
system_become_ready [](start = 48, length = 19)
From design perspective, system_become_ready
is not necessary. If this event is really happen, the logic could continue run as a normal successful case or a timeout case. Then all the system level events are actually errors in concept.
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.
Hi Qi,
I admit that in terms of state machine any normal event, like sfp module insertion or removal, can indicate the xcvrd has entered a normal state. However, an explicit notification can make the flow more clear. Without system_bdcom_ready
we can hardly tell whether the xcvrd is in a normal state, monitoring the sfp modules' state, or waiting for ready.
In this sense, I suggest keeping this state.
[sonic-platform-common] [sonic_sfp] Interpret sff 'int' element =0 as valid value (sonic-net/sonic-platform-common#51) add more error code to get_transceiver_change_event ((sonic-net/sonic-platform-common#50) [sonic_platform_base] support new-platform-api-based daemons ((sonic-net/sonic-platform-common#48) sync change to sonic_platform_base/sonic_sfp and create symbol link ((sonic-net/sonic-platform-common#49) Add parser support for Tx_RxLos,TxFault, PowerControl, ResetStatus in sff8436.py ((sonic-net/sonic-platform-common#45) readd type_abbrv_name in sonic_sfp/sff8436.py ((sonic-net/sonic-platform-common#44) [psu_base] get_status_led() returns current state of the status LED ((sonic-net/sonic-platform-common#39) Fix abbrv name for OSFP ((sonic-net/sonic-platform-common#36) [sff8436] support "Control Bytes" and "Options" ((sonic-net/sonic-platform-common#38) sonic_sfp: avoid possible key error in get_physical_to_logical() ((sonic-net/sonic-platform-common#37) [sonic-platform-daemons] [xcvrd] Enhance xcvrd to handle new system level event/error (sonic-net/sonic-platform-daemons#39) [xcvrd] Support both new platform API and old platform plugins (sonic-net/sonic-platform-daemons#38) [psud] Support both new platform API and old platform plugins (sonic-net/sonic-platform-daemons#37) [syseepromd] Support both new platform API and old platform plugins (sonic-net/sonic-platform-daemons#36) Add missing import statemet (sonic-net/sonic-platform-daemons#32) sonic_xcvrd: Support for DOM Threshold values for EEPROM dump (sonic-net/sonic-platform-daemons#29)
…ic-net#3333) [sonic-platform-common] [sonic_sfp] Interpret sff 'int' element =0 as valid value (sonic-net/sonic-platform-common#51) add more error code to get_transceiver_change_event ((sonic-net/sonic-platform-common#50) [sonic_platform_base] support new-platform-api-based daemons ((sonic-net/sonic-platform-common#48) sync change to sonic_platform_base/sonic_sfp and create symbol link ((sonic-net/sonic-platform-common#49) Add parser support for Tx_RxLos,TxFault, PowerControl, ResetStatus in sff8436.py ((sonic-net/sonic-platform-common#45) readd type_abbrv_name in sonic_sfp/sff8436.py ((sonic-net/sonic-platform-common#44) [psu_base] get_status_led() returns current state of the status LED ((sonic-net/sonic-platform-common#39) Fix abbrv name for OSFP ((sonic-net/sonic-platform-common#36) [sff8436] support "Control Bytes" and "Options" ((sonic-net/sonic-platform-common#38) sonic_sfp: avoid possible key error in get_physical_to_logical() ((sonic-net/sonic-platform-common#37) [sonic-platform-daemons] [xcvrd] Enhance xcvrd to handle new system level event/error (sonic-net/sonic-platform-daemons#39) [xcvrd] Support both new platform API and old platform plugins (sonic-net/sonic-platform-daemons#38) [psud] Support both new platform API and old platform plugins (sonic-net/sonic-platform-daemons#37) [syseepromd] Support both new platform API and old platform plugins (sonic-net/sonic-platform-daemons#36) Add missing import statemet (sonic-net/sonic-platform-daemons#32) sonic_xcvrd: Support for DOM Threshold values for EEPROM dump (sonic-net/sonic-platform-daemons#29)
function to fetch DOM threshold info "post_port_dom_threshold_info_to_db" is not called in "dom_info_update_task", so DOM threshokd info will be missing from the DB. Added call to "post_port_dom_threshold_info_to_db" signned-off-by [email protected]
Extend the return of the function to make the function can return some system-level event/error.
like the system not ready, the system becomes ready and the system fails.
By getting these new events upper layer apps(xcvrd) will have more awareness of the system status and handle accordingly. These events are not mandatory, vendors can choose to not implement this and xcvrd will not be impacted.