vquic: add option to use Apple fast UDP

Using Apple's secret `SYS_recvmsg_x` and `SYS_sendmsg_x` syscalls for
receiving/sending batches of UDP packets.

Since it uses undocumented calls, it's experimental and disabled by
default.

To enable:
- autotools: `--enable-apple-fast-udp`
- cmake: `-DCURL_ENABLE_APPLE_FAST_UDP=ON`

Also:
- enable in two H3 CI jobs with both build tools, pytest and clang-tidy.

Refs:
https://max-inden.de/post/fast-udp-io-in-firefox/
https://www.macsyscalls.com/en/syscall/480-recvmsg-x
https://www.macsyscalls.com/en/syscall/481-sendmsg-x

C-code-authored-by: Stefan Eissing
Build-code-authored-by: Viktor Szakats

Closes #22341
Closes #22417
This commit is contained in:
Viktor Szakats 2026-07-28 14:22:43 +02:00
parent c7fb986b72
commit 079a11bcba
No known key found for this signature in database
6 changed files with 259 additions and 15 deletions

View file

@ -242,6 +242,7 @@ target_link_libraries(my_target PRIVATE CURL::libcurl)
## Enabling features
- `CURL_ENABLE_APPLE_FAST_UDP`: Use Apple fast UDP (experimental). Default: `OFF`
- `CURL_ENABLE_NTLM`: Enable NTLM support. Default: `OFF`
- `CURL_ENABLE_SMB`: Enable SMB. Default: `OFF`
- `CURL_ENABLE_SSL`: Enable SSL support. Default: `ON`