Commit Graph

3352 Commits

Author SHA1 Message Date
Benjamin Saunders 3e7c8fda96 Pass proto-layer connection events internally
Groundwork for replacing generic message-passing with lighter
event-representation-aware communication strategies.
2023-12-18 11:31:22 -08:00
Benjamin Saunders 253eba94d1 Replace dummy message with direct wake to trigger endpoint events 2023-12-18 11:31:21 -08:00
Benjamin Saunders 91bc3a49be Switch to AtomicWaker to wake the endpoint driver
Groundwork for direct connection -> driver wake-ups, and yields one
less piece of state inside a monolithic mutex.
2023-12-18 11:31:21 -08:00
Benjamin Saunders 5a8483baec Pass proto-layer endpoint events internally
Groundwork for replacing generic message-passing with lighter
event-representation-aware communication strategies.
2023-12-18 11:28:46 -08:00
Benjamin Saunders 302b3369bf Don't write out Default manually 2023-12-17 13:14:23 -08:00
Benjamin Saunders 5eac310a5f Don't plumb current time through endpoint events
This was only needed to determine the base time for the next
CID retirement timer, for which the marginal delay caused by fetching
a new `Instant::now()` on demand is harmless.
2023-12-17 12:44:27 -08:00
Benjamin Saunders 7723cbc03f Validate 0-RTT frames based on packet type, not handshake progress
0-RTT packets might be received after we derive 1-RTT keys, e.g. if we
received a complete ClientHello. That shouldn't cause us to relax
0-RTT frame type restrictions.
2023-12-08 23:29:39 +01:00
Benjamin Saunders 106d44b1f7 Take the whole Packet structure in process_payload 2023-12-08 23:29:39 +01:00
link2xt b5d23a8647 Remove "max_tlps" configuration variable
It is not used since
<https://github.com/quinn-rs/quinn/pull/134>
(commit bdc9ac76a4)
was merged in 2018.

