Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Drop of Initial space only after sending 1st Handshake #2118

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

larseggert
Copy link
Collaborator

This is what RFC9000 says, and it helps with servers that expect ACKs in the Initial packet number space to happen. It also eliminates a difference in behavior we had when a client received an Initial packet containing an ACK and a CRYPTO frame vs. a CRYPTO frame and an ACK, where that CRYPTO frame caused the Initial packet number space to be dropped.

Broken out of #1998

This is what RFC9000 says, and it helps with servers that expect ACKs in
the Initial packet number space to happen. It also eliminates a
difference in behavior we had when a client received an Initial packet
containing an ACK and a CRYPTO frame vs. a CRYPTO frame and an ACK,
where that CRYPTO frame caused the Initial packet number space to be
dropped.

Broken out of mozilla#1998
Copy link

codecov bot commented Sep 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.35%. Comparing base (c6d5502) to head (41463d9).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2118      +/-   ##
==========================================
- Coverage   95.38%   95.35%   -0.03%     
==========================================
  Files         112      112              
  Lines       36593    36590       -3     
==========================================
- Hits        34903    34892      -11     
- Misses       1690     1698       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

github-actions bot commented Sep 16, 2024

Failed Interop Tests

QUIC Interop Runner, client vs. server

neqo-latest as client

neqo-latest as server

All results

Succeeded Interop Tests

QUIC Interop Runner, client vs. server

neqo-latest as client

neqo-latest as server

Unsupported Interop Tests

QUIC Interop Runner, client vs. server

neqo-latest as client

neqo-latest as server

Copy link

github-actions bot commented Sep 16, 2024

Benchmark results

Performance differences relative to c6d5502.

coalesce_acked_from_zero 1+1 entries: Change within noise threshold.
       time:   [99.927 ns 100.28 ns 100.64 ns]
       change: [+0.0982% +0.7185% +1.2427%] (p = 0.01 < 0.05)

Found 12 outliers among 100 measurements (12.00%)
2 (2.00%) high mild
10 (10.00%) high severe

coalesce_acked_from_zero 3+1 entries: Change within noise threshold.
       time:   [118.78 ns 119.15 ns 119.55 ns]
       change: [+0.9611% +1.3874% +1.8044%] (p = 0.00 < 0.05)

Found 17 outliers among 100 measurements (17.00%)
1 (1.00%) low severe
2 (2.00%) low mild
3 (3.00%) high mild
11 (11.00%) high severe

coalesce_acked_from_zero 10+1 entries: Change within noise threshold.
       time:   [118.32 ns 118.76 ns 119.30 ns]
       change: [+0.8059% +1.2969% +1.7302%] (p = 0.00 < 0.05)

Found 15 outliers among 100 measurements (15.00%)
5 (5.00%) low severe
4 (4.00%) high mild
6 (6.00%) high severe

coalesce_acked_from_zero 1000+1 entries: No change in performance detected.
       time:   [98.203 ns 100.74 ns 106.57 ns]
       change: [+0.7503% +6.3497% +16.564%] (p = 0.19 > 0.05)

Found 12 outliers among 100 measurements (12.00%)
5 (5.00%) high mild
7 (7.00%) high severe

RxStreamOrderer::inbound_frame(): Change within noise threshold.
       time:   [111.51 ms 111.56 ms 111.61 ms]
       change: [+0.0434% +0.1140% +0.1834%] (p = 0.00 < 0.05)

Found 14 outliers among 100 measurements (14.00%)
1 (1.00%) low severe
6 (6.00%) low mild
7 (7.00%) high mild

SentPackets::take_ranges: No change in performance detected.
       time:   [5.5640 µs 5.7315 µs 5.8999 µs]
       change: [-3.2969% +5.6470% +20.364%] (p = 0.50 > 0.05)

Found 7 outliers among 100 measurements (7.00%)
6 (6.00%) high mild
1 (1.00%) high severe

transfer/pacing-false/varying-seeds: Change within noise threshold.
       time:   [26.794 ms 27.953 ms 29.116 ms]
       change: [+0.3304% +6.3231% +12.918%] (p = 0.05 < 0.05)

Found 2 outliers among 100 measurements (2.00%)
2 (2.00%) low mild

transfer/pacing-true/varying-seeds: 💔 Performance has regressed.
       time:   [36.540 ms 38.108 ms 39.699 ms]
       change: [+4.2156% +10.920% +18.569%] (p = 0.00 < 0.05)

Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high mild

transfer/pacing-false/same-seed: 💚 Performance has improved.
       time:   [9.5426 ms 9.9066 ms 10.286 ms]
       change: [-63.561% -61.898% -60.157%] (p = 0.00 < 0.05)

Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high mild

transfer/pacing-true/same-seed: 💚 Performance has improved.
       time:   [28.572 ms 30.175 ms 31.783 ms]
       change: [-32.273% -27.242% -21.923%] (p = 0.00 < 0.05)
