Merge release-20210125.0-63-g49f783fb6 (automated)
This commit is contained in:
commit
ef8d37b838
|
@ -178,8 +178,8 @@ func (c *cubicState) getCwnd(packetsAcked, sndCwnd int, srtt time.Duration) int
|
||||||
return int(cwnd)
|
return int(cwnd)
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandleNDupAcks implements congestionControl.HandleNDupAcks.
|
// HandleLossDetected implements congestionControl.HandleLossDetected.
|
||||||
func (c *cubicState) HandleNDupAcks() {
|
func (c *cubicState) HandleLossDetected() {
|
||||||
// See: https://tools.ietf.org/html/rfc8312#section-4.5
|
// See: https://tools.ietf.org/html/rfc8312#section-4.5
|
||||||
c.numCongestionEvents++
|
c.numCongestionEvents++
|
||||||
c.t = time.Now()
|
c.t = time.Now()
|
||||||
|
|
|
@ -301,7 +301,7 @@ func (s *sender) detectTLPRecovery(ack seqnum.Value, rcvdSeg *segment) {
|
||||||
// Step 2. Either the original packet or the retransmission (in the
|
// Step 2. Either the original packet or the retransmission (in the
|
||||||
// form of a probe) was lost. Invoke a congestion control response
|
// form of a probe) was lost. Invoke a congestion control response
|
||||||
// equivalent to fast recovery.
|
// equivalent to fast recovery.
|
||||||
s.cc.HandleNDupAcks()
|
s.cc.HandleLossDetected()
|
||||||
s.enterRecovery()
|
s.enterRecovery()
|
||||||
s.leaveRecovery()
|
s.leaveRecovery()
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,10 +79,10 @@ func (r *renoState) Update(packetsAcked int) {
|
||||||
r.updateCongestionAvoidance(packetsAcked)
|
r.updateCongestionAvoidance(packetsAcked)
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandleNDupAcks implements congestionControl.HandleNDupAcks.
|
// HandleLossDetected implements congestionControl.HandleLossDetected.
|
||||||
func (r *renoState) HandleNDupAcks() {
|
func (r *renoState) HandleLossDetected() {
|
||||||
// A retransmit was triggered due to nDupAckThreshold
|
// A retransmit was triggered due to nDupAckThreshold or when RACK
|
||||||
// being hit. Reduce our slow start threshold.
|
// detected loss. Reduce our slow start threshold.
|
||||||
r.reduceSlowStartThreshold()
|
r.reduceSlowStartThreshold()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,9 +51,10 @@ const (
|
||||||
// congestionControl is an interface that must be implemented by any supported
|
// congestionControl is an interface that must be implemented by any supported
|
||||||
// congestion control algorithm.
|
// congestion control algorithm.
|
||||||
type congestionControl interface {
|
type congestionControl interface {
|
||||||
// HandleNDupAcks is invoked when sender.dupAckCount >= nDupAckThreshold
|
// HandleLossDetected is invoked when the loss is detected by RACK or
|
||||||
// just before entering fast retransmit.
|
// sender.dupAckCount >= nDupAckThreshold just before entering fast
|
||||||
HandleNDupAcks()
|
// retransmit.
|
||||||
|
HandleLossDetected()
|
||||||
|
|
||||||
// HandleRTOExpired is invoked when the retransmit timer expires.
|
// HandleRTOExpired is invoked when the retransmit timer expires.
|
||||||
HandleRTOExpired()
|
HandleRTOExpired()
|
||||||
|
@ -1152,7 +1153,7 @@ func (s *sender) detectLoss(seg *segment) (fastRetransmit bool) {
|
||||||
s.dupAckCount = 0
|
s.dupAckCount = 0
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
s.cc.HandleNDupAcks()
|
s.cc.HandleLossDetected()
|
||||||
s.enterRecovery()
|
s.enterRecovery()
|
||||||
s.dupAckCount = 0
|
s.dupAckCount = 0
|
||||||
return true
|
return true
|
||||||
|
|
Loading…
Reference in New Issue