Skip to content

WebTransport: expose outgoing datagram queue capacity per session - #4037

Open
jesup wants to merge 1 commit into
users/jesup/report_datagramsfrom
users/jesup/expose_queue_capacity
Open

jesup wants to merge 1 commit into
users/jesup/report_datagramsfrom
users/jesup/expose_queue_capacity

Conversation

@jesup

@jesup jesup commented Oct 3, 2026

Copy link
Copy Markdown
Member

No description provided.

@jesup

jesup commented Oct 3, 2026 •

Copy link
Copy Markdown
Member Author

This PR is part of a stack of 4 bookmarks:

  1. trunk()
  2. users/jesup/report_datagrams
  3. users/jesup/expose_queue_capacity ← this PR
  4. users/jesup/add_remote_max_streams
  5. users/jesup/anticipated_incoming_streams

Created with jj-stack

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.

Copilot review overview

🟢 Approval recommended

No blocking issues remain, and the trait change is consistent with the documented compatibility policy for main.

Review effort: Balanced
Findings: None

What changed in this PR

Exposes per-session outgoing datagram queue capacity through the WebTransport client API.

Changes:

  • Adds a capacity accessor with WebTransport session validation.
  • Preserves outgoing datagram statistics during session cleanup.
  • Tests queue isolation, invalid session IDs, and cleanup accounting.
File Description
neqo-http3/​tests/​connect_udp.rs Tests rejection of CONNECT-UDP sessions.
neqo-http3/​src/​webtransport.rs Exposes the client capacity accessor.
neqo-http3/​src/​features/​extended_connect/​tests/​webtransport/​datagrams.rs Tests capacity isolation and cleanup statistics.
neqo-http3/​src/​features/​extended_connect/​session.rs Makes the capacity helper available outside tests.
neqo-http3/​src/​connection.rs Validates capacity requests and records cleanup statistics.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@codecov

codecov Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.00%. Comparing base (6325866) to head (4c6d5b8).

Additional details and impacted files
@@                      Coverage Diff                      @@
##           users/jesup/report_datagrams    #4037   +/-   ##
=============================================================
  Coverage                         97.00%   97.00%           
=============================================================
  Files                               118      118           
  Lines                             41878    41883    +5     
  Branches                          41878    41883    +5     
=============================================================
+ Hits                              40625    40630    +5     
  Misses                             1227     1227           
  Partials                             26       26           
Flag Coverage Δ
freebsd 94.60% <100.00%> (+16.05%) ⬆️
linux 97.20% <100.00%> (+<0.01%) ⬆️
macos 95.39% <100.00%> (+0.02%) ⬆️
windows 95.46% <100.00%> (-0.02%) ⬇️

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

Components Coverage Δ
neqo-common 99.31% <ø> (ø)
neqo-http3 95.41% <100.00%> (+<0.01%) ⬆️
neqo-qpack 97.10% <ø> (ø)
neqo-transport 97.99% <ø> (-0.01%) ⬇️
neqo-udp 95.37% <ø> (ø)
mtu 89.13% <ø> (ø)

@codspeed

codspeed Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will regress 2 benchmarks

⚡ 7 improved benchmarks
❌ 2 regressed benchmarks
✅ 92 untouched benchmarks

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
❌ WallTime quiche-neqo 42 ms 43.6 ms -3.74%
❌ Simulation simulated/pacing-false/same-seed 74.8 ms 76.5 ms -2.24%
⚡ WallTime 1-conn/1-1b-resp (aka. HPS) 3 ms 2.9 ms +3.62%
⚡ WallTime 1-conn/10_000-parallel-1b-resp (aka. RPS) 69.4 ms 67.3 ms +3.11%
⚡ WallTime 1-conn/1-100mb-req (aka. Upload) 49.2 ms 47.9 ms +2.72%
⚡ WallTime walltime/1000-streams/each-1000-bytes 12.9 ms 12.6 ms +2.65%
⚡ WallTime walltime/pacing-true/varying-seeds 2 ms 2 ms +2.37%
⚡ WallTime 1-conn/1-100mb-resp (aka. Download) 49.1 ms 48 ms +2.33%
⚡ WallTime walltime/1000-streams/each-1-bytes 3.8 ms 3.7 ms +2.03%

