sonic_xcvrd: Support for DOM Threshold values for EEPROM dump#29
sonic_xcvrd: Support for DOM Threshold values for EEPROM dump#29jleveque merged 6 commits intosonic-net:masterfrom
Conversation
sonic-xcvrd/scripts/xcvrd
Outdated
| ('tx2power', dom_info_dict['tx2power']), | ||
| ('tx3power', dom_info_dict['tx3power']), | ||
| ('tx4power', dom_info_dict['tx4power']), | ||
| ('temphighalarm', dom_info_dict['temphighalarm']), |
There was a problem hiding this comment.
I would suggest separating below to entries into two parts, for the constant entries, we only fetch them one time at the starting of the xcvrd as port_info, for the variable ones fetch them periodically with other DOM entries.
There was a problem hiding this comment.
Hi,
Implemented a new function post_port_dom_threshold_info_to_db. This function will be called only during init, New Optic Detection. Dom Info will be called periodically every 1 minute via dom_info_update_task . We are not calling the dom_threshold update here
Thanks
Sridhar.R
There was a problem hiding this comment.
is it still reading the threshold value every time when updating the dom info? only not updated to DB? if yes I would like to suggest not to do it because reading EEPROM is time-consuming, don't want to introduce unnecessarily load.
There was a problem hiding this comment.
is it still reading the threshold value every time when updating the dom info? only not updated to DB? if yes I would like to suggest not to do it because reading EEPROM is time-consuming, don't want to introduce unnecessarily load.
I think this comment is still valid, I suggest to decouple the threshold reading and voltage/power/temp/bias reading, please refer to my comments in another PR.
There was a problem hiding this comment.
Hi @keboliu,
Implemented a new function get_transceiver_dom_threshold_info_dict. This will read only dom threshold.
Removed reading threshold values in existing get_transceiver_dom_info_dict.
Hope this time i have not mis understood your comments.
|
@sridhar-ravindran: Please resolve conflicts. @keboliu: Please review new changes. |
sonic-xcvrd/scripts/xcvrd
Outdated
|
|
||
| post_port_sfp_info_to_db(logical_port_name, int_tbl, stop) | ||
| post_port_dom_info_to_db(logical_port_name, dom_tbl, stop) | ||
| post_port_dom_threshold_info_to_db(logical_port_name, dom_tbl, stop) |
There was a problem hiding this comment.
not quite sure here to use dom_tbl is a good idae, maybe should use int_tbl since the threshold is static if my understanding is correct. @jleveque any comments?
There was a problem hiding this comment.
@jleveque @sridhar-ravindran I have the concern to mix the constant threshold values and the variables in one table. would you please share your view?
There was a problem hiding this comment.
@jleveque I would like to get your view on this.
There was a problem hiding this comment.
In Show command,
a) For dumping SFP info eeprom contents we use int_tbl(TRANSCEIVER_INFO)
b) For dumping DOM info eeprom contents we use dom_tbl (TRANSCEIVER_DOM_SENSOR)
My(@sridhar-ravindran) approach is since the thresholds that we are displaying corresponds to DOM data, i save the threshold information in dom_tbl. So dom thresholds will be displaying along with other dom data (sfpshow eeprom --dom)
Note:As @keboliu suggested, we will read the threshold value only once (since it is static)
We will not read threshold value periodically like dom_data.
@keboliu suggests, since the dom threshold data is static, we can save the threshold in int_tbl(TRANSCEIVER_INFO).
a) Then we will be displaying the dom_threshold data along with SFP info (sfpshow eeprom)
(or)
b) We have to read both int_tbl and dom_tbl to display dom_threshold along with other dom_data (sfpshow eeprom --dom)
We need your inputs which approach to use, save dom_threshold data in dom_tbl or int_tbl?
There was a problem hiding this comment.
I understand both points here. The thresholds are related to DOM data, so it makes more sense to store in dom_tbl. As long as there isn't an efficiency issue here (i.e., we don't needlessly update the threshold values along with the DOM data, then I'm fine with either approach. From @sridhar-ravindran's most recent reply,
@keboliu suggests, since the dom threshold data is static, we can save the threshold in int_tbl(TRANSCEIVER_INFO).
a) Then we will be displaying the dom_threshold data along with SFP info (sfpshow eeprom)
(or)
b) We have to read both int_tbl and dom_tbl to display dom_threshold along with other dom_data (sfpshow eeprom --dom)
I think it makes more sense to store the threshold values in dom_tbl. That way sfpshow eeprom doesn't display threshold data and also we won't have to read from both int_tbl and dom_tbl to display dom_threshold along with other dom_data.
|
Hi @keboliu Thanks |
I unblocked this PR, however, I hope someone else can give comments especially for #29 (comment) |
keboliu
left a comment
There was a problem hiding this comment.
need someone else to review.
|
Hi, |
[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)
This change is added to dump ChannelMonitor Threshold and Module Monitor Threshold values as part of DOM EEPROM dump output.
Added code change in sff8436.py,sfputilshow.py, xcvrd, sfpshow .. etc
Verified the output in following optics
a) AVAGO
b) Finisar
c) DELL
Seeing the following issue of Values not getting dumped properly from day 1
Some channel monitor values are not displayed correctly.
Will raise a seperate issue for that.
Ethernet124: SFP EEPROM detected
Connector: MPOx12
Encoding: 64B66B
Extended Identifier: Power Class 1(1.5W max)
Extended RateSelect Compliance: QSFP+ Rate Select Version 1
Identifier: QSFP+ or later
Length OM3(2m): 50
Nominal Bit Rate(100Mbs): 103
Specification compliance:
10/40G Ethernet Compliance Code: 40GBASE-SR4
Vendor Date Code(YYYY-MM-DD Lot): 2010-09-01
Vendor Name: AVAGO
Vendor OUI: 00-17-6a
Vendor PN: AFBR-79E4Z-D
Vendor Rev: 01
Vendor SN: QA340092
ChannelMonitorValues:
RX1Power: -16.3827dBm
RX2Power: -infdBm <<<<<<<<<<<<<<<<<<<<<<
RX3Power: -15.5284dBm
RX4Power: -infdBm <<<<<<<<<<<<<<<<<<<<<<<
TX1Bias: 5.9720mA
TX2Bias: 5.3740mA
TX3Bias: 5.3800mA
TX4Bias: 6.0540mA