Skip to content

xrt-smi: treat unsupported telemetry ioctl as optional in the caller#9907

Open
Scottcjn wants to merge 1 commit into
Xilinx:masterfrom
Scottcjn:telemetry-optional-caller
Open

xrt-smi: treat unsupported telemetry ioctl as optional in the caller#9907
Scottcjn wants to merge 1 commit into
Xilinx:masterfrom
Scottcjn:telemetry-optional-caller

Conversation

@Scottcjn

@Scottcjn Scottcjn commented Jul 7, 2026

Copy link
Copy Markdown

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.

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>
@xrt-pr-bot

xrt-pr-bot Bot commented Jul 7, 2026

Copy link
Copy Markdown

⚠️ Authorization Failed

@Scottcjn is not a repository collaborator.

To proceed:

  • XRT Admins: Add the build label to authorize this PR build
  • OR Add @Scottcjn as a repository collaborator

@stsoe
stsoe requested a review from AShivangi July 7, 2026 22:49
@stsoe stsoe added the build label Jul 8, 2026
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@Scottcjn

Scottcjn commented Jul 9, 2026

Copy link
Copy Markdown
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.

@stsoe
stsoe requested a review from chvamshi-xilinx July 9, 2026 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants