You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to make use of this optimization on apple platforms, we should be passing multiple smaller read buffers to the apple OS, instead of one large buffer (see code above).
I suggest the following:
Introduce a struct ReceiveBuffer(Vec<u8>) wrapper type with a new function using RECV_BUF_SIZE.
Have the user pass a long-lived instance of ReceiveBuffer to recv_inner.
Within recv_inner we can assert the size of receive_buffer.0, given that a user can construct it via new only. On Linux, Android, Windows, ... proceed as before, passing the single large buffer to the OS. On Apple, partition the buffer and pass multiple slices of it to the OS.
On apple platforms, enable the fast_applequinn-udp feature.
Alternatively on Apple platforms, we could change ReceiveBuffer(Vec<u8>) to ReceiveBuffer(Vec<Vec<u8>>).
We currently pass a single large read buffer to the OS across all platforms:
neqo/neqo-udp/src/lib.rs
Lines 66 to 70 in 3e65261
Linux, Android and Windows can leverage GRO (and URO) to read multiple datagrams into the buffer.
Apple platforms do not support GRO. But instead, we can fall-back to the older
recvmmsg
style syscalls.@larseggert added
recvmmsg
style reads on apple to quinn-udp: quinn-rs/quinn#1993In order to make use of this optimization on apple platforms, we should be passing multiple smaller read buffers to the apple OS, instead of one large buffer (see code above).
I suggest the following:
struct ReceiveBuffer(Vec<u8>)
wrapper type with anew
function usingRECV_BUF_SIZE
.ReceiveBuffer
torecv_inner
.recv_inner
we can assert the size ofreceive_buffer.0
, given that a user can construct it vianew
only. On Linux, Android, Windows, ... proceed as before, passing the single large buffer to the OS. On Apple, partition the buffer and pass multiple slices of it to the OS.fast_apple
quinn-udp
feature.Alternatively on Apple platforms, we could change
ReceiveBuffer(Vec<u8>)
toReceiveBuffer(Vec<Vec<u8>>)
.Overarching tracking issue: #1693
The text was updated successfully, but these errors were encountered: