Skip to content

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

Open
jesup wants to merge 2 commits into
users/jesup/report_datagramsfrom
users/jesup/expose_queue_capacity
Open

jesup wants to merge 2 commits 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 added 2 commits October 3, 2026 01:38
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.
@jesup

jesup commented Oct 3, 2026

Copy link
Copy Markdown
Member Author

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 96.93%. Comparing base (0989fca) to head (f039ffc).

Additional details and impacted files
@@                      Coverage Diff                      @@
##           users/jesup/report_datagrams    #4037   +/-   ##
=============================================================
  Coverage                         96.92%   96.93%           
=============================================================
  Files                               119      119           
  Lines                             41579    41584    +5     
  Branches                          41579    41584    +5     
=============================================================
+ Hits                              40301    40308    +7     
+ Misses                             1254     1252    -2     
  Partials                             24       24           
Flag Coverage Δ
freebsd 94.46% <100.00%> (+15.91%) ⬆️
linux 97.14% <100.00%> (+<0.01%) ⬆️
macos 95.30% <100.00%> (+<0.01%) ⬆️
windows 95.39% <100.00%> (+<0.01%) ⬆️

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 96.97% <ø> (ø)
neqo-transport 97.89% <ø> (+<0.01%) ⬆️
neqo-udp 95.37% <ø> (ø)
mtu 89.13% <ø> (ø)

@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Failed Interop Tests

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

neqo-pr as clientneqo-pr as server
neqo-pr vs. aioquic: ⚠️L1
neqo-pr vs. go-x-net: BP BA
neqo-pr vs. haproxy: BP BA
neqo-pr vs. kwik: ⚠️LR Z B A L1 C1 ⚠️BA
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
neqo-pr vs. quic-go: A
neqo-pr vs. quiche: baseline result missing
neqo-pr vs. s2n-quic: CM
neqo-pr vs. tquic: S BP BA
neqo-pr vs. xquic: S R Z A L1 C1
aioquic vs. neqo-pr: CM
go-x-net vs. neqo-pr: CM
kwik vs. neqo-pr: BP BA CM
linuxquic vs. neqo-pr: ⚠️CM
lsquic vs. neqo-pr: ⚠️L1
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: CM
quiche vs. neqo-pr: CM
quinn vs. neqo-pr: ⚠️L1 V2 CM
s2n-quic vs. neqo-pr: ⚠️C1 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

@codspeed

codspeed Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will improve performance by 4.41%

⚡ 11 improved benchmarks
✅ 88 untouched benchmarks

Performance Changes

Mode Benchmark BASE HEAD Efficiency
⚡ WallTime 1-conn/1-100mb-req (aka. Upload) 49.8 ms 46.5 ms +6.96%
⚡ WallTime 1-conn/1-100mb-resp (aka. Download) 49.9 ms 46.8 ms +6.56%
⚡ WallTime walltime/1000-streams/each-1000-bytes 11.8 ms 11.2 ms +5.71%
⚡ WallTime walltime/10-streams/each-1048576-bytes 29.4 ms 28 ms +5.24%
⚡ WallTime walltime/1-streams/each-4194304-bytes 11.1 ms 10.6 ms +4.75%
⚡ WallTime walltime/pacing-false/same-seed 2.1 ms 2 ms +4.45%
⚡ WallTime walltime/1-streams/each-1000-bytes 132.3 µs 127.6 µs +3.73%
⚡ WallTime 1-conn/10_000-parallel-1b-resp (aka. RPS) 69.6 ms 67.4 ms +3.2%
⚡ WallTime walltime/pacing-true/varying-seeds 2.1 ms 2 ms +3.18%
⚡ WallTime walltime/pacing-true/same-seed 2.1 ms 2 ms +2.75%
⚡ WallTime neqo-s2n 50.1 ms 49 ms +2.11%

Tip

Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.


