Commit Graph

4783 Commits

Author SHA1 Message Date
dignifiedquire ea97bd1d75 fixup: avoid double scanning ack ranges 2026-01-13 23:48:58 +01:00
dignifiedquire d2516f63f2 refactor(proto): stor ArrayRangeSet in Acks
Before they were decoded lazily, but that work as done many times over and over again, when they where ever logged in debug mode. This decodes these immediately and stores them in an `ArrayRangeSet`

Also moves the debug impl to the `ArrayRangeSet` making that print more easily
2026-01-13 22:06:01 +01:00
Diva Martínez 7e5d8b4280 rename PacketBuilder's encode to write_frame 2026-01-13 14:36:03 -05:00
Diva Martínez 475c99ebfb leverage enum_assoc 2026-01-13 14:30:16 -05:00
Diva Martínez 999660549c remove files that shouldn't be there 2026-01-13 12:28:40 -05:00
Diva Martínez 11a030e034 remove nice but deprecated code :( 2026-01-13 12:08:50 -05:00
Diva Martínez 7162b0bcdb Merge remote-tracking branch 'n0/main' into final-step 2026-01-13 12:05:45 -05:00
Floris Bruynooghe daaa4e84f8 docs(proto): improve path generations internal docs (#311)
* docs(proto): improve path generations internal docs

* Try and improve wording

* more rewording
2026-01-13 14:06:01 +00:00
Floris Bruynooghe 4b6ac1c7da fix(proto): Store pending PATH_CID_BLOCKED frames in a BTreeSet (#307)
When adding items to this we generally don't want to worry about
checking if the value is already pending. Currently we keep adding to
the Vec with the same value in some situations, resulting in sending
the frame many times for the same path.

This avoids duplicate entries.
2026-01-13 09:23:55 +00:00
Rüdiger Klaehn feeafe40c9 Disable fuzz code unless fuzzing config is set (#309)
With this we no longer get compile errors in vscode because the fuzzing
code uses fns that are themselves gated with cfg(fuzzing).

We have to tell rust about the feature in Cargo.toml to avoid warnings.
2026-01-13 09:20:49 +00:00
Friedel Ziegelmayer 2ae68e6dd1 feat(proto)!: update to final IANA numbers for multipath (#302)
Ref https://github.com/quicwg/multipath/pull/630
2026-01-12 18:49:49 +00:00
Friedel Ziegelmayer 0c3de90490 chore: merge upstream until b53828f0e4 (#303)
Merges commits from upstream quinn up to
`b53828f0e48752f771c2538364c8876a907a0345`

These where cherry-picked manually, and I skipped dependabot commits,
and
https://github.com/quinn-rs/quinn/commit/c6d3b7545e4def35d2295f9f1bc81ebb8fc34983
2026-01-12 18:26:55 +00:00
Benjamin Saunders 4cff3e3dac Remove deprecated functions 2026-01-12 16:46:28 +01:00
Benjamin Saunders a1a927d1f2 Remove deprecated RNG seed argument from Endpoint::new 2026-01-12 16:46:28 +01:00
Benjamin Saunders 9aa5a6e727 Move default client config into shared endpoint state
This was the only mutable handle state, and hence stood out as a
surprising special case.
2026-01-12 16:46:28 +01:00
Sebastian Leisinger b8c2bdad4d Fix dropping oversized unblocks datagram senders
When dropping oversized datagrams after an MTU change, notify
callers of `send_datagram_wait` that are waiting for
space in the send buffer.

Tracking issue: https://github.com/quinn-rs/quinn/issues/2456
2026-01-12 16:46:28 +01:00
Thomas Eizinger d1bbfc044f fix(windows): use effective_segment_size
Similar to older Linux kernels, Windows doesn't appear to like being
told to do GSO if it is not necessary.
2026-01-12 16:46:28 +01:00
Thomas Eizinger 9008656e7f refactor: introduce Transmit::effective_segment_size 2026-01-12 16:46:28 +01:00
Dirkjan Ochtman 5c4255a74d Warn on clippy::or_fun_call 2026-01-12 16:46:28 +01:00
Dirkjan Ochtman fbfcf5ff3b Warn on unnameable_types 2026-01-12 16:46:28 +01:00
Dirkjan Ochtman 91a4281c7f Warn on elided_lifetimes_in_paths 2026-01-12 16:46:28 +01:00
Dirkjan Ochtman 6cb31438bb Hoist lint configuration to the workspace level 2026-01-12 16:46:28 +01:00
Lars Eggert d22db5291c refactor(quinn-udp): make decode_recv generic over MsgHdr
Replace conditional compilation on the `hdr` parameter with a generic type bound `M: cmsg::MsgHdr<ControlMessage = libc::cmsghdr>`. This enables `decode_recv` to work with both `libc::msghdr` and `msghdr_x` message types.

Broken out of #2463 as suggested by @djc.
2026-01-12 16:46:28 +01:00
朝倉水希 0a6c94af8c chore(quinn-udp): use consts from libc 2026-01-12 16:46:28 +01:00
Liu Xiaoyi cac692cdf5 quinn: re-export InvalidCid from quinn-proto 2026-01-12 16:46:28 +01:00
Lars Eggert f4b3a21149 chore: Fix unnecessary_unwrap clippy
```
warning: called `unwrap` on `self.exit_probe_rtt_at` after checking its variant with `is_none`
   --> quinn-proto/src/congestion/bbr/mod.rs:247:48
    |
238 |             if self.exit_probe_rtt_at.is_none() {
    |             ----------------------------------- help: try: `if let Some(<item>) = self.exit_probe_rtt_at`
...
247 |             } else if is_round_start && now >= self.exit_probe_rtt_at.unwrap() {
    |                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap
    = note: `#[warn(clippy::unnecessary_unwrap)]` on by default
```
2026-01-12 16:46:28 +01:00
Philipp Krüger c31d4a64f5 fix(quinn-proto): Correctly round-trip ConnectionClose encoding. (#304)
## Description

@rklaehn noticed proptests failing in CI, and turns out those failures
are reproducible.

This PR adds the failure as a regression test in `proptest.rs` (It
exercises an interesting multipath case).

After some investigation, I found that the `ConnectionClose` frame seen
in the test doesn't round-trip encoding/decoding. I added a regression
test for that as well.

The actual bug was using `buf.write(0u64)` for encoding
`MaybeFrame::None` instead of `buf.write_var(0u64)`.

## Notes & open questions

Ideally, we have proptests for encoding/decoding datagrams.

I also found that `MaybeFrame::Unknown` would use the same incorrect
`buf.write` with a u64. We probably should make this situation better.
Perhaps we can use `VarInt` in the types in favor of `u64`?
2026-01-12 14:48:13 +00:00
Philipp Krüger 3f509ef8d0 Also add a regression test for MaybeFrame::Unknown 2026-01-12 14:19:46 +01:00
Philipp Krüger 04117f484a Fix encoding of MaybeFrame::None and MaybeFrame::Unknown. 2026-01-12 14:05:32 +01:00
Philipp Krüger b532a404b6 Add regression tests 2026-01-12 14:05:32 +01:00
Rüdiger Klaehn fbf225e095 fix: Fix condition to generate PROTOCOL_VIOLATION (#301)
## Description

Fix condition to generate PROTOCOL_VIOLATION. It was the wrong way
around, didn't match the comment above.

## Breaking Changes

None

## Notes & open questions

Note: this is the result of trying out claude code on quinn and telling
it to find an obvious bug.
2026-01-12 11:35:27 +00:00
Rüdiger Klaehn 22de9024d3 Merge branch 'main' into max_path_id_bug 2026-01-12 11:54:50 +01:00
Asmir Avdicevic 43a7a7c089 feat(ci): add performance benchmarks comparing iroh-quinn vs upstream (#299)
## Description

<!-- A summary of what this pull request achieves and a rough list of
changes. -->

## Breaking Changes

<!-- Optional, if there are any breaking changes document them,
including how to migrate older code. -->

## Notes & open questions

<!-- Any notes, remarks or open questions you have to make about the PR.
-->
2026-01-12 10:30:49 +00:00
Ruediger Klaehn 55f89359dc Fix condition to generate PROTOCOL_VIOLATION
it was the wrong way around, didn't match the comment above.
2026-01-12 11:14:03 +01:00
Diva Martínez 714638b382 remove unnecesary lifetimes 2026-01-09 17:02:27 -05:00
Diva Martínez 46108aa766 clippy 2026-01-09 16:59:59 -05:00
Diva Martínez 759ddd7ded remove comment 2026-01-09 16:58:45 -05:00
Diva Martínez 6105d8c875 Encode impl no longer needed 2026-01-09 16:46:33 -05:00
Diva Martínez b11b92828f reduce LOCs 2026-01-09 16:46:20 -05:00
Diva Martínez 2e97273ccb reverse change 2026-01-09 15:50:24 -05:00
Diva Martínez 286b315c59 more cleanup 2026-01-09 15:48:39 -05:00
Diva Martínez 1bd70c0c7d 1 LOC less 2026-01-09 15:02:16 -05:00
Diva Martínez 08c2e181f8 apparently these lifetimes can be elided? 2026-01-09 14:45:44 -05:00
Diva Martínez 9747b65ab7 reduce LOC 2026-01-09 14:40:08 -05:00
Diva Martínez 9276c67f7b make diff more obvious 2026-01-09 14:28:07 -05:00
Diva Martínez 70d2486699 spelling 2026-01-09 14:24:50 -05:00
Diva Martínez cb7d87678a cleanup 2026-01-09 14:24:02 -05:00
Floris Bruynooghe d22570651b Fix PacketBuilder::simple_data_buf usage
- do not request 100 bytes padding by default
- do not reseve space for the AEAD tag
- when using this make sure the datagram is started and has the
  correct size
2026-01-09 16:45:48 +01:00
Asmir Avdicevic 0a78e68b9f Merge branch 'main' into arqu/perf_ci 2026-01-09 15:32:53 +01:00
Asmir Avdicevic 3391e34e92 cleanup 2026-01-09 15:32:13 +01:00