Implement 9260 ack and rtx timers - #518
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #518 +/- ##
==========================================
+ Coverage 89.04% 89.47% +0.43%
==========================================
Files 56 56
Lines 4756 4770 +14
==========================================
+ Hits 4235 4268 +33
+ Misses 521 502 -19
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| // measureRTT applies RFC 9260 section 6.3.1 C4/C5: sample once per round trip | ||
| // and exclude retransmitted DATA (Karn's algorithm). The caller holds the lock. | ||
| func (a *Association) measureRTT(c *chunkPayloadData, now time.Time) { | ||
| if c.nSent != 1 || sna32LT(c.tsn, a.minTSN2MeasureRTT) { | ||
| return | ||
| } | ||
| a.minTSN2MeasureRTT = a.myNextTSN | ||
| rtt := now.Sub(c.since) | ||
| srtt := a.rtoMgr.setNewRTT(rtt.Seconds() * 1000) | ||
| a.srtt.Store(srtt) | ||
| // Keep a windowed minimum so RACK can adapt when the path RTT changes. | ||
| a.rack.rackMinRTTWnd.Push(now, rtt) | ||
| a.log.Tracef("[%s] SACK: measured-rtt=%f srtt=%f new-rto=%f", | ||
| a.name, rtt.Seconds()*1000, srtt, a.rtoMgr.getRTO()) | ||
| } |
There was a problem hiding this comment.
This is really nice, we needed to pull this out a long time ago. Maybe it can even be in a helper for the v2.
There was a problem hiding this comment.
oh i didn't write this lol, this was just refactored from main from two places from processSelectiveAck, I just made it into a helper :)
Lines 2972 to 2992 in e1fbf8b
| if a.ackState != ackStateDelay { | ||
| return | ||
| } |
There was a problem hiding this comment.
Whoops looks like we forgot to wire this up. Thanks for catching it!
Description
Folds: #403 and #429
on top of them it actually integrates the timers, makes the backoff reset actually work, fixes SACK
ordering, stops T3 after validation simplifies the code and removes unused helpers that were added
in the original PRs.
Reference issue
closes #428