[sfputilbase] Extend get_transceiver_change_event return event#50
[sfputilbase] Extend get_transceiver_change_event return event#50jleveque merged 5 commits intosonic-net:masterfrom keboliu:extend-sfp-change-event
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.
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.
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]
… 202412 (sonic-net#50) ```<br>* f93b69c - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-platform-common into 202412 (2025-03-05) [Sonic Automation] * f679a67 - (origin/202411) Restore optoe page to default 0 for active cables (sonic-net#550) (2025-03-04) [mssonicbld] * c735073 - [202411][cmis] Fix cmis.get_error_description speed for passive module (sonic-net#538) (2025-02-12) [Aryeh Feigin] * b7e75d8 - Add 800G innolight PNs (sonic-net#540) (2025-02-07) [mssonicbld]<br>```
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.