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

Add 'device', 'no-zero' options for pcie-aer sub commands #720

Merged
merged 2 commits into from
Jan 5, 2021

Conversation

ArunSaravananBalachandran
Copy link
Contributor

  • Add 'device', 'no-zero' options for pcie-aer sub commands
  • Change key format for PCIe device in STATE DB

@sujinmkang
Copy link
Collaborator

@ArunSaravananBalachandran can we have an example of non-zero option case? can we have non-zero information display as default and display all device-id information with "-verbose" option?

@sujinmkang sujinmkang self-requested a review December 15, 2020 22:53
@ArunSaravananBalachandran
Copy link
Contributor Author

@ArunSaravananBalachandran can we have an example of non-zero option case? can we have non-zero information display as default and display all device-id information with "-verbose" option?

@sujinmkang, please find below the sample output with and without using non-zero option

root@sonic:/home/admin# pcieutil pcie-aer correctable
+---------------------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+
| AER - CORRECTABLE   |   00:01.0 |   00:02.0 |   00:03.0 |   00:04.0 |   00:0f.0 |   00:13.0 |   00:14.0 |   00:14.1 |   00:14.2 |   01:00.0 |   01:00.1 |
|                     |    0x1f10 |    0x1f11 |    0x1f12 |    0x1f13 |    0x1f16 |    0x1f15 |    0x1f41 |    0x1f41 |    0x1f41 |    0xb960 |    0xb960 |
+=====================+===========+===========+===========+===========+===========+===========+===========+===========+===========+===========+===========+
| RxErr               |         0 |         0 |         0 |         0 |         0 |         0 |         0 |         0 |         0 |         0 |         1 |
+---------------------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+
| BadTLP              |         0 |         0 |         0 |         0 |         0 |         0 |         0 |         0 |         0 |         0 |         0 |
+---------------------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+
| BadDLLP             |         0 |         0 |         0 |         0 |         0 |         0 |         0 |         0 |         0 |         0 |         0 |
+---------------------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+
| Rollover            |         0 |         0 |         0 |         0 |         0 |         0 |         0 |         0 |         0 |         0 |         0 |
+---------------------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+
| Timeout             |         0 |         0 |         0 |         0 |         0 |         0 |         0 |         0 |         0 |         0 |         0 |
+---------------------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+
| NonFatalErr         |         0 |         0 |         0 |         0 |         0 |         0 |         0 |         0 |         0 |         0 |         0 |
+---------------------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+
| CorrIntErr          |         0 |         0 |         0 |         0 |         0 |         0 |         0 |         0 |         0 |         0 |         0 |
+---------------------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+
| HeaderOF            |         0 |         0 |         0 |         0 |         0 |         0 |         0 |         0 |         0 |         0 |         0 |
+---------------------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+
| TOTAL_ERR_COR       |         0 |         0 |         0 |         0 |         0 |         0 |         0 |         0 |         0 |         0 |         1 |
+---------------------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+
root@sonic:/home/admin#
root@sonic:/home/admin# pcieutil pcie-aer correctable -nz
+---------------------+-----------+
| AER - CORRECTABLE   |   01:00.1 |
|                     |    0xb960 |
+=====================+===========+
| RxErr               |         1 |
+---------------------+-----------+
| TOTAL_ERR_COR       |         1 |
+---------------------+-----------+
root@sonic:/home/admin# 

Sure, we can have non-zero output as default

@ArunSaravananBalachandran
Copy link
Contributor Author

@sujinmkang, please find below the updated behavior based on the comments provided and request your review on the same:

root@sonic:/home/admin# pcieutil pcie-aer all --help
Usage: pcieutil pcie-aer all [OPTIONS]

  Show all PCIe AER attributes
  (Default: Display only non-zero attributes)

Options:
  -d, --device <BUS>:<DEV>.<FN>  Display stats only for the specified device
  -v, --verbose                  Display all stats
  --help                         Show this message and exit.
root@sonic:/home/admin#

@sujinmkang sujinmkang merged commit 950bfa0 into sonic-net:master Jan 5, 2021
@ArunSaravananBalachandran ArunSaravananBalachandran deleted the pcie_aer branch January 6, 2021 13:12
sujinmkang pushed a commit to sonic-net/sonic-platform-daemons that referenced this pull request Jan 26, 2021
In pcied, added support to collect AER stats belonging to different severities for AER supported PCIe devices and update it in STATE_DB.

The key used to represent a PCIE device for storing its AER stats in STATE_DB is of the format PCIE_DEVICE|<Bus>:<Dev>.<Fn>.
For every device, AER stats will be stored as key, value pairs where key is of the format <severity>|<AER Error type> and the device ID will be stored with key id.

HLD: sonic-net/SONiC#678, sonic-net/SONiC#720
Depends on: sonic-net/sonic-platform-common#144
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants