Skip to content

fix(transport): Validate ECN on paths a peer migrates to - #4390

Open
larseggert wants to merge 2 commits into
mainfrom
server-ecn-on-migration
Open

larseggert wants to merge 2 commits into
mainfrom
server-ecn-on-migration

Conversation

@larseggert

Copy link
Copy Markdown
Collaborator

RFC 9000 Section 9.4 requires ECN validation on new paths, also for the server.

RFC 9000 Section 9.4 requires ECN validation on new paths, also for the server.
@larseggert
larseggert marked this pull request as ready for review November 17, 2026 19:51
Copilot AI balanced review requested due to automatic review settings November 17, 2026 19:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are reported for the QUIC path-migration ECN validation change.

No open issues 🎉

What changed in this PR

This PR updates QUIC transport path migration to start Explicit Congestion Notification (ECN) validation when a peer migrates, including on the server, as required by RFC 9000 Section 9.4.

Changes:

  • Carry the old path’s ECN baseline to the new primary path and start ECN validation.
  • Strengthen migration tests to assert that the server’s outgoing datagram has ECN enabled.
File Description
neqo-transport/​src/​path.rs Initializes the ECN baseline and starts validation on peer migration.
neqo-transport/​src/​connection/​tests/​ecn.rs Checks that server traffic uses ECN on the migrated path.

Review effort: Balanced

@codecov

codecov Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.62%. Comparing base (28908fa) to head (26e44fb).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4390      +/-   ##
==========================================
- Coverage   96.74%   96.62%   -0.12%     
==========================================
  Files         113      118       +5     
  Lines       43491    43897     +406     
  Branches    43491    43897     +406     
==========================================
+ Hits        42074    42416     +342     
- Misses       1405     1460      +55     
- Partials       12       21       +9     
Flag Coverage Δ
freebsd 94.15% <100.00%> (-0.08%) ⬇️
linux 96.78% <100.00%> (+0.01%) ⬆️
macos 94.53% <100.00%> (+0.01%) ⬆️
windows 94.56% <100.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
neqo-common 99.33% <ø> (ø)
neqo-http3 96.00% <ø> (ø)
neqo-qpack 96.55% <ø> (ø)
neqo-transport 97.14% <100.00%> (+<0.01%) ⬆️
neqo-udp 87.63% <ø> (ø)
mtu 91.31% <ø> (ø)

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No findings.

@codspeed

codspeed Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will degrade performance by 1.67%

1 warning

⚠️ 1 benchmark is dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

⚡ 1 improved benchmark
❌ 4 regressed benchmarks
✅ 96 untouched benchmarks

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
❌ Walltime 1-conn/1-100mb-req (aka. Upload) 60.8 ms 62.9 ms -3.21%
❌ Walltime walltime/pacing-false/same-seed 3.5 ms 3.6 ms -2.9%
❌ Walltime walltime/pacing-false/varying-seeds 3.4 ms 3.4 ms -2.82%
❌ Walltime 1-conn/10_000-parallel-1b-resp (aka. RPS) 84 ms 85.9 ms -2.14%
⚡ Walltime quiche-neqo 48.2 ms 46.9 ms +2.85%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing server-ecn-on-migration (26e44fb) with main (28908fa)

Open in CodSpeed

Bleaching on a peer-migrated path must be detected against the old path's ECN counts.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No findings.

@github-actions

Copy link
Copy Markdown
Contributor

Benchmark results

No significant performance differences relative to 28908fa.

All results
transfer/1-conn/1-100mb-req (aka. Upload)/mtu-1500
       time:   [61.071 ms 61.122 ms 61.172 ms]
       thrpt:  [1.5964 GiB/s 1.5977 GiB/s 1.5991 GiB/s]
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) low mild
transfer/1-conn/1-100mb-resp (aka. Download)/mtu-1500
       time:   [60.537 ms 60.598 ms 60.658 ms]
       thrpt:  [1.6099 GiB/s 1.6115 GiB/s 1.6132 GiB/s]
transfer/1-conn/1-1b-resp (aka. HPS)/mtu-1500
       time:   [3.8053 ms 3.8065 ms 3.8077 ms]
       thrpt:  [262.63   B/s 262.71   B/s 262.79   B/s]
Found 4 outliers among 100 measurements (4.00%)
1 (1.00%) low mild
2 (2.00%) high mild
1 (1.00%) high severe
transfer/1-conn/10_000-parallel-1b-resp (aka. RPS)/mtu-1500
       time:   [86.936 ms 87.108 ms 87.280 ms]
       thrpt:  [114.57 Kelem/s 114.80 Kelem/s 115.03 Kelem/s]
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high mild
streams-flow-controlled/walltime/1-streams/each-4194304-bytes
       time:   [12.798 ms 12.805 ms 12.812 ms]
       thrpt:  [312.20 MiB/s 312.37 MiB/s 312.54 MiB/s]