Tip

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


Comparing users/jesup/expose_queue_capacity (4c6d5b8) with users/jesup/report_datagrams (6325866)

Open in CodSpeed

@jesup
jesup force-pushed the users/jesup/report_datagrams branch from 0989fca to 46d208c Compare October 6, 2026 05:22
@jesup
jesup requested a review from omansfeld as a code owner October 6, 2026 05:22
@jesup
jesup force-pushed the users/jesup/expose_queue_capacity branch from f039ffc to 8b15031 Compare October 6, 2026 05:22
@jesup
jesup force-pushed the users/jesup/report_datagrams branch from 46d208c to 81c0a1c Compare October 12, 2026 15:06
@jesup
jesup force-pushed the users/jesup/expose_queue_capacity branch from 8b15031 to 3becb80 Compare October 12, 2026 15:06
@jesup
jesup force-pushed the users/jesup/report_datagrams branch from 81c0a1c to 06d84c1 Compare October 14, 2026 17:17
@jesup
jesup force-pushed the users/jesup/expose_queue_capacity branch from 3becb80 to 9201b51 Compare October 14, 2026 17:17
@larseggert

Copy link
Copy Markdown
Collaborator

@jesup clippy is unhappy

@jesup
jesup force-pushed the users/jesup/report_datagrams branch from 06d84c1 to 3a436bb Compare October 16, 2026 12:07
@jesup
jesup force-pushed the users/jesup/expose_queue_capacity branch from 9201b51 to 85fd2d6 Compare October 16, 2026 12:07
@jesup
jesup force-pushed the users/jesup/report_datagrams branch from 3a436bb to b235f68 Compare October 16, 2026 14:51
@jesup
jesup force-pushed the users/jesup/expose_queue_capacity branch from 85fd2d6 to 09773fc Compare October 16, 2026 14:51
@jesup
jesup force-pushed the users/jesup/report_datagrams branch from b235f68 to 1eebcea Compare October 16, 2026 16:07
Base automatically changed from users/jesup/report_datagrams to users/jesup/datagram_counting October 17, 2026 01:54
@jesup
jesup force-pushed the users/jesup/datagram_counting branch from 8acfbd3 to 93b5b24 Compare October 17, 2026 13:24
@jesup
jesup changed the base branch from users/jesup/datagram_counting to users/jesup/report_datagrams October 17, 2026 13:25
@jesup
jesup force-pushed the users/jesup/expose_queue_capacity branch from 09773fc to c9d3c36 Compare October 17, 2026 13:39
Add a production-facing Http3Client::webtransport_datagram_queue_capacity,
so a caller (e.g. a content-process credit grant) can read a session's
outgoing-datagram queue state without going through the test-only path.
The underlying transport-level DatagramQueueCapacity snapshot and
per-session accessor already existed but were only reachable from
#[cfg(test)] code; drop that gate now that there's a real caller.
@github-actions

Copy link
Copy Markdown
Contributor

Failed Interop Tests

QUIC Interop Runner, client vs. server, differences relative to users/jesup/report_datagrams at 6325866.

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: ⚠️DC C20 U A L1 C1
neqo-pr vs. lsquic: L1 C1
neqo-pr vs. msquic: Z A L1 C1
neqo-pr vs. mvfst: A BA
neqo-pr vs. neqo: Z A
neqo-pr vs. nginx: BP BA
neqo-pr vs. ngtcp2: Z 🚀L1 C1 CM
neqo-pr vs. picoquic: Z A 🚀BP BA
neqo-pr vs. quic-go: A
neqo-pr vs. quiche: BP BA
neqo-pr vs. s2n-quic: CM
neqo-pr vs. tquic: S BP BA
neqo-pr vs. xquic: S R Z A L1 C1
go-x-net vs. neqo-pr: 🚀BA CM
kwik vs. neqo-pr: BP BA CM
linuxquic vs. neqo-pr: ⚠️CM
msquic vs. neqo-pr: CM
mvfst vs. neqo-pr: Z L1 C1 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: ⚠️C1 CM
quiche vs. neqo-pr: CM
quinn vs. neqo-pr: V2 CM
s2n-quic vs. neqo-pr: 🚀B 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

