xrt-smi: treat unsupported telemetry ioctl as optional in the caller#9907
Open
Scottcjn wants to merge 1 commit into
Open
xrt-smi: treat unsupported telemetry ioctl as optional in the caller#9907Scottcjn wants to merge 1 commit into
Scottcjn wants to merge 1 commit into
Conversation
Older amdxdna drivers do not implement the telemetry GET_INFO query and return EOPNOTSUPP from the aie2_get_info default case, or ENOTTY if the ioctl is not registered. Handle that here in info_telemetry instead of in the amdxdna shim, so the shim keeps returning the raw errno and the caller decides whether the query is optional. aie2_telemetry_info now keeps whatever it already collected and skips the rest quietly on EOPNOTSUPP/ENOTTY, and still surfaces any other error including EINVAL so real failures are not hidden. aie2_preemption_info gets the same handling since it uses the same rtos_telemetry query and would otherwise still throw on an old driver. Signed-off-by: Scott <scottbphone12@gmail.com>
Contributor
|
clang-tidy review says "All clean, LGTM! 👍" |
Author
|
All checks except apu-package-build are passing and that one looks blocked on the bot authorization step rather than the change itself. Could an admin add the build label when you get a chance? Happy to fix anything the full pipeline turns up. |
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.
Follow-up to amd/xdna-driver#1449.
That PR skipped optional telemetry in the amdxdna shim. The review there asked for the shim to faithfully return the ioctl error and let the caller decide whether the query is optional, so I am withdrawing the shim change and moving the decision here.
aie2_telemetry_info and aie2_preemption_info now treat only EOPNOTSUPP and ENOTTY as telemetry not available, which is what aie2_get_info returns from its default case on an older amdxdna driver (or if the get_aie_info op is absent). Any other error including EINVAL is still surfaced so real failures are not hidden. aie2_preemption_info uses the same rtos_telemetry query, so it gets the same handling and no longer throws on an old driver.
No shim change is needed. ReportTelemetry already reads every field through get_child with an empty fallback, so an empty or partial telemetry tree renders fine.