Found 7 outliers among 100 measurements (7.00%)
6 (6.00%) high mild
1 (1.00%) high severe
streams-flow-controlled/walltime/10-streams/each-1048576-bytes
       time:   [35.492 ms 35.511 ms 35.532 ms]
       thrpt:  [281.44 MiB/s 281.60 MiB/s 281.76 MiB/s]
Found 6 outliers among 100 measurements (6.00%)
4 (4.00%) high mild
2 (2.00%) high severe
streams/walltime/1-streams/each-1000-bytes
       time:   [159.91 µs 160.58 µs 161.44 µs]
       thrpt:  [5.9073 MiB/s 5.9389 MiB/s 5.9638 MiB/s]
Found 2 outliers among 100 measurements (2.00%)
2 (2.00%) high mild
streams/walltime/1000-streams/each-1-bytes
       time:   [4.7670 ms 4.7687 ms 4.7704 ms]
       thrpt:  [204.71 KiB/s 204.78 KiB/s 204.86 KiB/s]
Found 2 outliers among 100 measurements (2.00%)
1 (1.00%) low severe
1 (1.00%) low mild
streams/walltime/1000-streams/each-1000-bytes
       time:   [15.120 ms 15.132 ms 15.143 ms]
       thrpt:  [62.977 MiB/s 63.026 MiB/s 63.075 MiB/s]
transfer/walltime/pacing-false/same-seed
       time:   [3.3159 ms 3.3215 ms 3.3267 ms]
       thrpt:  [1.1742 GiB/s 1.1761 GiB/s 1.1780 GiB/s]
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high mild
transfer/walltime/pacing-false/varying-seeds
       time:   [3.2836 ms 3.2851 ms 3.2870 ms]
       thrpt:  [1.1884 GiB/s 1.1891 GiB/s 1.1896 GiB/s]
transfer/walltime/pacing-true/same-seed
       time:   [4.0658 ms 4.0678 ms 4.0702 ms]
       thrpt:  [982.74 MiB/s 983.33 MiB/s 983.81 MiB/s]
transfer/walltime/pacing-true/varying-seeds
       time:   [3.9599 ms 3.9615 ms 3.9633 ms]
       thrpt:  [1009.3 MiB/s 1009.7 MiB/s 1010.1 MiB/s]

Instructions per cycle

Criterion reported no significant timing changes.

All benchmarks
Benchmark IPC before IPC after ΔIPC
streams-flow-controlled/walltime/1-streams/each-4194304-bytes 2.98 3.01 +1.1%
transfer/1-conn/1-100mb-resp (aka. Download)/mtu-1500 3.11 3.13 +0.9%
transfer/1-conn/1-100mb-req (aka. Upload)/mtu-1500 3.09 3.12 +0.9%
transfer/walltime/pacing-true/varying-seeds 2.86 2.88 +0.9%
transfer/walltime/pacing-false/same-seed 2.84 2.86 +0.8%
transfer/walltime/pacing-true/same-seed 2.89 2.87 -0.7%
streams/walltime/1000-streams/each-1000-bytes 2.98 2.96 -0.7%
streams-flow-controlled/walltime/10-streams/each-1048576-bytes 3.12 3.14 +0.7%
streams/walltime/1-streams/each-1000-bytes 2.57 2.56 -0.5%
transfer/walltime/pacing-false/varying-seeds 2.88 2.87 -0.4%
streams/walltime/1000-streams/each-1-bytes 3.28 3.28 +0.2%
transfer/1-conn/1-1b-resp (aka. HPS)/mtu-1500 2.25 2.24 -0.1%
transfer/1-conn/10_000-parallel-1b-resp (aka. RPS)/mtu-1500 3.24 3.24 +0.0%
Profiles for profiler.firefox.com (64)

Download data for profiler.firefox.com or download performance comparison data.

@github-actions

Copy link
Copy Markdown
Contributor

Client/server transfer results

Performance differences relative to 28908fa.

Transfer of 33554432 bytes over loopback, min. 100 runs. All unit-less numbers are in milliseconds.

Client vs. server Mean±σ Min–Max Median±MAD MiB/s±σ ΔMedian
neqo-neqo-cubic-nopacing 23.4 ± 0.2 23.1 – 24.1 23.4 ± 0.1 1366.2 ± 10.2 💔 +0.3 (+1.3%)
neqo-neqo-newreno 23.9 ± 0.2 23.6 – 24.6 23.9 ± 0.2 1338.7 ± 10.9 💔 +0.3 (+1.4%)
neqo-neqo-newreno-nopacing 23.3 ± 0.2 22.9 – 24.3 23.2 ± 0.1 1374.8 ± 11.6 💔 +0.3 (+1.2%)
quiche-neqo-cubic 36.6 ± 0.5 35.4 – 37.7 36.5 ± 0.5 874.9 ± 11.9 💔 +0.4 (+1.2%)