@github-actions

Copy link
Copy Markdown
Contributor

Client/server transfer results

Performance differences relative to 6325866.

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-neqo-cubic 68.8 ± 0.3 67.7 – 69.6 68.8 ± 0.3 465.2 ± 2.2 💔 +0.8 (+1.1%)

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 ⚠️ 133.7 ± 0.7 132.8 – 139.6 133.6 ± 0.5 239.3 ± 1.3
google-neqo-cubic 68.8 ± 0.3 67.7 – 69.6 68.8 ± 0.3 465.2 ± 2.2 💔 +0.8 (+1.1%)
neqo-google-cubic 236.7 ± 36.9 181.3 – 477.7 235.1 ± 31.1 135.2 ± 21.1 +6.9 (+3.0%)
neqo-neqo-cubic 19.9 ± 0.1 19.6 – 20.1 19.9 ± 0.2 1610.1 ± 10.6 +0.2 (+1.0%)
neqo-neqo-cubic-nopacing 19.7 ± 0.2 19.4 – 20.5 19.7 ± 0.1 1621.6 ± 13.6 -0.0 (-0.0%)
neqo-neqo-newreno 19.9 ± 0.1 19.6 – 20.2 19.9 ± 0.1 1609.2 ± 11.7 -0.0 (-0.2%)
neqo-neqo-newreno-nopacing 19.5 ± 0.2 19.1 – 19.9 19.5 ± 0.2 1642.9 ± 14.1 +0.1 (+0.3%)
neqo-quiche-cubic 29.5 ± 0.2 29.0 – 30.2 29.5 ± 0.2 1084.0 ± 8.0 -0.2 (-0.6%)
neqo-s2n-cubic 38.1 ± 0.2 37.7 – 38.9 38.1 ± 0.2 839.5 ± 3.8 +0.0 (+0.0%)
quiche-neqo-cubic 31.4 ± 0.4 30.4 – 32.3 31.5 ± 0.4 1018.4 ± 13.2 +0.2 (+0.7%)
quiche-quiche 36.1 ± 0.3 35.4 – 37.2 36.0 ± 0.3 887.5 ± 7.9
s2n-neqo-cubic 117.9 ± 0.5 116.5 – 119.4 117.9 ± 0.4 271.4 ± 1.1 +0.1 (+0.1%)
s2n-s2n ⚠️ 165.9 ± 25.1 135.3 – 278.9 160.7 ± 1.2 192.9 ± 29.2

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

@github-actions

Copy link
Copy Markdown
Contributor

Benchmark results

No significant performance differences relative to 6325866.

All results
transfer/1-conn/1-100mb-req (aka. Upload)/mtu-1500
       time:   [50.084 ms 50.110 ms 50.137 ms]
       thrpt:  [1.9478 GiB/s 1.9488 GiB/s 1.9498 GiB/s]
Found 2 outliers among 100 measurements (2.00%)
2 (2.00%) high mild
transfer/1-conn/1-100mb-resp (aka. Download)/mtu-1500
       time:   [50.359 ms 50.401 ms 50.445 ms]
       thrpt:  [1.9359 GiB/s 1.9376 GiB/s 1.9392 GiB/s]
Found 3 outliers among 100 measurements (3.00%)
2 (2.00%) high mild
1 (1.00%) high severe
transfer/1-conn/1-1b-resp (aka. HPS)/mtu-1500
       time:   [2.9410 ms 2.9431 ms 2.9450 ms]
       thrpt:  [339.56   B/s 339.78   B/s 340.02   B/s]
Found 10 outliers among 100 measurements (10.00%)
7 (7.00%) low mild
3 (3.00%) high mild
transfer/1-conn/10_000-parallel-1b-resp (aka. RPS)/mtu-1500
       time:   [67.844 ms 68.102 ms 68.365 ms]
       thrpt:  [146.27 Kelem/s 146.84 Kelem/s 147.40 Kelem/s]