RFC 9002 also does not mention Tail Loss Probe
except that it has been integrated into the PTO (Probe Timeout)
mechanism.
2023-11-30 16:34:12 -08:00
dependabot[bot] d1bb2b8b13 Update windows-sys requirement from 0.48.0 to 0.52.0
Updates the requirements on [windows-sys](https://github.com/microsoft/windows-rs) to permit the latest version.
- [Release notes](https://github.com/microsoft/windows-rs/releases)
- [Commits](https://github.com/microsoft/windows-rs/compare/0.48.0...0.52.0)

---
updated-dependencies:
- dependency-name: windows-sys
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-20 14:28:51 +01:00
Dirkjan Ochtman 9bb40be8fd Run FreeBSD workflow on Ubuntu 2023-11-14 14:11:28 -08:00
dependabot[bot] 6cad76a3b7 Bump vmactions/freebsd-vm from 0 to 1
Bumps [vmactions/freebsd-vm](https://github.com/vmactions/freebsd-vm) from 0 to 1.
- [Release notes](https://github.com/vmactions/freebsd-vm/releases)
- [Commits](https://github.com/vmactions/freebsd-vm/compare/v0...v1)

---
updated-dependencies:
- dependency-name: vmactions/freebsd-vm
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-14 20:32:48 +01:00
James Leitch e77cd3e33d Updates docs for Connection::accept_bi() and Connection::open_bi() 2023-11-10 21:49:56 +01:00
Nazar Mokrynskyi ca0fae8896 Downgrade duplicate packet message to debug level 2023-11-07 09:17:54 +01:00
Damien Deville ab280e467a proto: add a way to configure the minimum MTU change needed to stop
the binary search used during the MTU discovery phase.
2023-11-06 10:41:49 -08:00
Luís Neto 49aa4b61e0 #729: proto: write outgoing packets to caller-supplied memory (#1697) 2023-11-01 12:17:10 -07:00
Fabio Valentini 10f08e0652 ensure LICENSE files are present in all published crates 2023-10-28 17:26:10 +02:00
dependabot[bot] 6d80efeeae Update async-io requirement from 1.6 to 2.0
Updates the requirements on [async-io](https://github.com/smol-rs/async-io) to permit the latest version.
- [Release notes](https://github.com/smol-rs/async-io/releases)
- [Changelog](https://github.com/smol-rs/async-io/blob/master/CHANGELOG.md)
- [Commits](https://github.com/smol-rs/async-io/compare/v1.6.0...v2.0.0)

---
updated-dependencies:
- dependency-name: async-io
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-23 15:58:29 +02:00
vvvviiv 15222f2f5d Implement Debug for IdleTimeout.
Fix typo.
2023-10-23 13:42:40 +02:00
Michael Chen dd34d57a0a Make quinn-proto::{Connection, Endpoint} deterministic (#1691)
`quinn-proto::{Connection, Endpoint}` structs call
`StdRng::from_entropy()` in their implementation. It makes it hard to
reproduce errors in an otherwise deterministic test case.

This PR addresses the issue by adding a `StdRng` argument to the
respective `new` functions. For other functions that may create an
endpoint/connection, an argument of type `impl FnOnce() -> StdRng` is
added. This avoids eager calls to generate fresh entropy. e.g. the
`Endpoint::handle` function is frequently called but we'd only need the
rng when handling a new incoming connection.
2023-10-23 11:46:15 +02:00
Dirkjan Ochtman 7bd92f65aa Avoid redundant link target in docs 2023-10-23 11:42:54 +02:00
Dirkjan Ochtman 24212da394 Use or_default() as suggested by clippy 2023-10-23 11:42:54 +02:00
Dirkjan Ochtman 9f437c0da7 proto: move IterErr below users 2023-10-23 11:42:54 +02:00
Dirkjan Ochtman 99ef446331 Yield protocol violation for packets without frames 2023-10-23 11:42:54 +02:00
Benjamin Saunders e1e1e6e392 Remove explicit rust-version requirement from unpublished crates 2023-09-24 14:22:14 -07:00
Benjamin Saunders 81d83a93be Reduce rightward drift 2023-09-24 14:22:14 -07:00
Benjamin Saunders e51f848296 Bump MSRV to 1.65 for let-else 2023-09-24 14:22:14 -07:00
Benjamin Saunders fc5e689b88 Fix ACK frequency extension corner case
Reflects the logic change in
https://github.com/quicwg/ack-frequency/pull/222. See also discussion
in https://github.com/quicwg/ack-frequency/issues/183.
2023-09-24 14:22:14 -07:00
Romain Vimont e5bf98c3d7 Pass byte read count to FinishEarly
If read_exact() finishes early (end of stream), report the number of
bytes actually read.

Fixes #1663
2023-09-20 12:18:42 -07:00
Dirkjan Ochtman f81c2fafa7 More principled error handling for invalid frames 2023-09-20 12:16:58 -07:00
Benjamin Saunders 0af891e0b8 Don't send IMMEDIATE_ACK frames every RTT
This behavior was redundant to intelligent transmission of
ACK_FREQUENCY frames when RTT change is observed.
2023-09-09 10:21:24 -07:00
Benjamin Saunders b83d5c483c Test automatic adjustment of max ACK delay 2023-09-09 10:21:24 -07:00
Benjamin Saunders 1f70570c65 Don't clamp max ACK delay to RTTs below 25ms 2023-09-09 10:21:24 -07:00
Benjamin Saunders 2d26d9363a Adjust max ACK delay dynamically based on RTT 2023-09-09 10:21:24 -07:00
Benjamin Saunders 86ea03ec86 Push max ACK delay clamping down into ACK frequency logic 2023-09-09 10:21:24 -07:00
Benjamin Saunders d30d5479a3 Intelligible time logging in tests
Replaces "advancing to Instant { ... }" with e.g. "advancing to 10ms"
2023-09-09 10:21:24 -07:00
Benjamin Saunders 8b7cea22ca Trace-log transmitted max_ack_delay values 2023-09-09 10:21:24 -07:00
dependabot[bot] 5d4d58387d Bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-04 16:24:17 +02:00
Benjamin Saunders d51b630fcd Add client/server spans to bulk benchmark 2023-09-02 22:30:11 -07:00
Benjamin Saunders 7442da16f9 Enable ACK frequency extension in bulk benchmark 2023-09-02 22:30:11 -07:00
Benjamin Saunders 089e213fba Generalize UdpStats::transmits to ios
Since this field exists for both tx and rx, we might as well make use
of it.
2023-09-02 21:22:12 +02:00
Damien Deville a516c2b836 Silence an info message related to ack frequency 2023-08-31 17:33:09 +00:00
Damien Deville a7a3c4da6a Add missing export for proto::AckFrequencyConfig. 2023-08-29 16:25:32 +02:00
Dirkjan Ochtman 307d80b939 proto: make now explicit for Endpoint::connect() 2023-08-25 11:55:43 -07:00
Dirkjan Ochtman c2a54b9acf Set workspace resolver explicitly 2023-08-25 11:55:43 -07:00
Dirkjan Ochtman 2d9bdaecc8 Silence clippy false positive 2023-08-25 11:55:43 -07:00
Dirkjan Ochtman e0f81593f7 Fix formatting for Rust 1.72 2023-08-25 11:55:43 -07:00
Benjamin Saunders 7f26029284 proto: detect stateless resets in authed and unprotected packets
RFC9000 says: endpoints MUST treat any packet ending in a valid
stateless reset token as a Stateless Reset

Previously, we did not detect stateless resets that appeared to be
unprotected packets (e.g. Retry or Version Negotiation) or which were
successfully decrypted (astronomically unlikely with TLS, but possible
with custom cryptographic layers).
2023-08-23 14:19:02 -07:00
Benjamin Saunders 394ac8c2b8 proto: don't panic when draining a unknown connection
A panic here was reported by a user when testing under very scarce CPU
conditions. The root cause is not yet well understood (perhaps a
connection emitting `Drained` twice for some reason?), but we can
still reduce the blast radius.
2023-08-23 13:32:12 -07:00
Dirkjan Ochtman 47678a1a62 Replace Gitter link with Discord 2023-08-22 13:29:59 -07:00