libc
libc copied to clipboard
Add SO_PREFER_BUSY_POLL and SO_BUSY_POLL_BUDGET
Remove the comment of these socket options. Reference: https://elixir.bootlin.com/linux/latest/source/include/uapi/asm-generic/socket.h
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
From the CI results (i686-unknown-linux-musl) it seems like the machine does not have a uapi header with the constant. They were added in 5.11 and the sanitized headers are in 4.19: https://github.com/rust-lang/libc/blob/main/ci/install-musl.sh#L68
for the time being, need to add those constants as exception (for CI), as if musl then ignore those two.
@devnexen Got it. I was wondering if someone tried to update the kernel headers for the musl CI. Alpine uses musl as well and they don't seem to use sabotage-linux headers but rather roll their own (currently targeting 6.6 soon to be 6.10): https://git.alpinelinux.org/aports/tree/main/linux-headers?h=master
I updated the CI to use the alpine headers here: https://github.com/tammela/libc/commit/17af7ba240f5deda442b126ae56b4a2937e6f8bc
Seems to be passing the CI scripts, let me know if it's worth the shot and I can open up a PR
nice, it might be best to create a PR for this musl update alone tough. cc @tgross35
Needs this one to pass CI: https://github.com/rust-lang/libc/pull/3921
I will double check CI
So musl for some reason hard codes the socket constants instead of fetching them from the OS: https://git.musl-libc.org/cgit/musl/tree/include/sys/socket.h#n293
I will look for a way to test these constants only on gnu libc
:umbrella: The latest upstream changes (presumably #4132) made this pull request unmergeable. Please resolve the merge conflicts.
It looks like CI is passing - is this ready to be merged or is there something else to be done? (I've held off because of the labels)
It looks like CI is passing - is this ready to be merged or is there something else to be done? (I've held off because of the labels)
I gave in and gated the new constants for !musl. So it should be good from my side.
Musl made the decision to hardcode the SO_ constants instead of inherit them from the OS via #include <asm-generic/socket.h>.
Essentially updating the kernel headers is not enough, you have to hope a recent musl version kept up with the new constants...
The next musl version update will likely fill in the gap (till 70), but linux already added a bunch more :)
Thanks!