introduce a buffer pool for large buffers (20k)

This commit is contained in:
Marten Seemann
2023-04-19 09:58:54 +02:00
parent bef0f3d31a
commit 7d8db149b6
5 changed files with 35 additions and 15 deletions

View File

@@ -59,7 +59,10 @@ type StatelessResetToken [16]byte
// ethernet's max size, minus the IP and UDP headers. IPv6 has a 40 byte header,
// UDP adds an additional 8 bytes. This is a total overhead of 48 bytes.
// Ethernet's max packet size is 1500 bytes, 1500 - 48 = 1452.
const MaxPacketBufferSize ByteCount = 1452
const MaxPacketBufferSize = 1452
// MaxLargePacketBufferSize is used when using GSO
const MaxLargePacketBufferSize = 20 * 1024
// MinInitialPacketSize is the minimum size an Initial packet is required to have.
const MinInitialPacketSize = 1200