streams-flow-controlled/walltime/1-streams/each-4194304-bytes
       time:   [10.644 ms 10.647 ms 10.650 ms]
       thrpt:  [375.60 MiB/s 375.71 MiB/s 375.81 MiB/s]
Found 4 outliers among 100 measurements (4.00%)
1 (1.00%) low mild
3 (3.00%) high mild
streams-flow-controlled/walltime/10-streams/each-1048576-bytes
       time:   [28.494 ms 28.505 ms 28.516 ms]
       thrpt:  [350.69 MiB/s 350.82 MiB/s 350.95 MiB/s]
Found 2 outliers among 100 measurements (2.00%)
2 (2.00%) high mild
streams/walltime/1-streams/each-1000-bytes
       time:   [131.70 µs 132.23 µs 132.91 µs]
       thrpt:  [7.1754 MiB/s 7.2121 MiB/s 7.2415 MiB/s]
Found 2 outliers among 100 measurements (2.00%)
2 (2.00%) high mild
streams/walltime/1000-streams/each-1-bytes
       time:   [3.8840 ms 3.8961 ms 3.9077 ms]
       thrpt:  [249.90 KiB/s 250.65 KiB/s 251.43 KiB/s]
streams/walltime/1000-streams/each-1000-bytes
       time:   [12.615 ms 12.626 ms 12.638 ms]
       thrpt:  [75.463 MiB/s 75.530 MiB/s 75.597 MiB/s]
transfer/walltime/pacing-false/same-seed
       time:   [2.0314 ms 2.0330 ms 2.0348 ms]
       thrpt:  [1.9198 GiB/s 1.9214 GiB/s 1.9229 GiB/s]
transfer/walltime/pacing-false/varying-seeds
       time:   [2.0156 ms 2.0167 ms 2.0179 ms]
       thrpt:  [1.9358 GiB/s 1.9370 GiB/s 1.9380 GiB/s]
transfer/walltime/pacing-true/same-seed
       time:   [2.0122 ms 2.0135 ms 2.0150 ms]
       thrpt:  [1.9386 GiB/s 1.9401 GiB/s 1.9412 GiB/s]
transfer/walltime/pacing-true/varying-seeds
       time:   [2.0094 ms 2.0109 ms 2.0129 ms]
       thrpt:  [1.9406 GiB/s 1.9425 GiB/s 1.9440 GiB/s]

Instructions per cycle

Criterion reported no significant timing changes.

All benchmarks
Benchmark IPC before IPC after ΔIPC
streams/walltime/1000-streams/each-1000-bytes 2.95 2.92 -1.1%
streams-flow-controlled/walltime/10-streams/each-1048576-bytes 3.19 3.16 -0.8%
streams-flow-controlled/walltime/1-streams/each-4194304-bytes 3.01 3.03 +0.6%
transfer/walltime/pacing-false/varying-seeds 2.85 2.86 +0.6%
transfer/walltime/pacing-false/same-seed 2.86 2.85 -0.4%
transfer/walltime/pacing-true/varying-seeds 2.87 2.88 +0.3%
transfer/walltime/pacing-true/same-seed 2.87 2.86 -0.3%
streams/walltime/1-streams/each-1000-bytes 2.55 2.56 +0.3%
transfer/1-conn/10_000-parallel-1b-resp (aka. RPS)/mtu-1500 3.19 3.19 -0.2%
streams/walltime/1000-streams/each-1-bytes 3.27 3.28 +0.2%
transfer/1-conn/1-100mb-req (aka. Upload)/mtu-1500 3.18 3.18 +0.1%
transfer/1-conn/1-100mb-resp (aka. Download)/mtu-1500 3.22 3.22 +0.0%
transfer/1-conn/1-1b-resp (aka. HPS)/mtu-1500 2.24 2.24 +0.0%
Profiles for profiler.firefox.com (64)

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

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.

4 participants