mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Automated rollback of changelist 634071568
PiperOrigin-RevId: 653421213
This commit is contained in:
committed by
gVisor bot
parent
899e8631a7
commit
489ac10c69
@@ -357,13 +357,11 @@ func (rc *rackControl) detectLoss(rcvTime tcpip.MonotonicTime) int {
|
||||
var timeout time.Duration
|
||||
numLost := 0
|
||||
for seg := rc.snd.writeList.Front(); seg != nil && seg.xmitCount != 0; seg = seg.Next() {
|
||||
// xmitCount can be 0 for packets that are broken up for PMTUD.
|
||||
// The initial transmission "doesn't count" WRT loss detection.
|
||||
if rc.snd.ep.scoreboard.IsSACKED(seg.sackBlock()) || seg.xmitCount == 0 {
|
||||
if rc.snd.ep.scoreboard.IsSACKED(seg.sackBlock()) {
|
||||
continue
|
||||
}
|
||||
|
||||
if seg.lost && seg.xmitCount > 1 {
|
||||
if seg.lost && seg.xmitCount == 1 {
|
||||
numLost++
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -342,16 +342,10 @@ func (s *sender) updateMaxPayloadSize(mtu, count int) {
|
||||
break
|
||||
}
|
||||
|
||||
if seg.payloadSize() > m {
|
||||
// xmitCount is used for loss detection, but
|
||||
// retransmission doesn't indicate congestion here,
|
||||
// it's just PMTUD.
|
||||
seg.xmitCount = 0
|
||||
if nextSeg == s.writeNext {
|
||||
// We found a segment exceeding the MTU. Rewind
|
||||
// writeNext and try to retransmit it.
|
||||
nextSeg = seg
|
||||
}
|
||||
if nextSeg == s.writeNext && seg.payloadSize() > m {
|
||||
// We found a segment exceeding the MTU. Rewind
|
||||
// writeNext and try to retransmit it.
|
||||
nextSeg = seg
|
||||
}
|
||||
|
||||
if s.ep.SACKPermitted && s.ep.scoreboard.IsSACKED(seg.sackBlock()) {
|
||||
|
||||
@@ -5739,7 +5739,6 @@ func TestPathMTUDiscovery(t *testing.T) {
|
||||
}
|
||||
checker.IPv4(t, p,
|
||||
checker.PayloadLen(size+header.TCPMinimumSize),
|
||||
checker.FragmentFlags(header.IPv4FlagDontFragment),
|
||||
checker.TCP(
|
||||
checker.DstPort(context.TestPort),
|
||||
checker.TCPSeqNum(seqNum),
|
||||
|
||||
Reference in New Issue
Block a user