-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Pddf_support_dell_platforms: Add PDDF support for s52xx dell platforms. #18849
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
base: master
Are you sure you want to change the base?
Pddf_support_dell_platforms: Add PDDF support for s52xx dell platforms. #18849
Conversation
@srideepDell Please review the PR. |
@lguohan @zhangyanzhao -- please assign @srideepDell , @rvasanthm , @thaj-deen , @vpsubramaniam , @arunlk-dell to review this Dell platform PR. Also, @FuzailBrcm and @leeprecy from Broadcom, who have expertise in PDDF. Thanks! |
@jeff-yin , no need to assign. please have reviewer to sign off, then we can merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the UT logs, Hardware Revision is displayed as "N/A". Could you please check it?.
Also, please attach sonic-mgmt test results.
@leeprecy @geans-pin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you please use https://github.com/sonic-net/sonic-buildimage/blob/master/platform/broadcom/sonic-platform-modules-dell/common/ipmihelper.py instead of redefining ipmihelper in each platform.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why switch_board_sfp/ switch_board_qsfp is not deinitialized like it is done for other platforms?.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are done as part of s52xxf_platform.sh under deinitialized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
media_down is not used in platform init file. Check the same for all the platform init files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implemented changes similar to other platform init files.
@@ -128,8 +128,7 @@ switch_board_led_default() { | |||
install_python_api_package() { | |||
device="/usr/share/sonic/device" | |||
platform=$(/usr/local/bin/sonic-cfggen -H -v DEVICE_METADATA.localhost.platform) | |||
|
|||
pip3 install $device/$platform/sonic_platform-1.0-py3-none-any.whl | |||
rv=$(pip3 install $device/$platform/sonic_platform-1.0-py3-none-any.whl --force-reinstall -q --root-user-action=ignore) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why --force-reinstall option and --root-user-action rules added here?.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return value rv is unused here.
@@ -0,0 +1,125 @@ | |||
#!/usr/bin/env python |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should it be python or python3 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be Python, ensures that the script is executed with the Python interpreter found in the user’s environment, regardless of where Python is installed on the system.
|
||
return True | ||
|
||
def main(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see main is dummy. is that fine ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine and serving as a placeholder.
@@ -31,40 +31,75 @@ override_dh_auto_build: | |||
python3 -m build --wheel --no-isolation --outdir $(MOD_SRC_DIR)/$${mod}/modules; \ | |||
cd $(MOD_SRC_DIR); \ | |||
elif [ $$mod = "z9264f" ]; then \ | |||
cp $(COMMON_DIR)/dell_fpga_ocores.c $(MOD_SRC_DIR)/$${mod}/modules/dell_z9264f_fpga_ocores.c; \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the change here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the change here ?
No change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you remove this from diff then ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure
e2939e9
to
b1ef642
Compare
dd59ad1
to
1626173
Compare
Changed to use from the common folder. |
I have ran sonic-mgmt test for the dell platforms in pddf mode and added required function as part of sonic-mgmt test. Also addressed review comments. Attaching latest UT logs and sonic-mgmt test case report. Some of the test cases are failed due to name mismatch from the platform.json which will resolved in the future enhancements whenever newer pddf updates. Platforms s5232f and s5248f does not have platform.json. s5248f will have platform.json from https://github.com/sonic-net/sonic-buildimage/pull/20287/files and s5232f will have platform.json in future updates. s5212f_logs.txt |
/azpw ms_conflict |
@@ -0,0 +1,16 @@ | |||
#!/bin/bash | |||
sys_eeprom "delete_device" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
following four are not defined in the script
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These functions are not used in pddf mode, hence removed from the script.
/azp run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
{ "attr_name":"psu_i_in", "bmc_cmd":"ipmitool sensor reading PSU2_In_amp", "raw":"0", "field_name" : "PSU2_In_amp", "separator":"|", "field_pos":"2", "mult":"1000"}, | ||
{ "attr_name":"psu_fan1_speed_rpm", "bmc_cmd":"ipmitool sensor reading PSU2_rpm", "raw":"0", "field_name" : "PSU2_rpm", "separator":"|", "field_pos":"2", "mult":"1"}, | ||
{ "attr_name":"psu_temp1_input", "bmc_cmd":"ipmitool sensor reading PSU2_temp", "raw":"0", "field_name" : "PSU2_temp", "separator":"|", "field_pos":"2", "mult":"1000"}, | ||
{ "attr_name":"psu_fan_dir", "bmc_cmd":"ipmitool raw 0x3a 0x3 0x14 0x0b", "raw": "1", "type":"mask", "mask":"0x1"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
platform api test cases expects psu_temp1_high_threshold also here. I see it is not added to any platform
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In platforms api tests, when PSU sensors read Temperature 30.0 of PSU 0 is over the threshold 0.0, Temperature 0.0 of PSU 1 is over the threshold 0.0.
As the thresholds are not configured and set to 0. In future when thresholds are configured, need to update expected values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
threshold 0.0 is returned from platform api tests when it is not able to find psu_temp1_high_threshold. You need to add psu_temp1_high_threshold to pddf-device.json with approriate bmc commad to get it .
I added it as below for s5448 .
{ "attr_name":"psu_temp1_high_threshold", "bmc_cmd":"ipmitool sensor", "raw":"0", "field_name":"PSU1_AF_temp", "separator":"|", "field_pos":"9", "mult":"1000"}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those are added as part of temperature sensor with different attributes names in the platforms.
TEMP7":
{
"dev_info": { "device_type":"TEMP_SENSOR"},
"dev_attr": { "display_name":"PSU1 Airflow Sensor"},
"bmc": {
"ipmitool" : {
"attr_list":
[
{ "attr_name":"temp1_high_crit_threshold", "bmc_cmd":"ipmitool raw 0x04 0x27 0x07 | cut -d ' ' -f 7", "raw":"1", "type":"raw"},
{ "attr_name":"temp1_high_threshold", "bmc_cmd":"ipmitool raw 0x04 0x27 0x07 | cut -d ' ' -f 6", "raw":"1", "type":"raw"},
{ "attr_name":"temp1_input", "bmc_cmd":"ipmitool sensor reading PSU1_AF_temp", "raw":"0", "field_name" : "PSU1_AF_temp", "separator":"|", "field_pos":"2", "mult":"1"},
{ "attr_name":"temp1_low_threshold", "bmc_cmd":"ipmitool raw 0x04 0x27 0x07 | cut -d ' ' -f 4", "raw":"1", "type":"raw"}
]
}
}
},
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
psu_temp1_high_threshold is to be added for all PSUs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, psu_temp1_high_threshold already added for all the PSU's in the platforms. In the current platform number of temperature sensor are 8 and PSU temperature sensors are TEMP7 and TEMP8.
@lguohan could you please approve the PR? It has already been approved by three reviewers, but it still shows that a review is required from a reviewer with write access. It's been pending for a long time. |
Hey @arun1355492, I have tested these changes on my 5248F-25G switch and noticed that after enabling PDDF
And I'm unable to get any information about DACs/SFPs. Without these changes everything is working fine, tested with 202405 branch. EDIT: Just rebuilt with latest 202405, I still see those warnings, but they stop after some time 🤷♂️ Will play around a bit more. |
let me check the issue on 5248F-25G platform. |
Also we noticed that
we're testing 5248F platform here as well |
Why I did it
Add PDDF support for the dell s52xx platforms.
How I did it
Add PDDF configuration files, scripts and python files.
How to verify it
To switch to PDDF mode run the below command and wait for the system to be ready.
pddf_util.py -d switch-pddf
Run the PDDF commnads
systemctl | grep -i pddf
pddf_fanutil direction
pddf_fanutil getspeed
pddf_fanutil numfans
pddf_fanutil status
pddf_psuutil mfrinfo
pddf_psuutil numpsus
pddf_psuutil seninfo
pddf_psuutil status
pddf_thermalutil gettemp
pddf_thermalutil numthermals
pddf_ledutil getstatusled SYS_LED
pddf_ledutil getstatusled FAN_LED
pddf_ledutil getstatusled FANTRAY1_LED
pddf_ledutil getstatusled FANTRAY2_LED
pddf_ledutil getstatusled FANTRAY3_LED
pddf_ledutil getstatusled FANTRAY4_LED
Note: To switch back to non PDDF mode check help on pddf_util.py -help
Unit Test results:
s5232f_pddf_logs.txt
s5248f_pddf_logs.txt
s5296_pddf_logs.txt
s5212f_pddf_logs.txt
s5224f_pddf_logs.txt
A picture of a cute animal (not mandatory but encouraged)