Skip to content

linux: add NLMSG_* helpers - #5321

Merged
tgross35 merged 1 commit into
rust-lang:mainfrom
sbogomolov:linux-nlmsg-helpers
Aug 3, 2026
Merged

linux: add NLMSG_* helpers#5321
tgross35 merged 1 commit into
rust-lang:mainfrom
sbogomolov:linux-nlmsg-helpers

Conversation

@sbogomolov

@sbogomolov sbogomolov commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Description

Add the NLMSG_* message-framing helpers from linux/netlink.h. The length helpers take c_uint (the macros do unsigned arithmetic via NLMSG_ALIGNTO's 4U), while NLMSG_OK/NLMSG_NEXT take the signed byte count the walk loop gets from recv.

Sources

Linux NLMSG_* (linux/netlink.h):

Checklist

  • Relevant tests in libc-test/semver have been updated
  • No placeholder or unstable values like *LAST or *MAX are included
  • Tested locally (cd libc-test && cargo test --target mytarget)

@rustbot label +stable-nominated

@rustbot rustbot added O-linux S-waiting-on-review stable-nominated This PR should be considered for cherry-pick to libc's stable release branch labels Jul 23, 2026
@sbogomolov
sbogomolov force-pushed the linux-nlmsg-helpers branch from a4014dd to bb21ba9 Compare August 2, 2026 19:41
@rustbot

This comment has been minimized.

Comment thread src/new/linux_uapi/linux/netlink.rs Outdated
Comment thread src/new/linux_uapi/linux/netlink.rs Outdated
Comment thread src/new/linux_uapi/linux/netlink.rs
@rustbot

rustbot commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@rustbot

This comment has been minimized.

@sbogomolov

Copy link
Copy Markdown
Contributor Author

@tgross35 I think I've addressed all your comments.

@rustbot ready

@sbogomolov

Copy link
Copy Markdown
Contributor Author

The docs-job failures are rustdoc OOM-ing on the ctest crate under nightly-2026-08-03, reproduces locally on clean main with cargo doc --workspace --no-deps (rustdoc SIGKILL). It is unrelated to this PR.

@tgross35 tgross35 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tgross35
tgross35 enabled auto-merge August 3, 2026 22:06
@tgross35
tgross35 force-pushed the linux-nlmsg-helpers branch from 4839359 to 5abd5d4 Compare August 3, 2026 22:06
@rustbot

rustbot commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@tgross35
tgross35 added this pull request to the merge queue Aug 3, 2026
Merged via the queue into rust-lang:main with commit 11f779b Aug 3, 2026
57 checks passed
@sbogomolov
sbogomolov deleted the linux-nlmsg-helpers branch August 4, 2026 07:18
@tgross35 tgross35 mentioned this pull request Aug 31, 2026
@tgross35 tgross35 added stable-applied This PR has been cherry-picked to libc's stable release branch and removed stable-nominated This PR should be considered for cherry-pick to libc's stable release branch labels Aug 31, 2026
tgross35 pushed a commit to dybucc/libc that referenced this pull request Aug 31, 2026
(backport <rust-lang#5321>)
(cherry picked from commit 11f779b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

O-linux stable-applied This PR has been cherry-picked to libc's stable release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants