Merged
Conversation
jleveque
suggested changes
Nov 18, 2019
Comment on lines
+122
to
+127
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
Contributor
There was a problem hiding this comment.
Please remove these trailing empty lines
sujinmkang
previously approved these changes
Jan 24, 2020
sujinmkang
reviewed
Jan 24, 2020
Contributor
sujinmkang
left a comment
There was a problem hiding this comment.
@carycelestica can you please remove the empty line as Joe mentioned?
after removing the empty line I will approve this change again.
Contributor
Author
|
I have removed the empty line already |
Contributor
|
@carycelestica can you please rebase ? |
sujinmkang
approved these changes
Jun 8, 2020
oleksandrivantsiv
pushed a commit
to oleksandrivantsiv/sonic-platform-common
that referenced
this pull request
Oct 25, 2024
* platform daemon (Xcvrd, Ledd) changes for multi asic platform * Updates in ledd daemon to use namespaces and get the namespace from selector object. * Updates to xcvrd daemon to use the asic_id in talking to the right DB. * Updated based on new sonic-py-common API's * Invoke initializeGlobalConfig() in the SfpUpdate/DomInfoUpdate processes as well.
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-platform-common
that referenced
this pull request
May 7, 2025
… 202412 (sonic-net#64) ```<br>* c64e7e8 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-platform-common into 202412 (2025-03-12) [Sonic Automation] * f679a67 - (origin/202411) Restore optoe page to default 0 for active cables (sonic-net#550) (2025-03-04) [mssonicbld] * c735073 - [202411][cmis] Fix cmis.get_error_description speed for passive module (sonic-net#538) (2025-02-12) [Aryeh Feigin] * b7e75d8 - Add 800G innolight PNs (sonic-net#540) (2025-02-07) [mssonicbld]<br>```
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