Repository navigation
fix(init): pass the VFIO version ioctl request as the libc's type - #2007
daniel-noland wants to merge 1 commit into
Conversation
The container-node test passed VFIO_GET_API_VERSION to libc::ioctl as a c_ulong. That is the request type on glibc, but musl's ioctl takes a c_int, so the aarch64 musl cross test build failed with E0308 and every merge-queue run since a0f211c has failed in cross/dataplane/bluefield3/musl. Cast at the call site, as kernel/offload.rs does for SIOCETHTOOL. The value (0x3b64) fits either type; the truncation lint only fires on musl, so it is allowed rather than expected. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Daniel Noland <daniel@githedgehog.com>
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
VFIO API-version test init/src/vfio.rs |
The test permits the possible-truncation lint and casts VFIO_GET_API_VERSION to the ioctl argument type. A comment describes the glibc and musl request types. |
Possibly related PRs
- githedgehog/dataplane#2004: Changes the declared type of
VFIO_GET_API_VERSION, which relates to the ioctl request type handled here.
Priority:
Merge Risk: 
Minimal · up to f49f0
-
The platform-specific ioctl request type is handled by the cast, with no remaining merge-blocking concern.
Pre-merge checks: 
5
-
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 1 files.
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
closed in favor of #2004 |
Pull request was closed
Main currently fails the aarch64 musl cross test build, so every merge-queue run fails in
cross/dataplane/bluefield3/musl. For example, #1949's run 40460815582:a0f211c (#2003) added a container-node test that passes
VFIO_GET_API_VERSIONtolibc::ioctlas ac_ulong. That is the request type on glibc, but musl'sioctltakes ac_int.The fix casts at the call site with
as _, asdataplane/src/drivers/kernel/offload.rsdoes forSIOCETHTOOL. The value (0x3b64) fits either type. The truncation lint fires only on musl, so it isallowed rather thanexpected.Verified locally:
cargo check -p dataplane-init --tests --target x86_64-unknown-linux-musl -Zbuild-stdreproduces E0308 without the fix and passes with it.cargo clippy -p dataplane-init --tests -- -D warningsis clean on both gnu and musl.cargo fmt --checkpasses.🤖 Generated with Claude Code