feat(rdc): add RDC_FI_AFID field + unit tests#8527
Open
dmitrii-galantsev wants to merge 2 commits into
Open
Conversation
Add a new RDC field RDC_FI_AFID that reads CPER records directly from the driver via amdsmi_get_gpu_cper_entries() and decodes the AMD Field ID(s) with amdsmi_get_afids_from_cper(). The field is reported as a STRING of comma-separated <afid>:<severity> pairs (severity one of FATAL / CORRECTED / UNCORRECTED), or N/A when the ring is empty. This lets users read AFIDs as a normal RDC field (rdci dmon -e AFID) without first configuring a CPER dump folder via amd-smi, and intentionally omits the service-action-guide text so only the AFID number and severity are surfaced. Signed-off-by: Brian Chang <brichang@amd.com>
Cover the RDC_FI_AFID field wiring in the pure-logic rdc_codec_tests binary: stable enum id (680), descriptor metadata (label AFID, displayed), name/label to id resolution, field_id_string, and placement in the reserved RAS/CPER id gap. These guard the registration the CLI and telemetry layer depend on; the live CPER decode is covered separately by hardware integration testing.
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.
Summary
Rebases #7728 (RDC_FI_AFID field decoding AFID + severity from the driver CPER ring) on top of the CPX/flat-GPU-table branch, and adds unit tests for it.
This is a stacked PR: it targets
users/dgalants/rdc-cpx-and-profiler-sample-timeso the diff shown is only the AFID delta. The AFID feature commit is unchanged from #7728 (authored by @brichang) apart from a Conventional-Commits subject rewrite.Relates to #7728.
Commits
feat(rdc): add RDC_FI_AFID field decoding AFID+severity from CPER ring— the feature from [rdc] Add RDC_FI_AFID field decoding AFID + severity from the CPER ring #7728 (author: Brian Chang).test(rdc): add unit tests for RDC_FI_AFID field registration— new.Tests
New
test_afid_field.cc(6 cases) folded into the GPU-lessrdc_codec_testsbinary (links onlylibrdc_bootstrap, where the field descriptor table lives). It guards the field wiring, which fails silently if a field is added tordc.hbut missed in one of therdc_field.dataexpansions:is_field_validaccepts AFID, rejectsRDC_FI_INVALIDAFID, non-empty description,do_displayget_field_id_from_name, plus a negative casefield_id_stringreturns the labelRDC_FI_ECC_LAST< 680 < 700)The live CPER decode in
get_afid()needs a GPU with RAS records, so it is covered by hardware validation rather than unit tests.Test plan
rdc_codec_tests11/11,rdc_unit_tests7/7,ctest2/2 from the build root.rdc_codec_tests11/11,rdc_unit_tests7/7. Exercised the exactget_afid()flow across all 8 GPUs and cross-checkedamd-smi ras --cper: with root the CPER ring is empty on healthy hardware so the field correctly returnsN/A; without root the API returnsAMDSMI_STATUS_NO_PERMandget_afidpropagates the error (RDC runs as root in production). No RAS errors were injected.Signed-off-by: Galantsev, Dmitrii dmitrii.galantsev@amd.com