Comparing users/jesup/expose_queue_capacity (f039ffc) with users/jesup/report_datagrams (0989fca)

Open in CodSpeed

@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Benchmark results

No significant performance differences relative to 0989fca.

All results
transfer/1-conn/1-100mb-req (aka. Upload)/mtu-1500
       time:   [49.628 ms 49.663 ms 49.698 ms]
       thrpt:  [1.9650 GiB/s 1.9664 GiB/s 1.9678 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:   [49.230 ms 49.275 ms 49.322 ms]
       thrpt:  [1.9800 GiB/s 1.9819 GiB/s 1.9837 GiB/s]
Found 3 outliers among 100 measurements (3.00%)
3 (3.00%) high mild
transfer/1-conn/1-1b-resp (aka. HPS)/mtu-1500
       time:   [2.9813 ms 2.9823 ms 2.9832 ms]
       thrpt:  [335.21   B/s 335.31   B/s 335.42   B/s]
Found 10 outliers among 100 measurements (10.00%)
4 (4.00%) low mild
4 (4.00%) high mild
2 (2.00%) high severe
transfer/1-conn/10_000-parallel-1b-resp (aka. RPS)/mtu-1500
       time:   [67.187 ms 67.472 ms 67.761 ms]
       thrpt:  [147.58 Kelem/s 148.21 Kelem/s 148.84 Kelem/s]
Found 2 outliers among 100 measurements (2.00%)
2 (2.00%) high mild
streams-flow-controlled/walltime/1-streams/each-4194304-bytes
       time:   [10.395 ms 10.397 ms 10.399 ms]
       thrpt:  [384.65 MiB/s 384.73 MiB/s 384.81 MiB/s]
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high mild
streams-flow-controlled/walltime/10-streams/each-1048576-bytes
       time:   [28.012 ms 28.020 ms 28.029 ms]
       thrpt:  [356.78 MiB/s 356.89 MiB/s 357.00 MiB/s]
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high mild
streams/walltime/1-streams/each-1000-bytes
       time:   [131.48 µs 132.07 µs 132.83 µs]
       thrpt:  [7.1798 MiB/s 7.2207 MiB/s 7.2535 MiB/s]
Found 2 outliers among 100 measurements (2.00%)
2 (2.00%) high mild
streams/walltime/1000-streams/each-1-bytes
       time:   [3.7416 ms 3.7551 ms 3.7683 ms]
       thrpt:  [259.15 KiB/s 260.07 KiB/s 261.00 KiB/s]
streams/walltime/1000-streams/each-1000-bytes
       time:   [11.143 ms 11.147 ms 11.151 ms]
       thrpt:  [85.523 MiB/s 85.555 MiB/s 85.587 MiB/s]
Found 3 outliers among 100 measurements (3.00%)
3 (3.00%) low mild
transfer/walltime/pacing-false/same-seed
       time:   [2.0423 ms 2.0431 ms 2.0441 ms]
       thrpt:  [1.9110 GiB/s 1.9119 GiB/s 1.9126 GiB/s]
transfer/walltime/pacing-false/varying-seeds
       time:   [2.0499 ms 2.0508 ms 2.0518 ms]
       thrpt:  [1.9038 GiB/s 1.9048 GiB/s 1.9056 GiB/s]
transfer/walltime/pacing-true/same-seed
       time:   [2.0738 ms 2.0750 ms 2.0765 ms]
       thrpt:  [1.8812 GiB/s 1.8825 GiB/s 1.8836 GiB/s]
transfer/walltime/pacing-true/varying-seeds
       time:   [2.1143 ms 2.1164 ms 2.1188 ms]
       thrpt:  [1.8436 GiB/s 1.8457 GiB/s 1.8475 GiB/s]
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high mild

Instructions per cycle

Criterion reported no significant timing changes.

All benchmarks
Benchmark IPC before IPC after ΔIPC
streams/walltime/1000-streams/each-1000-bytes 3.06 3.08 +0.8%
streams-flow-controlled/walltime/10-streams/each-1048576-bytes 3.20 3.22 +0.7%
transfer/walltime/pacing-true/varying-seeds 2.88 2.86 -0.6%
transfer/1-conn/1-100mb-resp (aka. Download)/mtu-1500 3.20 3.22 +0.6%
transfer/1-conn/10_000-parallel-1b-resp (aka. RPS)/mtu-1500 3.24 3.22 -0.5%
streams-flow-controlled/walltime/1-streams/each-4194304-bytes 3.04 3.03 -0.4%
streams/walltime/1-streams/each-1000-bytes 2.53 2.52 -0.2%
streams/walltime/1000-streams/each-1-bytes 3.29 3.28 -0.2%
transfer/walltime/pacing-true/same-seed 2.89 2.88 -0.1%
transfer/1-conn/1-100mb-req (aka. Upload)/mtu-1500 3.18 3.19 +0.1%
transfer/walltime/pacing-false/same-seed 2.89 2.88 -0.0%
transfer/1-conn/1-1b-resp (aka. HPS)/mtu-1500 2.24 2.24 +0.0%
transfer/walltime/pacing-false/varying-seeds 2.88 2.88 +0.0%
Profiles for profiler.firefox.com (62)

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

@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Client/server transfer results

Performance differences relative to 0989fca.

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 69.9 ± 0.4 69.1 – 70.8 69.9 ± 0.3 457.8 ± 2.4 💔 +1.3 (+1.9%)
neqo-neqo-newreno 19.6 ± 0.1 19.4 – 20.3 19.6 ± 0.1 1631.9 ± 12.1 💚 -0.5 (-2.4%)

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.9 ± 0.5 132.5 – 135.1 133.9 ± 0.6 239.0 ± 0.9
google-neqo-cubic 69.9 ± 0.4 69.1 – 70.8 69.9 ± 0.3 457.8 ± 2.4 💔 +1.3 (+1.9%)
neqo-google-cubic 238.8 ± 44.4 179.8 – 481.2 238.3 ± 30.7 134.0 ± 24.9 +11.9 (+5.3%)
neqo-neqo-cubic 19.1 ± 0.2 18.6 – 19.6 19.1 ± 0.2 1677.1 ± 14.4 -0.1 (-0.7%)
neqo-neqo-cubic-nopacing 19.3 ± 0.2 18.8 – 19.6 19.3 ± 0.2 1659.4 ± 13.9 -0.1 (-0.7%)
neqo-neqo-newreno 19.6 ± 0.1 19.4 – 20.3 19.6 ± 0.1 1631.9 ± 12.1 💚 -0.5 (-2.4%)
neqo-neqo-newreno-nopacing 19.5 ± 0.2 19.1 – 20.1 19.5 ± 0.1 1639.1 ± 14.5 -0.1 (-0.6%)
neqo-quiche-cubic 32.7 ± 0.3 32.3 – 33.3 32.7 ± 0.4 978.3 ± 8.3 +0.1 (+0.4%)
neqo-s2n-cubic 37.8 ± 0.2 37.4 – 38.2 37.8 ± 0.2 847.2 ± 3.7 -0.0 (-0.0%)
quiche-neqo-cubic 38.4 ± 0.4 37.8 – 39.8 38.3 ± 0.3 833.1 ± 8.4 -0.0 (-0.1%)
quiche-quiche 38.6 ± 0.3 38.0 – 39.7 38.6 ± 0.2 828.3 ± 5.9
s2n-neqo-cubic 112.2 ± 0.4 111.2 – 113.3 112.1 ± 0.3 285.2 ± 1.0 +0.1 (+0.1%)
s2n-s2n ⚠️ 163.8 ± 24.7 134.4 – 260.3 158.7 ± 0.8 195.3 ± 29.4

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.

2 participants