forked from quic-go/quic-go
increase initial packet size to 1280 bytes (for both IPv4 and IPv6) (#4500)
This commit is contained in:
@@ -25,7 +25,7 @@ func (c *mockClock) Advance(d time.Duration) {
|
||||
*c = mockClock(time.Time(*c).Add(d))
|
||||
}
|
||||
|
||||
const MaxCongestionWindow protocol.ByteCount = 200 * maxDatagramSize
|
||||
const MaxCongestionWindow = 200 * maxDatagramSize
|
||||
|
||||
var _ = Describe("Cubic Sender", func() {
|
||||
var (
|
||||
@@ -47,7 +47,7 @@ var _ = Describe("Cubic Sender", func() {
|
||||
&clock,
|
||||
rttStats,
|
||||
true, /*reno*/
|
||||
protocol.InitialPacketSizeIPv4,
|
||||
protocol.InitialPacketSize,
|
||||
initialCongestionWindowPackets*maxDatagramSize,
|
||||
MaxCongestionWindow,
|
||||
nil,
|
||||
@@ -319,7 +319,7 @@ var _ = Describe("Cubic Sender", func() {
|
||||
It("tcp cubic reset epoch on quiescence", func() {
|
||||
const maxCongestionWindow = 50
|
||||
const maxCongestionWindowBytes = maxCongestionWindow * maxDatagramSize
|
||||
sender = newCubicSender(&clock, rttStats, false, protocol.InitialPacketSizeIPv4, initialCongestionWindowPackets*maxDatagramSize, maxCongestionWindowBytes, nil)
|
||||
sender = newCubicSender(&clock, rttStats, false, protocol.InitialPacketSize, initialCongestionWindowPackets*maxDatagramSize, maxCongestionWindowBytes, nil)
|
||||
|
||||
numSent := SendAvailableSendWindow()
|
||||
|
||||
@@ -460,7 +460,7 @@ var _ = Describe("Cubic Sender", func() {
|
||||
|
||||
It("slow starts up to the maximum congestion window", func() {
|
||||
const initialMaxCongestionWindow = protocol.MaxCongestionWindowPackets * initialMaxDatagramSize
|
||||
sender = newCubicSender(&clock, rttStats, true, protocol.InitialPacketSizeIPv4, initialCongestionWindowPackets*maxDatagramSize, initialMaxCongestionWindow, nil)
|
||||
sender = newCubicSender(&clock, rttStats, true, protocol.InitialPacketSize, initialCongestionWindowPackets*maxDatagramSize, initialMaxCongestionWindow, nil)
|
||||
|
||||
for i := 1; i < protocol.MaxCongestionWindowPackets; i++ {
|
||||
sender.MaybeExitSlowStart()
|
||||
@@ -475,7 +475,7 @@ var _ = Describe("Cubic Sender", func() {
|
||||
|
||||
It("slow starts up to maximum congestion window, if larger packets are sent", func() {
|
||||
const initialMaxCongestionWindow = protocol.MaxCongestionWindowPackets * initialMaxDatagramSize
|
||||
sender = newCubicSender(&clock, rttStats, true, protocol.InitialPacketSizeIPv4, initialCongestionWindowPackets*maxDatagramSize, initialMaxCongestionWindow, nil)
|
||||
sender = newCubicSender(&clock, rttStats, true, protocol.InitialPacketSize, initialCongestionWindowPackets*maxDatagramSize, initialMaxCongestionWindow, nil)
|
||||
const packetSize = initialMaxDatagramSize + 100
|
||||
sender.SetMaxDatagramSize(packetSize)
|
||||
for i := 1; i < protocol.MaxCongestionWindowPackets; i++ {
|
||||
@@ -490,7 +490,7 @@ var _ = Describe("Cubic Sender", func() {
|
||||
|
||||
It("limit cwnd increase in congestion avoidance", func() {
|
||||
// Enable Cubic.
|
||||
sender = newCubicSender(&clock, rttStats, false, protocol.InitialPacketSizeIPv4, initialCongestionWindowPackets*maxDatagramSize, MaxCongestionWindow, nil)
|
||||
sender = newCubicSender(&clock, rttStats, false, protocol.InitialPacketSize, initialCongestionWindowPackets*maxDatagramSize, MaxCongestionWindow, nil)
|
||||
numSent := SendAvailableSendWindow()
|
||||
|
||||
// Make sure we fall out of slow start.
|
||||
|
||||
Reference in New Issue
Block a user