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

202012 thermal fix #12

Open
wants to merge 58 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
32e6ecb
[BFN] Updated platform APIs impl
Nov 18, 2021
24bbb90
Extended BFN platform SFP APIs implementation
Nov 25, 2021
cb13424
Update sfp.py
Dec 3, 2021
384b36a
[BFN] Extended SFP platform plugin implementation
Dec 1, 2021
c6693ad
[BFN] Extended Fans platform plugin implementation
KostiantynYarovyiBf Dec 3, 2021
71abb28
[BFN] divided classes Fan and FanDrawer into 2 files
KostiantynYarovyiBf Dec 3, 2021
700f957
Signed-off-by: Vadym Yashchenko <[email protected]>
VadymYashchenko Dec 3, 2021
bfbffed
Add get_presence() function and revised __get() function
VadymYashchenko Dec 3, 2021
d2cfec7
[BFN] Updated PSU platform APIs impl
dmytroxIntel Dec 3, 2021
b37f657
Added BFN PSU cache (#9)
Dec 10, 2021
365e7ea
[BFN] Fans and Fantray platform APIs update (#7)
KostiantynYarovyiBf Dec 10, 2021
fb7f0f3
[BFN] Updated SFP platform APIs (#10)
vboykox Dec 10, 2021
92cb4d9
[BFN] Updated platform API for thermal (#8)
VadymYashchenko Dec 10, 2021
d4551d5
Revert "[BFN] Fans and Fantray platform APIs update (#7)" (#11)
Dec 10, 2021
3cce13b
Add support health monitor system (#15)
bratashX Dec 13, 2021
ed822a7
Update chassis.py
Dec 13, 2021
1c44794
[BFN] Updated FANs and FAN Tray platform API (#14)
KostiantynYarovyiBf Dec 13, 2021
5d221d3
Fix fix_alignment (#17)
bratashX Dec 13, 2021
c327a51
[BFN] Improvement show environment (#16)
KostiantynYarovyiBf Dec 13, 2021
110f8ab
Added PSU temperature skip into platform.json (#18)
Dec 14, 2021
4836a0a
Do not skip psud on Newport
Dec 14, 2021
708027c
[BFN] fix fan status from Not OK to Ok (#19)
KostiantynYarovyiBf Dec 14, 2021
4541b93
[BFN] Updated SFP platform plugin (#13)
vboykox Dec 15, 2021
5a3a601
[DPB] Fix typo for Ethernet0 2x200G[100G,40G] breakout mode (#21)
mykolaxgerasymenko Dec 15, 2021
9c37644
[barefoot] Tmp fix vendor_rev (#22)
vboykox Dec 15, 2021
d43663d
Fixed python issues in sonic_platform/fan_drawer.py
Dec 16, 2021
cbd35dd
Updated fan_drawer.py
Dec 17, 2021
ff6bd5b
Fixing trailing white spaces in fan_drawer.py
vboykox Dec 21, 2021
ec5afc4
[BFN] Fix thrift for SFPs API
vboykox Dec 21, 2021
1e73127
In platform.json, replaced 'false' with '0' to workaround ast.literal…
Dec 22, 2021
b1aa104
[Newport] Thermal manager (#23)
VadymYashchenko Dec 22, 2021
2a4643e
Revert "In platform.json, replaced 'false' with '0' to workaround ast…
Dec 23, 2021
83751fe
Removed 'controllable' options from platform.json to fix factory defa…
Dec 23, 2021
8b734dc
Update thermal_manager.py
Dec 26, 2021
a06129c
Migrated SFP plugin to sonic_xcvr API (#30)
Jan 13, 2022
89d3ead
Revised set_high_thershold and set_low_thershold methobs in the therm…
VadymYashchenko Jan 31, 2022
f92459b
Revised set_low_thershold and set_high_thershold
VadymYashchenko Feb 2, 2022
c40390e
Added separated files with thermal thresholds, changed platform.json and
VadymYashchenko Feb 8, 2022
e05dd4f
Revised on code revieww
VadymYashchenko Feb 8, 2022
c4334bb
Reverted thermal.py
VadymYashchenko Feb 8, 2022
ab8abac
Revised ther python.py
VadymYashchenko Feb 8, 2022
6a87ebc
Revised due to code review
VadymYashchenko Feb 10, 2022
8429f89
Added fucntion for fix the problem of tofino sensor high critical thr…
VadymYashchenko Feb 14, 2022
6c77453
Revised due to code review
VadymYashchenko Feb 14, 2022
a47f7a5
Revised due to code review
VadymYashchenko Feb 14, 2022
d6856a9
Revised due to code review
VadymYashchenko Feb 14, 2022
bf74cfd
Revised only for cab18-4
VadymYashchenko Feb 17, 2022
9d9a227
Revised default thresholds
VadymYashchenko Feb 18, 2022
fe80359
Revised ther def thresholds
VadymYashchenko Feb 18, 2022
463b36e
Revised on code review
VadymYashchenko Feb 18, 2022
720be48
Revised platform.json and thermal_thresholds.json
VadymYashchenko Feb 25, 2022
cbf2d20
Merge branch 'newport_platform_api' of github.com:akokhan/sonic-build…
VadymYashchenko Mar 8, 2022
1694744
Passed + test: get_model()
VadymYashchenko Mar 16, 2022
03d2172
Added get_rx_power method to sfp.py
VadymYashchenko Mar 16, 2022
6471bd5
Added the same
VadymYashchenko Mar 16, 2022
2f28ebe
Added all methods to SFP class
VadymYashchenko Mar 16, 2022
0c7bd9f
Revised source code for passing of 16 tests
VadymYashchenko Mar 18, 2022
bcadeb1
Solved 16 tests
VadymYashchenko Mar 22, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions device/barefoot/x86_64-accton_as9516_32d-r0/platform.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,45 @@
{
"name": "com_e_driver-i2c-4-33:memory-temp"
},
{
"name": "tmp75-i2c-3-48:chip-temp"
},
{
"name": "tmp75-i2c-3-49:exhaust2-temp"
},
{
"name": "tmp75-i2c-3-4a:exhaust-temp"
},
{
"name": "tmp75-i2c-3-4b:intake-temp"
},
{
"name": "tmp75-i2c-3-4c:tofino-temp"
},
{
"name": "tmp75-i2c-3-4d:intake2-temp"
},
{
"name": "coretemp-isa-0000:package-id-0"
},
{
"name": "coretemp-isa-0000:core-0"
},
{
"name": "coretemp-isa-0000:core-1"
},
{
"name": "coretemp-isa-0000:core-2"
},
{
"name": "coretemp-isa-0000:core-3"
},
{
"name": "psu_driver-i2c-7-59:psu2-temp1"
},
{
"name": "psu_driver-i2c-7-59:psu2-temp2"
},
{
"name": "psu_driver-i2c-7-59:psu2-temp1"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"thermals": [
{
"com_e_driver-i2c-4-33:cpu-temp" : [99.0, 89.0, 11.0, 1.0]
},
{
"com_e_driver-i2c-4-33:memory-temp" : [85.0, 75.0, 11.0, 1.0]
},
{
"tmp75-i2c-3-48:chip-temp" : [90.0, 80.0, 11.0, 1.0]
},
{
"tmp75-i2c-3-49:exhaust2-temp" : [80.0, 70.0, 11.0, 1.0]
},
{
"tmp75-i2c-3-4a:exhaust-temp" : [60.0, 50.0, 11.0, 1.0]
},
{
"tmp75-i2c-3-4b:intake-temp" : [60.0, 50.0, 11.0, 1.0]
},
{
"tmp75-i2c-3-4c:tofino-temp" : [99.0, 89.0, 11.0, 1.0]
},
{
"tmp75-i2c-3-4d:intake2-temp" : [60.0, 50.0, 11.0, 1.0]
},
{
"coretemp-isa-0000:package-id-0" : [80.0, 70.0, 11.0, 1.0]
},
{
"coretemp-isa-0000:core-0" : [99.0, 89.0, 11.0, 1.0]
},
{
"coretemp-isa-0000:core-1" : [99.0, 89.0, 11.0, 1.0]
},
{
"coretemp-isa-0000:core-2" : [99.0, 89.0, 11.0, 1.0]
},
{
"coretemp-isa-0000:core-3" : [99.0, 89.0, 11.0, 1.0]
},
{
"psu_driver-i2c-7-59:psu2-temp1" : [60.0, 50.0, 11.0, 1.0]
},
{
"psu_driver-i2c-7-59:psu2-temp2" : [60.0, 50.0, 11.0, 1.0]
},
{
"psu_driver-i2c-7-59:psu2-temp3" : [60.0, 50.0, 11.0, 1.0]
}
]
}
29 changes: 16 additions & 13 deletions device/barefoot/x86_64-accton_wedge100bf_32x-r0/platform.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,45 +49,51 @@
}
],
"thermals": [
{
"name": "com_e_driver-i2c-4-33:cpu-temp"
},
{
"name": "com_e_driver-i2c-4-33:memory-temp"
},
{
"name": "com_e_driver-i2c-4-33:cpu-temp"
"name": "psu_driver-i2c-7-59:psu2-temp1"
},
{
"name": "pfe1100-i2c-7-59:temp1"
"name": "psu_driver-i2c-7-59:psu2-temp2"
},
{
"name": "pfe1100-i2c-7-59:temp2"
"name": "psu_driver-i2c-7-5a:psu1-temp1"
},
{
"name": "pfe1100-i2c-7-5a:temp1"
"name": "psu_driver-i2c-7-5a:psu1-temp2"
},
{
"name": "pfe1100-i2c-7-5a:temp2"
"name": "tmp75-i2c-3-48:chip-temp"
},
{
"name": "tmp75-i2c-3-48:outlet-middle-temp"
"name": "tmp75-i2c-3-49:exhaust2-temp"
},
{
"name": "tmp75-i2c-3-49:inlet-middle-temp"
"name": "tmp75-i2c-3-4a:exhaust-temp"
},
{
"name": "tmp75-i2c-3-4a:inlet-left-temp"
"name": "tmp75-i2c-3-4b:intake-temp"
},
{
"name": "tmp75-i2c-3-4b:switch-temp"
"name": "tmp75-i2c-3-4c:tofino-temp"
},
{
"name": "tmp75-i2c-3-4c:inlet-right-temp"
"name": "tmp75-i2c-3-4d:intake2-temp"
},
{
"name": "tmp75-i2c-8-48:outlet-right-temp"
},
{
"name": "tmp75-i2c-8-49:outlet-left-temp"
},
{
"name": "pch_haswell-virtual-0:temp1"
},
{
"name": "coretemp-isa-0000:package-id-0"
},
Expand All @@ -102,9 +108,6 @@
},
{
"name": "coretemp-isa-0000:core-3"
},
{
"name": "pch_haswell-virtual-0:temp1"
}
],
"sfps": [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"thermals": [
{
"com_e_driver-i2c-4-33:cpu-temp" : [99.0, 89.0, 11.0, 1.0]
},
{
"com_e_driver-i2c-4-33:memory-temp" : [85.0, 75.0, 11.0, 1.0]
},
{
"psu_driver-i2c-7-59:psu2-temp1" : [50.0, 40.0, 11.0, 1.0]
},
{
"psu_driver-i2c-7-59:psu2-temp2" : [90.0, 80.0, 11.0, 1.0]
},
{
"psu_driver-i2c-7-5a:psu1-temp1" : [50.0, 40.0, 11.0, 1.0]
},
{
"psu_driver-i2c-7-5a:psu1-temp2" : [90.0, 80.0, 11.0, 1.0]
},
{
"tmp75-i2c-3-48:chip-temp" : [90.0, 80.0, 11.0, 1.0]
},
{
"tmp75-i2c-3-49:exhaust2-temp" : [80.0, 70.0, 11.0, 1.0]
},
{
"tmp75-i2c-3-4a:exhaust-temp" : [60.0, 50.0, 11.0, 1.0]
},
{
"tmp75-i2c-3-4b:intake-temp" : [60.0, 50.0, 11.0, 1.0]
},
{
"tmp75-i2c-3-4c:tofino-temp" : [99.0, 89.0, 11.0, 1.0]
},
{
"tmp75-i2c-3-4d:intake2-temp" : [60.0, 50.0, 11.0, 1.0]
},
{
"tmp75-i2c-8-48:outlet-right-temp" : [60.0, 50.0, 11.0, 1.0]
},
{
"tmp75-i2c-8-49:outlet-left-temp" : [60.0, 50.0, 11.0, 1.0]
},
{
"pch_haswell-virtual-0:temp1" : [60.0, 50.0, 11.0, 1.0]
},
{
"coretemp-isa-0000:package-id-0" : [80.0, 70.0, 11.0, 1.0]
},
{
"coretemp-isa-0000:core-0" : [99.0, 89.0, 11.0, 1.0]
},
{
"coretemp-isa-0000:core-1" : [99.0, 89.0, 11.0, 1.0]
},
{
"coretemp-isa-0000:core-2" : [99.0, 89.0, 11.0, 1.0]
},
{
"coretemp-isa-0000:core-3" : [99.0, 89.0, 11.0, 1.0]
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from sonic_platform.fan_drawer import fan_drawer_list_get
from sonic_platform.thermal import thermal_list_get
from eeprom import Eeprom
from sonic_platform.thermal_manager import ThermalManager

from sonic_platform.platform_thrift_client import pltfm_mgr_ready
from sonic_platform.platform_thrift_client import thrift_try
Expand Down Expand Up @@ -40,6 +41,12 @@ def __init__(self):
self.__thermals = None
self.__psu_list = None
self.__sfp_list = None
self.__thermal_mngr = None
self.__polling_thermal_time = 30

self.ready = False
self.phy_port_cur_state = {}
self.qsfp_interval = self.QSFP_CHECK_INTERVAL

self.ready = False
self.phy_port_cur_state = {}
Expand Down Expand Up @@ -111,6 +118,16 @@ def _sfp_list(self):
def _sfp_list(self, value):
pass

@property
def _thermal_mngr(self):
if self.__thermal_mngr is None:
self.__thermal_mngr = ThermalManager(self.__polling_thermal_time)
return self.__thermal_mngr

@_thermal_mngr.setter
def _thermal_mngr(self, value):
self.__thermal_mngr = ThermalManager(value)

def __update_port_info(self):
def qsfp_max_port_get(client):
return client.pltfm_mgr.pltfm_mgr_qsfp_get_max_port()
Expand Down Expand Up @@ -333,3 +350,10 @@ def get_status_led(self):
specified.
"""
return self.system_led

def get_thermal_manager(self):
return self._thermal_mngr

def __del__(self):
if self.__thermal_mngr is not None:
self.__thermal_mngr.stop()
Loading