Skip to content
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

Add SO_PREFER_BUSY_POLL and SO_BUSY_POLL_BUDGET #3917

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions libc-test/semver/linux.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2895,6 +2895,7 @@ SOL_X25
SOMAXCONN
SO_BINDTODEVICE
SO_BUSY_POLL
SO_BUSY_POLL_BUDGET
SO_DOMAIN
SO_EE_OFFENDER
SO_EE_ORIGIN_ICMP
Expand All @@ -2914,6 +2915,7 @@ SO_PASSSEC
SO_PEEK_OFF
SO_PEERCRED
SO_PEERSEC
SO_PREFER_BUSY_POLL
SO_RCVBUFFORCE
SO_REUSEPORT
SO_RXQ_OVFL
Expand Down
9 changes: 7 additions & 2 deletions src/unix/linux_like/linux/arch/generic/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ cfg_if! {
target_arch = "csky",
target_arch = "loongarch64"
),
// FIXME(musl):
// Musl hardcodes the SO_* constants instead
// of inheriting them from the kernel headers.
// For new constants you might need consider updating
// musl in the CI as well.
not(any(target_env = "musl", target_env = "ohos"))
))] {
pub const SO_TIMESTAMP_NEW: c_int = 63;
Expand All @@ -112,8 +117,8 @@ cfg_if! {
pub const SO_DETACH_REUSEPORT_BPF: c_int = 68;
}
}
// pub const SO_PREFER_BUSY_POLL: c_int = 69;
// pub const SO_BUSY_POLL_BUDGET: c_int = 70;
pub const SO_PREFER_BUSY_POLL: c_int = 69;
pub const SO_BUSY_POLL_BUDGET: c_int = 70;

cfg_if! {
if #[cfg(any(
Expand Down
4 changes: 2 additions & 2 deletions src/unix/linux_like/linux/arch/mips/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ pub const SO_TIMESTAMPING: c_int = 37;
// pub const SO_RCVTIMEO_NEW: c_int = 66;
// pub const SO_SNDTIMEO_NEW: c_int = 67;
// pub const SO_DETACH_REUSEPORT_BPF: c_int = 68;
// pub const SO_PREFER_BUSY_POLL: c_int = 69;
// pub const SO_BUSY_POLL_BUDGET: c_int = 70;
pub const SO_PREFER_BUSY_POLL: c_int = 69;
pub const SO_BUSY_POLL_BUDGET: c_int = 70;

pub const FICLONE: c_ulong = 0x80049409;
pub const FICLONERANGE: c_ulong = 0x8020940D;
Expand Down
4 changes: 2 additions & 2 deletions src/unix/linux_like/linux/arch/powerpc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ pub const SO_BINDTOIFINDEX: c_int = 62;
// pub const SO_RCVTIMEO_NEW: c_int = 66;
// pub const SO_SNDTIMEO_NEW: c_int = 67;
// pub const SO_DETACH_REUSEPORT_BPF: c_int = 68;
// pub const SO_PREFER_BUSY_POLL: c_int = 69;
// pub const SO_BUSY_POLL_BUDGET: c_int = 70;
pub const SO_PREFER_BUSY_POLL: c_int = 69;
pub const SO_BUSY_POLL_BUDGET: c_int = 70;

pub const FICLONE: c_ulong = 0x80049409;
pub const FICLONERANGE: c_ulong = 0x8020940D;
Expand Down
4 changes: 2 additions & 2 deletions src/unix/linux_like/linux/arch/sparc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ pub const SO_TIMESTAMPING: c_int = 0x0023;
// pub const SO_RCVTIMEO_NEW: c_int = 0x0044;
// pub const SO_SNDTIMEO_NEW: c_int = 0x0045;
// pub const SO_DETACH_REUSEPORT_BPF: c_int = 0x0047;
// pub const SO_PREFER_BUSY_POLL: c_int = 0x0048;
// pub const SO_BUSY_POLL_BUDGET: c_int = 0x0049;
pub const SO_PREFER_BUSY_POLL: c_int = 0x0048;
pub const SO_BUSY_POLL_BUDGET: c_int = 0x0049;

// Defined in unix/linux_like/mod.rs
// pub const SCM_TIMESTAMP: c_int = SO_TIMESTAMP;
Expand Down
Loading