Repository navigation
fix: discard retry with scid matching the initial dcid - #3785
Conversation
|
@uwezkhan thanks for all the contributions, including this one. Can we send you some Mozilla swag as a little thank you? |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3785 +/- ##
==========================================
- Coverage 96.92% 96.77% -0.16%
==========================================
Files 115 120 +5
Lines 40371 40723 +352
Branches 40371 40723 +352
==========================================
+ Hits 39131 39410 +279
- Misses 1225 1288 +63
- Partials 15 25 +10
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Merging this PR will improve performance by 5.07%
Performance Changes
Tip Curious why this is faster? Comment Comparing Footnotes
|
martinthomson
left a comment
There was a problem hiding this comment.
This is really good. Thanks.
Thanks Lars that's really kind I'd be happy to. What's the best way to get you my shipping details? Didn't want to drop my address in the thread here. |
|
@uwezkhan please email me at leggert [at] mozilla.com |
Will do. |
Benchmark resultsSignificant performance differences relative to 358b69b. transfer/1-conn/1-100mb-req (aka. Upload): 💔 Performance has regressed by +9.3822%. time: [163.70 ms 169.86 ms 176.86 ms]
thrpt: [565.41 MiB/s 588.72 MiB/s 610.88 MiB/s]
change:
time: [+5.6289% +9.3822% +13.292] (p = 0.00 < 0.05)
thrpt: [-11.732% -8.5774% -5.3289]
Performance has regressed.
Found 17 outliers among 100 measurements (17.00%)
17 (17.00%) high severestreams/walltime/1000-streams/each-1-bytes: 💚 Performance has improved by -1.3410%. time: [10.926 ms 10.942 ms 10.959 ms]
thrpt: [89.108 KiB/s 89.245 KiB/s 89.380 KiB/s]
change:
time: [-1.5612% -1.3410% -1.1307] (p = 0.00 < 0.05)
thrpt: [+1.1437% +1.3592% +1.5860]
Performance has improved.streams/walltime/1000-streams/each-1000-bytes: 💚 Performance has improved by -2.2414%. time: [31.484 ms 31.525 ms 31.568 ms]
thrpt: [30.210 MiB/s 30.251 MiB/s 30.291 MiB/s]
change:
time: [-2.4370% -2.2414% -2.0582] (p = 0.00 < 0.05)
thrpt: [+2.1014% +2.2928% +2.4978]
Performance has improved.
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high severeAll resultstransfer/1-conn/1-100mb-resp (aka. Download): No change in performance detected. time: [145.70 ms 146.08 ms 146.49 ms]
thrpt: [682.64 MiB/s 684.56 MiB/s 686.33 MiB/s]
change:
time: [-0.1215% +0.2346% +0.6279] (p = 0.23 > 0.05)
thrpt: [-0.6240% -0.2340% +0.1216]
No change in performance detected.
Found 2 outliers among 100 measurements (2.00%)
1 (1.00%) high mild
1 (1.00%) high severetransfer/1-conn/10_000-parallel-1b-resp (aka. RPS): No change in performance detected. time: [260.84 ms 262.49 ms 264.14 ms]
thrpt: [37.859 Kelem/s 38.097 Kelem/s 38.338 Kelem/s]
change:
time: [-0.3710% +0.5531% +1.4810] (p = 0.24 > 0.05)
thrpt: [-1.4594% -0.5500% +0.3724]
No change in performance detected.transfer/1-conn/1-1b-resp (aka. HPS): No change in performance detected. time: [38.497 ms 38.642 ms 38.804 ms]
thrpt: [25.770 B/s 25.878 B/s 25.976 B/s]
change:
time: [-0.6105% -0.0448% +0.5747] (p = 0.88 > 0.05)
thrpt: [-0.5715% +0.0449% +0.6142]
No change in performance detected.
Found 6 outliers among 100 measurements (6.00%)
1 (1.00%) low mild
1 (1.00%) high mild
4 (4.00%) high severetransfer/1-conn/1-100mb-req (aka. Upload): 💔 Performance has regressed by +9.3822%. time: [163.70 ms 169.86 ms 176.86 ms]
thrpt: [565.41 MiB/s 588.72 MiB/s 610.88 MiB/s]
change:
time: [+5.6289% +9.3822% +13.292] (p = 0.00 < 0.05)
thrpt: [-11.732% -8.5774% -5.3289]
Performance has regressed.
Found 17 outliers among 100 measurements (17.00%)
17 (17.00%) high severestreams/walltime/1-streams/each-1000-bytes: No change in performance detected. time: [548.95 µs 553.34 µs 560.15 µs]
thrpt: [1.7025 MiB/s 1.7235 MiB/s 1.7373 MiB/s]
change:
time: [-0.4397% +0.5245% +1.9591] (p = 0.41 > 0.05)
thrpt: [-1.9215% -0.5218% +0.4416]
No change in performance detected.
Found 13 outliers among 100 measurements (13.00%)
4 (4.00%) high mild
9 (9.00%) high severestreams/walltime/1000-streams/each-1-bytes: 💚 Performance has improved by -1.3410%. time: [10.926 ms 10.942 ms 10.959 ms]
thrpt: [89.108 KiB/s 89.245 KiB/s 89.380 KiB/s]
change:
time: [-1.5612% -1.3410% -1.1307] (p = 0.00 < 0.05)
thrpt: [+1.1437% +1.3592% +1.5860]
Performance has improved.streams/walltime/1000-streams/each-1000-bytes: 💚 Performance has improved by -2.2414%. time: [31.484 ms 31.525 ms 31.568 ms]
thrpt: [30.210 MiB/s 30.251 MiB/s 30.291 MiB/s]
change:
time: [-2.4370% -2.2414% -2.0582] (p = 0.00 < 0.05)
thrpt: [+2.1014% +2.2928% +2.4978]
Performance has improved.
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high severestreams-flow-controlled/walltime/1-streams/each-4194304-bytes: Change within noise threshold. time: [27.007 ms 27.057 ms 27.108 ms]
thrpt: [147.56 MiB/s 147.84 MiB/s 148.11 MiB/s]
change:
time: [-1.1053% -0.8391% -0.5911] (p = 0.00 < 0.05)
thrpt: [+0.5946% +0.8462% +1.1176]
Change within noise threshold.
Found 2 outliers among 100 measurements (2.00%)
2 (2.00%) high mildstreams-flow-controlled/walltime/10-streams/each-1048576-bytes: No change in performance detected. time: [73.943 ms 74.460 ms 75.011 ms]
thrpt: [133.31 MiB/s 134.30 MiB/s 135.24 MiB/s]
change:
time: [-1.3022% -0.4018% +0.4975] (p = 0.41 > 0.05)
thrpt: [-0.4951% +0.4034% +1.3194]
No change in performance detected.
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high mildtransfer/walltime/pacing-false/varying-seeds: Change within noise threshold. time: [18.245 ms 18.264 ms 18.292 ms]
thrpt: [218.68 MiB/s 219.01 MiB/s 219.24 MiB/s]
change:
time: [-0.7685% -0.6193% -0.4612] (p = 0.00 < 0.05)
thrpt: [+0.4633% +0.6232% +0.7745]
Change within noise threshold.
Found 2 outliers among 100 measurements (2.00%)
1 (1.00%) high mild
1 (1.00%) high severetransfer/walltime/pacing-true/varying-seeds: Change within noise threshold. time: [18.784 ms 18.797 ms 18.810 ms]
thrpt: [212.65 MiB/s 212.80 MiB/s 212.94 MiB/s]
change:
time: [-0.4198% -0.2022% -0.0348] (p = 0.03 < 0.05)
thrpt: [+0.0348% +0.2026% +0.4216]
Change within noise threshold.
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high mildtransfer/walltime/pacing-false/same-seed: No change in performance detected. time: [18.469 ms 18.493 ms 18.528 ms]
thrpt: [215.89 MiB/s 216.30 MiB/s 216.58 MiB/s]
change:
time: [-0.0989% +0.1079% +0.3338] (p = 0.37 > 0.05)
thrpt: [-0.3327% -0.1078% +0.0990]
No change in performance detected.
Found 2 outliers among 100 measurements (2.00%)
1 (1.00%) high mild
1 (1.00%) high severetransfer/walltime/pacing-true/same-seed: Change within noise threshold. time: [18.679 ms 18.704 ms 18.738 ms]
thrpt: [213.47 MiB/s 213.86 MiB/s 214.15 MiB/s]
change:
time: [-1.1325% -0.8896% -0.6760] (p = 0.00 < 0.05)
thrpt: [+0.6806% +0.8976% +1.1454]
Change within noise threshold.
Found 3 outliers among 100 measurements (3.00%)
1 (1.00%) high mild
2 (2.00%) high severeDownload data for |
Failed Interop TestsQUIC Interop Runner, client vs. server, differences relative to
All resultsSucceeded Interop TestsQUIC Interop Runner, client vs. server neqo-pr as client
neqo-pr as server
Unsupported Interop TestsQUIC Interop Runner, client vs. server neqo-pr as client
neqo-pr as server
|
Client/server transfer resultsPerformance differences relative to 358b69b. Transfer of 33554432 bytes over loopback, min. 100 runs. All unit-less numbers are in milliseconds.
Table above only shows statistically significant changes. See all results below. All resultsTransfer of 33554432 bytes over loopback, min. 100 runs. All unit-less numbers are in milliseconds.
Download data for |
handle_retry validates a received Retry against a duplicate Retry, an empty token, and a bad integrity tag, but never compares the Retry's Source Connection ID to the Destination Connection ID the client used in its Initial. RFC 9000 Section 17.2.5.2 requires a client to discard a Retry whose Source Connection ID matches that Destination Connection ID. The Retry integrity key is a fixed public value, so a valid tag does not by itself show the Retry came from the server; a party that observed the Initial can compute one, which is why this comparison exists.
Before, such a Retry was adopted: the client took its Source Connection ID as the new remote CID, saved the token, and re-keyed the initial secrets. After, the packet is dropped and the client stays in WaitInitial. The check sits beside the existing integrity check in handle_retry, the one place a client processes a Retry, so no caller needs a separate guard. The tradeoff is a stricter client that discards one more Retry shape, against the negligible case of a server that reuses the client's random Initial DCID as its own connection ID.