Merge pull request #218 from HyNetwork/wip-disable-pmtud

Disable PMTUD
This commit is contained in:
Toby 2022-02-03 20:55:18 -08:00 committed by GitHub
commit 349ac5e41e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 20 additions and 20 deletions

View File

@ -67,7 +67,7 @@ func client(config *clientConfig) {
InitialConnectionReceiveWindow: config.ReceiveWindow,
MaxConnectionReceiveWindow: config.ReceiveWindow,
KeepAlive: true,
DisablePathMTUDiscovery: config.DisableMTUDiscovery,
DisablePathMTUDiscovery: true, // Ref: https://github.com/lucas-clemente/quic-go/issues/3327
EnableDatagrams: true,
}
if config.ReceiveWindowConn == 0 {

View File

@ -49,7 +49,6 @@ type serverConfig struct {
ReceiveWindowConn uint64 `json:"recv_window_conn"`
ReceiveWindowClient uint64 `json:"recv_window_client"`
MaxConnClient int `json:"max_conn_client"`
DisableMTUDiscovery bool `json:"disable_mtu_discovery"`
IPv6Only bool `json:"ipv6_only"`
Resolver string `json:"resolver"`
}
@ -150,7 +149,6 @@ type clientConfig struct {
CustomCA string `json:"ca"`
ReceiveWindowConn uint64 `json:"recv_window_conn"`
ReceiveWindow uint64 `json:"recv_window"`
DisableMTUDiscovery bool `json:"disable_mtu_discovery"`
Resolver string `json:"resolver"`
}

View File

@ -70,7 +70,7 @@ func server(config *serverConfig) {
MaxConnectionReceiveWindow: config.ReceiveWindowClient,
MaxIncomingStreams: int64(config.MaxConnClient),
KeepAlive: true,
DisablePathMTUDiscovery: config.DisableMTUDiscovery,
DisablePathMTUDiscovery: true, // Ref: https://github.com/lucas-clemente/quic-go/issues/3327
EnableDatagrams: true,
}
if config.ReceiveWindowConn == 0 {

View File

@ -6,6 +6,8 @@ import (
)
const (
initMaxDatagramSize = 1252
pktInfoSlotCount = 4
minSampleCount = 50
minAckRate = 0.75
@ -29,6 +31,7 @@ type pktInfo struct {
func NewBrutalSender(bps congestion.ByteCount) *BrutalSender {
bs := &BrutalSender{
bps: bps,
maxDatagramSize: initMaxDatagramSize,
}
bs.pacer = newPacer(func() congestion.ByteCount {
return congestion.ByteCount(float64(bs.bps) / bs.getAckRate())

View File

@ -7,7 +7,6 @@ import (
)
const (
initMaxDatagramSize = 1252
maxBurstPackets = 10
minPacingDelay = time.Millisecond
)