[Ufispace][PDDF] Add support for S9300-32D platform#14922
[Ufispace][PDDF] Add support for S9300-32D platform#14922lguohan merged 2 commits intosonic-net:masterfrom linyutsung:master
Conversation
|
@FuzailBrcm pls help review |
|
sync with latest master and reopen, please help to review |
| try: | ||
| # The index will start from 1 | ||
| # sfputil already convert to physical port index according to config | ||
| sfp = self._sfp_list[index] |
There was a problem hiding this comment.
Please check this once again. Generally, the index passed down from 'xcvrd' to chassis.py is 1 based. So, to get the required sfp obj from _sfp_list, you need to do 'index-1'.
There was a problem hiding this comment.
Please check this once again. Generally, the index passed down from 'xcvrd' to chassis.py is 1 based. So, to get the required sfp obj from _sfp_list, you need to do 'index-1'.
I take back my comment. I just checked your port_config.ini and that is using 0-based indexing. So no requirement of 'index-1'. However, this function is not required then as the parent class 'chassis_base.py' provide the same definition.
There was a problem hiding this comment.
Yes, you're right, the definition is duplicated, will update it.
| status = True if (speed != 0) else False | ||
| return status | ||
|
|
||
| def get_target_speed(self): |
There was a problem hiding this comment.
target speed is the speed intended from the duty-cycle (or pwm) setting. I can understand of the PSU-fan intended speed is fixed but how can System fan target_speed is fixed at 65%?
Are you not supporting fan speed variations?
There was a problem hiding this comment.
Since the platform doesn't support pwm setting and the fan speed is controlled by ucd accroding to thermal sensor. Is that ok to set the target speed to crrent speed percentage to avoid warning ?
|
|
||
| return direction | ||
|
|
||
| def get_presence(self): |
There was a problem hiding this comment.
This implementation is pretty similar to the one present in pddf_fan.py. Can you double check why you had to overwrite that def with this one?
There was a problem hiding this comment.
Currently, the base always set the psu fan presence to true which is FRU in our platform. So we overwrite it to dectect PSU presence as for psu fan presence.
| { | ||
| "capability": | ||
| { | ||
| "ro": ["SYS_LED", "FAN_LED", "PSU1_LED", "PSU2_LED"], |
There was a problem hiding this comment.
This 'rw' or 'ro' flags are supported in pddf-device.json structure now. Please check this example below,
"LOC_LED":
{
"dev_info": { "device_type":"LED", "device_name":"LOC_LED"},
"dev_attr": { "index":"0", **"flag": "rw"**},
"i2c" :
{
"attr_list":
[
{"attr_name":"blue_blink", "descr": "" , "bits" : "5:0", "value" : "0x27", "swpld_addr" : "0x60", "swpld_addr_offset" : "0x25"},
You can make use of this provision.
There was a problem hiding this comment.
Thanks for your kindly notification, will update this
2. use flag to set led w/o in device config instead of validation in API. 3. update led color from amber to yellow 4. set fan target speed to current speed
|
@FuzailBrcm update commited and pass the check, pls help to review, thanks |
Changes look good to me. Approved. |
|
@lguohan FuzailBrcm has reviewed and approved, please help to merge, thanks |
|
@lguohan please help to merge, thanks |
Related work items: sonic-net#94, sonic-net#13789, sonic-net#14149, sonic-net#14515, sonic-net#14788, sonic-net#14922, sonic-net#14933, sonic-net#15284, sonic-net#15383, sonic-net#15464, sonic-net#15519, sonic-net#15521, sonic-net#15575, sonic-net#15636, sonic-net#15652, sonic-net#15684, sonic-net#15708, sonic-net#15725, sonic-net#15739, sonic-net#15755, sonic-net#15756, sonic-net#15757
Signed-off-by: linyutsung [email protected]
Why I did it
Add PDDF support on Ufispace S9300-32D with Broadcom ASIC
How I did it
Add PDDF configuration files, scripts and python files
How to verify it
Run pddf commands and show command
root@sonic:~# pddf_psuutil status PSU Status ----- -------- PSU1 OK PSU2 NOT OK root@sonic:~# pddf_thermalutil gettemp Temp Sensor Value ---------------- ------- Temp_CPU_PECI temp1 +48.0 C (high = +95.0 C, crit = +100.0 C) Temp_CPU_ENV temp1 +43.0 C (high = +85.0 C, crit = +90.0 C) Temp_CPU_ENV2 temp1 +43.0 C (high = +70.0 C, crit = +80.0 C) Temp_MAC_ENV temp1 +46.0 C (high = +85.0 C, crit = +90.0 C) Temp_MAC_DIE temp1 +54.0 C (high = +100.0 C, crit = +105.0 C) Temp_CAGE temp1 +43.0 C (high = +85.0 C, crit = +90.0 C) Temp_PSU_CONNTOR temp1 +41.0 C (high = +65.0 C, crit = +70.0 C) root@sonic:~# pddf_ledutil getstatusled SYS_LED green root@sonic:~# show interfaces transceiver presence Port Presence ----------- ----------- Ethernet0 Present Ethernet8 Not present Ethernet16 Not present Ethernet24 Not present Ethernet32 Not present Ethernet40 Not present Ethernet48 Not present Ethernet56 Not present Ethernet64 Not present Ethernet72 Not present Ethernet80 Not present Ethernet88 Not present Ethernet96 Not present Ethernet104 Not present Ethernet112 Not present Ethernet120 Not present Ethernet128 Not present Ethernet136 Not present Ethernet144 Not present Ethernet152 Not present Ethernet160 Not present Ethernet168 Not present Ethernet176 Not present Ethernet184 Not present Ethernet192 Not present Ethernet200 Not present Ethernet208 Not present Ethernet216 Not present Ethernet224 Not present Ethernet232 Not present Ethernet240 Not present Ethernet248 Present Ethernet256 Not present Ethernet257 Present root@sonic:~# show platform fan Drawer LED FAN Speed Direction Presence Status Timestamp -------- ----- ---------- ------------------- ----------- ---------- -------- ----------------- Fantray1 green Fantray1_1 56% INTAKE Present OK 20230503 21:38:00 Fantray1 green Fantray1_2 56% INTAKE Present OK 20230503 21:38:00 Fantray2 green Fantray2_1 55% INTAKE Present OK 20230503 21:38:00 Fantray2 green Fantray2_2 56% INTAKE Present OK 20230503 21:38:00 Fantray3 green Fantray3_1 55% INTAKE Present OK 20230503 21:38:00 Fantray3 green Fantray3_2 55% INTAKE Present OK 20230503 21:38:00 Fantray4 green Fantray4_1 55% INTAKE Present OK 20230503 21:38:00 Fantray4 green Fantray4_2 56% INTAKE Present OK 20230503 21:38:00 Fantray5 green Fantray5_1 55% INTAKE Present OK 20230503 21:38:00 Fantray5 green Fantray5_2 55% INTAKE Present OK 20230503 21:38:00 Fantray6 green Fantray6_1 57% INTAKE Present OK 20230503 21:38:00 Fantray6 green Fantray6_2 55% INTAKE Present OK 20230503 21:38:00 N/A N/A PSU1_FAN1 70% EXHAUST Present OK 20230503 21:38:00 N/A N/A PSU2_FAN1 0% EXHAUST Present Not OK 20230503 21:38:00Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)