Add PCIe config file of DX010 and E1031#4724
Merged
sujinmkang merged 1 commit intosonic-net:masterfrom Jun 25, 2020
Merged
Conversation
Collaborator
|
retest mellanox please |
sujinmkang
approved these changes
Jun 8, 2020
lguohan
reviewed
Jun 8, 2020
| dev: 1f | ||
| fn: '3' | ||
| id: 1f3c | ||
| name: 'SMBus: Intel Corporation Atom processor C2000 PCU SMBus' |
Collaborator
There was a problem hiding this comment.
do we have a checker for this file?
Contributor
Author
|
reset please |
Contributor
Author
|
yes, I have checked it, actually , It was generated by the PCIe tool |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What I did
Make a PCIe Diag tool for SONiC. This tool including two commands.
Commands added:
show platform pcieinfo-----> Show current device PCIe infoshow platform pcieinfo -c-----> Check whether the PCIe info is correctHow I did it
Add pcieutil moudle in sonic-utilities:
Location: sonic-utilities/pcieutil/main.py
Function: The main function will import the common API pcie_common.py and distinguish current platform
get_platform_and_hwsku()Return the platform path like :
/usr/share/sonic/device/$PLATFORM/pluginsAdd common API in pcie_common.py:
Location: sonic_platform_base/sonic_pice/pcie_common.py
Function: This file is used to fulfill the main interfaces including functions
get_pcie_device()Getting current pcie info of the device;
get_pcie_check()Compare the pcie info it got currently with pcie.yaml
dump_conf_yaml()This function is used to generate pcie.yaml which used to record the original pcie info.Also you can make the pcie.yaml manually but should follow the format;
The pcie.yaml file
location: /usr/share/sonic/device/$PLATFORM/plugins/pcie.yaml
Function:
Used to record the original PCIe info of the device;
Used as a criterion for judging whether the PCIe info we get is correct or not;
how to generate this file?
Two methods:
pcieutil pcie_generateThe pcie.yaml is under different path due to different platforms.
The common API will load the config file to compare with PCIe info of current device.If not found, will raise a system warning and exit
How should different platform designer do if they need to use this tool.
Just add a pcie.yaml under the config file path
You can get a general config file and the file path by running command
pcieutil pcie_generatebut when you do that ,make sure the PCIe config info is correct
New command output
root@sonic:~# show platform pcieinfo==============================Display PCIe Device===============================......bus:dev.fn 01:00.0 - dev_id=0xb960, Ethernet controller: Broadcom Limited Device b960bus:dev.fn 01:00.1 - dev_id=0xb960, Ethernet controller: Broadcom Limited Device b960root@sonic:~# show platform pcieinfo -c===============================PCIe Device Check================================Error: [Errno 2] No such file or directory: '/usr/share/sonic/device/x86_64-cel_seastone-r0/plugins/pcie.yaml'Not found config file, please add a config file manually, or generate it by running [pcieutil pcie_generate]root@sonic:~# pcieutil pcie_generateAre you sure to overwrite config file pcie.yaml with current pcie device info? [y/N]: ygenerate config file pcie.yaml under path /usr/share/sonic/device/x86_64-cel_seastone-r0/pluginsroot@sonic:~# show platform pcieinfo -c===============================PCIe Device Check================================......PCI Device: Ethernet controller: Broadcom Limited Device b960 ------------------ [Passed]PCI Device: Ethernet controller: Broadcom Limited Device b960 ------------------ [Passed]PCIe Device Checking All Test ----------->>> PASSEDroot@sonic:~# show platform pcieinfo -c===============================PCIe Device Check================================......PCI Device: Ethernet controller: Broadcom Limited Device b960 ------------------ [Failed]PCI Device: Ethernet controller: Broadcom Limited Device b960 ------------------ [Passed]PCIe Device Checking All Test ----------->>> FAILED