mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
feat(connlib): increase the number of GRO batches (#8874)
When reading from our UDP socket, we utilise GRO to read multiple packets originating from the same IP + port and with the same length in a single syscall. Currently, we can read up to 10 different combinations here in a single syscall. `quinn_udp` actually exposes a constant for how many batches it can handle at a time. Instead of hard-coding the value 10, we now follow this constant. On Linux and MacOS (with `apple-fast-datapath`), this constant has the value 32. On Windows, it is 1. Even on my not-so-fast Internet connection of 100Mbit, I can see an increase in batch-count of up to 29 so increasing this value seems to be definitely worth it.
This commit is contained in:
@@ -468,7 +468,7 @@ impl UdpSocket {
|
||||
/// Thus, our main job within this iterator is to loop over the `buffers` and `meta` pair-wise, inspect the `meta` and segment the data within the buffer accordingly.
|
||||
#[derive(derive_more::Debug)]
|
||||
pub struct DatagramSegmentIter<
|
||||
const N: usize = 10,
|
||||
const N: usize = { quinn_udp::BATCH_SIZE },
|
||||
B = lockfree_object_pool::MutexOwnedReusable<Vec<u8>>,
|
||||
> {
|
||||
#[debug(skip)]
|
||||
|
||||
Reference in New Issue
Block a user