1-conn/1-100mb-resp/mtu-1504 (aka. Download)/client: 💚 Performance has improved.
       time:   [870.36 ms 880.74 ms 891.26 ms]
       thrpt:  [112.20 MiB/s 113.54 MiB/s 114.89 MiB/s]
change:
       time:   [-4.1859% -2.6810% -1.0336%] (p = 0.00 < 0.05)
       thrpt:  [+1.0444% +2.7548% +4.3688%]
1-conn/10_000-parallel-1b-resp/mtu-1504 (aka. RPS)/client: No change in performance detected.
       time:   [320.15 ms 323.25 ms 326.39 ms]
       thrpt:  [30.638 Kelem/s 30.936 Kelem/s 31.235 Kelem/s]
change:
       time:   [-1.7931% -0.5204% +0.7818%] (p = 0.46 > 0.05)
       thrpt:  [-0.7758% +0.5232% +1.8258%]
1-conn/1-1b-resp/mtu-1504 (aka. HPS)/client: No change in performance detected.
       time:   [33.666 ms 33.845 ms 34.032 ms]
       thrpt:  [29.384  elem/s 29.546  elem/s 29.704  elem/s]
change:
       time:   [-0.6877% +0.1886% +1.0155%] (p = 0.67 > 0.05)
       thrpt:  [-1.0053% -0.1882% +0.6924%]

Found 4 outliers among 100 measurements (4.00%)
3 (3.00%) high mild
1 (1.00%) high severe

1-conn/1-100mb-resp/mtu-1504 (aka. Upload)/client: No change in performance detected.
       time:   [1.6595 s 1.6799 s 1.7006 s]
       thrpt:  [58.802 MiB/s 59.529 MiB/s 60.257 MiB/s]
change:
       time:   [-0.8913% +1.0230% +2.8378%] (p = 0.28 > 0.05)
       thrpt:  [-2.7595% -1.0127% +0.8994%]

Client/server transfer results

Transfer of 33554432 bytes over loopback.

Client Server CC Pacing MTU Mean [ms] Min [ms] Max [ms]
gquiche gquiche 1504 586.9 ± 68.4 513.4 717.9
neqo gquiche reno on 1504 826.4 ± 79.3 760.4 966.4
neqo gquiche reno 1504 813.3 ± 64.3 761.1 976.6
neqo gquiche cubic on 1504 799.7 ± 12.9 777.7 813.8
neqo gquiche cubic 1504 783.5 ± 72.5 736.9 987.3
msquic msquic 1504 164.8 ± 90.3 101.5 362.5
neqo msquic reno on 1504 221.3 ± 13.1 204.5 248.1
neqo msquic reno 1504 260.2 ± 68.7 198.9 404.2
neqo msquic cubic on 1504 239.3 ± 57.3 209.7 417.6
neqo msquic cubic 1504 286.2 ± 86.6 207.3 457.4
gquiche neqo reno on 1504 721.6 ± 128.6 578.8 1020.2
gquiche neqo reno 1504 685.4 ± 89.1 556.6 826.5
gquiche neqo cubic on 1504 721.4 ± 95.0 547.5 812.5
gquiche neqo cubic 1504 736.0 ± 118.2 565.0 960.2
msquic neqo reno on 1504 499.8 ± 36.0 469.8 586.6
msquic neqo reno 1504 529.0 ± 41.2 493.8 615.5
msquic neqo cubic on 1504 484.7 ± 10.0 471.1 501.7
msquic neqo cubic 1504 517.3 ± 88.4 468.0 718.0
neqo neqo reno on 1504 533.2 ± 47.1 473.0 600.5
neqo neqo reno 1504 506.0 ± 23.2 462.3 534.4
neqo neqo cubic on 1504 537.4 ± 43.2 471.8 603.8
neqo neqo cubic 1504 543.1 ± 44.3 464.9 609.6

⬇️ Download logs

Copy link

github-actions bot commented Sep 16, 2024

Firefox builds for this PR

The following builds are available for testing. Crossed-out builds did not succeed.

Copy link
Collaborator

@mxinden mxinden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense to me.

Can you link to the concrete section of RFC 9000 you are referring to?

I can only find the following in RFC 9001 4.9.1:

The successful use of Handshake packets indicates that no more Initial packets need to be exchanged, as these keys can only be produced after receiving all CRYPTO frames from Initial packets. Thus, a client MUST discard Initial keys when it first sends a Handshake packet and a server MUST discard Initial keys when it first successfully processes a Handshake packet. Endpoints MUST NOT send Initial packets after this point.

https://www.rfc-editor.org/rfc/rfc9001#section-4.9.1

@larseggert
Copy link
Collaborator Author

That is the section in question.

@larseggert
Copy link
Collaborator Author

@martinthomson I'd appreciate a review, since the code I am touching is pretty complex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants