]> git.ipfire.org Git - thirdparty/wireguard-go.git/commitdiff
device: ratchet up max segment size on android
authorJason A. Donenfeld <Jason@zx2c4.com>
Sun, 22 Oct 2023 00:12:13 +0000 (02:12 +0200)
committerJason A. Donenfeld <Jason@zx2c4.com>
Sun, 22 Oct 2023 00:12:13 +0000 (02:12 +0200)
GRO requires big allocations to be efficient. This isn't great, as there
might be Android memory usage issues. So we should revisit this commit.
But at least it gets things working again.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
device/queueconstants_android.go

index 3d80eadb0a054605f8a9ca6c50cf8960c616c8bd..25f700a9030945626e53f9b5f7a932ddbf4165aa 100644 (file)
@@ -14,6 +14,6 @@ const (
        QueueOutboundSize          = 1024
        QueueInboundSize           = 1024
        QueueHandshakeSize         = 1024
-       MaxSegmentSize             = 2200
+       MaxSegmentSize             = (1 << 16) - 1 // largest possible UDP datagram
        PreallocatedBuffersPerPool = 4096
 )