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

[sfputilbase] Extend get_transceiver_change_event return event #50

Merged
merged 5 commits into from
Aug 6, 2019
Merged

[sfputilbase] Extend get_transceiver_change_event return event #50

merged 5 commits into from
Aug 6, 2019

Conversation

keboliu
Copy link
Collaborator

@keboliu keboliu commented Aug 1, 2019

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.

: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',

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.

Copy link
Collaborator

@stephenxs stephenxs Aug 2, 2019

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.

@jleveque jleveque merged commit e079b09 into sonic-net:master Aug 6, 2019
jleveque pushed a commit to sonic-net/sonic-buildimage that referenced this pull request Aug 14, 2019
[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)
wangshengjun pushed a commit to wangshengjun/sonic-buildimage that referenced this pull request Nov 16, 2020
…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)
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.

6 participants