Table above only shows statistically significant changes. See all results below.

All results

Transfer of 33554432 bytes over loopback, min. 100 runs. All unit-less numbers are in milliseconds.

Client vs. server Mean±σ Min–Max Median±MAD MiB/s±σ ΔMedian
google-google 156.6 ± 0.7 155.2 – 160.9 156.6 ± 0.7 204.3 ± 1.0
google-neqo-cubic 79.7 ± 0.4 78.7 – 80.6 79.7 ± 0.3 401.6 ± 1.9 +0.5 (+0.6%)
neqo-google-cubic 241.8 ± 38.2 202.1 – 322.8 235.2 ± 41.0 132.4 ± 20.9 +23.1 (+10.9%)
neqo-neqo-cubic 24.0 ± 0.2 23.7 – 24.4 24.0 ± 0.2 1332.4 ± 9.3 +0.1 (+0.6%)
neqo-neqo-cubic-nopacing 23.4 ± 0.2 23.1 – 24.1 23.4 ± 0.1 1366.2 ± 10.2 💔 +0.3 (+1.3%)
neqo-neqo-newreno 23.9 ± 0.2 23.6 – 24.6 23.9 ± 0.2 1338.7 ± 10.9 💔 +0.3 (+1.4%)
neqo-neqo-newreno-nopacing 23.3 ± 0.2 22.9 – 24.3 23.2 ± 0.1 1374.8 ± 11.6 💔 +0.3 (+1.2%)
neqo-quiche-cubic 35.2 ± 0.3 34.5 – 36.2 35.2 ± 0.3 908.2 ± 8.8 +0.1 (+0.2%)
neqo-s2n-cubic 45.6 ± 0.2 45.0 – 46.0 45.6 ± 0.2 702.3 ± 3.2 +0.0 (+0.1%)
quiche-neqo-cubic 36.6 ± 0.5 35.4 – 37.7 36.5 ± 0.5 874.9 ± 11.9 💔 +0.4 (+1.2%)
quiche-quiche 42.7 ± 0.3 42.0 – 43.4 42.7 ± 0.3 750.0 ± 4.5
s2n-neqo-cubic 126.7 ± 0.7 125.3 – 128.5 126.7 ± 0.6 252.7 ± 1.4 +0.1 (+0.0%)
s2n-s2n ⚠️ 177.2 ± 24.6 148.3 – 270.0 171.3 ± 1.3 180.6 ± 25.1

Download data for profiler.firefox.com or download performance comparison data.

@github-actions

Copy link
Copy Markdown
Contributor

Failed Interop Tests

QUIC Interop Runner, client vs. server, differences relative to main at 28908fa.

neqo-pr as clientneqo-pr as server
neqo-pr vs. go-x-net: BP BA
neqo-pr vs. haproxy: BP BA
neqo-pr vs. kwik: 🚀S ⚠️C20 Z 🚀3 B L1 C1 🚀C2
neqo-pr vs. linuxquic: CM
neqo-pr vs. lsquic: baseline result missing
neqo-pr vs. msquic: A L1 C1
neqo-pr vs. mvfst: H DC LR C20 M S R Z 3 B U E A L1 L2 C1 C2 6 V2 BP BA CM
neqo-pr vs. neqo: 🚀Z A
neqo-pr vs. nginx: BP BA
neqo-pr vs. ngtcp2: Z 🚀L1 C1 CM
neqo-pr vs. picoquic: A 🚀BP
neqo-pr vs. quic-go: A
neqo-pr vs. quiche: ⚠️L1 BP BA
neqo-pr vs. s2n-quic: CM
neqo-pr vs. tquic: S 🚀C1 BP BA
neqo-pr vs. xquic: S R Z A L1 C1
go-x-net vs. neqo-pr: CM
kwik vs. neqo-pr: CM
msquic vs. neqo-pr: CM
mvfst vs. neqo-pr: H DC LR C20 M S R Z 3 B U E A L1 L2 C1 C2 6 V2 BP BA CM
neqo vs. neqo-pr: ⚠️Z A
openssl vs. neqo-pr: LR M A CM
quic-go vs. neqo-pr: CM
quic-zig vs. neqo-pr: CM
quiche vs. neqo-pr: ⚠️L1 CM
quinn vs. neqo-pr: V2 CM
rama vs. neqo-pr: ⚠️C1
s2n-quic vs. neqo-pr: 🚀BP BA CM
tquic vs. neqo-pr: CM
xquic vs. neqo-pr: M CM
All results

Succeeded Interop Tests

QUIC Interop Runner, client vs. server

neqo-pr as client

neqo-pr as server

Unsupported Interop Tests

QUIC Interop Runner, client vs. server

neqo-pr as client

neqo-pr as server

This branch has not been deployed

No deployments
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