Skip to content

linux: Add new netlink flags #4288

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 12, 2025

Conversation

jbaublitz
Copy link
Contributor

@jbaublitz jbaublitz commented Feb 27, 2025

Description

This change adds some new constants for the DELETE and ACK subset of netlink commands.

Sources

The documentation appears to be out of date, but the header is /usr/include/linux/netlink.h and includes the following:

/* Modifiers to DELETE request */
#define NLM_F_NONREC    0x100   /* Do not delete recursively    */
#define NLM_F_BULK      0x200   /* Delete multiple objects      */
 
/* Flags for ACK message */
#define NLM_F_CAPPED    0x100   /* request was capped */
#define NLM_F_ACK_TLVS  0x200   /* extended ACK TVLs were included */

Header: https://github.com/torvalds/linux/blob/0fed89a961ea851945d23cc35beb59d6e56c0964/include/uapi/linux/netlink.h#L82-L87

Checklist

  • Relevant tests in libc-test/semver have been updated
  • No placeholder or unstable values like *LAST or *MAX are
    included (see #3131)
  • Tested locally (cd libc-test && cargo test --target mytarget);
    especially relevant for platforms that may not be checked in CI

@rustbot
Copy link
Collaborator

rustbot commented Feb 27, 2025

r? @tgross35

rustbot has assigned @tgross35.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot
Copy link
Collaborator

rustbot commented Feb 27, 2025

Some changes occurred in the Android module

cc @maurer

@jbaublitz jbaublitz marked this pull request as draft February 27, 2025 19:54
Copy link
Contributor

@tgross35 tgross35 left a comment

Choose a reason for hiding this comment

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

Are these available on Sparc? CI is throwing some errors, but this may just be because our headers are somewhat old.

If that is the case, libc-test/build.rs will need to be updated to exclude them.

@jbaublitz
Copy link
Contributor Author

@tgross35 Thanks for getting back to me on this. I'm willing to investigate and see which constants are available on what platform in recent versions of the headers but I'm not quite sure what the best way to look into this is. What would you recommend?

@tgross35
Copy link
Contributor

Actually just try rebasing, the sparc headers in CI were updated recently so maybe things fixed themselves.

@jbaublitz jbaublitz force-pushed the netlink-flags-delete-ack branch from 6498f48 to 70527d1 Compare March 12, 2025 16:48
@jbaublitz
Copy link
Contributor Author

Okay, I've rebased, I'll keep an eye on CI.

@jbaublitz jbaublitz marked this pull request as ready for review March 12, 2025 17:48
@jbaublitz
Copy link
Contributor Author

Okay it appears that CI is passing!

@tgross35
Copy link
Contributor

tgross35 commented Mar 12, 2025

The documentation appears to be out of date, but the header is /usr/include/linux/netlink.h and includes the following:

A permalink to the header is preferable over docs links anyway, since things change. I updated the top post 👍

Thanks!

@rustbot label +stable-nominated

@tgross35 tgross35 added this pull request to the merge queue Mar 12, 2025
@rustbot rustbot added the stable-nominated This PR should be considered for cherry-pick to libc's stable release branch label Mar 12, 2025
Merged via the queue into rust-lang:main with commit e99dc5f Mar 12, 2025
43 checks passed
tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Apr 3, 2025
(backport <rust-lang#4288>)
(cherry picked from commit 70527d1)
@tgross35 tgross35 mentioned this pull request Apr 3, 2025
@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 Apr 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-android O-linux O-unix S-waiting-on-author 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