Repository navigation
Cap the PTO count when working out the period - #1605
Conversation
The previous code would overflow and produce a 0ns timeout when the PTO count got large (well over 24). This is because the `fast_pto` value tends to have trailing zero bits and shift values between 32-(number of zeros) and 31 (inclusive) would still shift left. This code instead stops increasing the PTO once it hits 24. That should be enough for most cases. Closes mozilla#1602.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1605 +/- ##
==========================================
- Coverage 87.58% 87.58% -0.01%
==========================================
Files 118 118
Lines 38585 38581 -4
==========================================
- Hits 33795 33791 -4
Misses 4790 4790 ☔ View full report in Codecov by Sentry. |
|
This change ends up not being sufficient to fix the With the change in this PR, the PTO now doubles until it reaches 5033164.8s, which is ~8.32 weeks. The test runs with an RTT of 150 weeks and 10% loss rate, meaning it never terminates. I think the way forward here is to make the RTT used for |
|
Nah, that seems fine. We could use u64 for this, but that would mean that |
* Properly adjust CC state when PTOs fire before ACKs are received * Fix test * Fix test * Fix another test * Progress on the tests * Fix another test * Fix more tests * Simplify assert_idle * Try and fix sim. Doesn't work yet. * Undo * Fix * Update neqo-transport/src/recovery.rs Co-authored-by: Martin Thomson <mt@lowentropy.net> * Make RTT in `idle_timeout_crazy_rtt` less crazy, so #1605 works * Address code review comments * Don't need to look at `tls_info`. --------- Co-authored-by: Martin Thomson <mt@lowentropy.net>
The previous code would overflow and produce a 0ns timeout when the PTO count got large (well over 24). This is because the
fast_ptovalue tends to have trailing zero bits and shift values between 32-(number of zeros) and 31 (inclusive) would still shift left.This code instead stops increasing the PTO once it hits 24. That should be enough for most cases.
Closes #1602.