3150 Commits

Author SHA1 Message Date
Benjamin Saunders cfb7a067ee Bump version 0.9.2 2022-11-28 20:27:12 -08:00
Benjamin Saunders 478445ea71 Fix panic on concurrent read_datagram completion
The previous logic assumed that a datagram must be available if the
future was notified, but this might not be the case if e.g. two
futures are concurrently waiting for datagrams, but only one datagram
has been received, since we use notify_waiters to wake all waiting
futures to be robust in the face of cancellation.
2022-11-28 20:27:12 -08:00
Benjamin Saunders 5c7f7aabfa Allow initial MTU to be specified in bulk benchmark 2022-11-27 21:23:24 -08:00
Damien Deville 78401c614f Fix GSO / GRO auto detection when IPv6 is disabled. 2022-11-23 10:23:06 -08:00
Benjamin Saunders fb2af0816e Update description to reflect abstract runtime support 2022-11-22 19:34:52 -08:00
Benjamin Saunders 73707103f4 Bump quinn-udp version 2022-11-22 18:00:22 -08:00
Jeremy Knope b8b9bffe3c fix: don't bail if setting IP_RECVTOS fails
old macOS versions don't support it

(cherry picked from commit 64b660a8c2)
2022-11-22 18:00:22 -08:00
Benjamin Saunders e03f0f13c8 Pad packets enough to permit stealthy stateless resets 2022-11-21 00:08:55 +01:00
Benjamin Saunders fbccb656cc Detect stateless resets with malformed headers
A valid stateless reset packet might not be large enough to contain
the expected connection ID, which can cause header decoding to fail.
2022-11-21 00:08:55 +01:00
Benjamin Saunders 1d390af2fa Bump versions for 0.9.1 release 0.9.1 2022-11-15 06:50:40 +01:00
Benjamin Saunders 2dca78766a Less confusing Notify name for local stream opening
Remotely-initiated streams can be said to be opened as well.
2022-11-14 01:18:03 -08:00
Benjamin Saunders d73fcfd4a0 Fix stream open futures sometimes waiting on the wrong notification
After a spurious wakeup, `Connection::open_uni` and `open_bi` would
switch to waiting for notifications about incoming streams, rather
than the intended notification about new stream ID flow control
budget. This was probably a copy-paste error from `poll_accept`.
2022-11-14 01:18:03 -08:00
Benjamin Saunders f016928460 Fold MAX_STREAMS fields on Retransmits into an array for concision
No behavioral change.
2022-11-14 01:17:22 -08:00
Benjamin Saunders a3b35f93c2 Fix duplicate MAX_STREAMS transmit
When the application observes a stream finish or reset, we dispose of
its state via `StreamsState::stream_freed`, and queue a transmit of
stream flow control credit directly on the
`Connection`. `stream_freed` however also sets
`StreamsState::max_streams_dirty`, which is polled each time we
receive a packet to see whether a stream has become fully closed due
to an incoming frame. Together, these led to a MAX_STREAMS frame being
transmit both immediately, and following the next packet receipt. We
prevent that by unsetting the appropriate `max_streams_dirty` flags
when sending `MAX_STREAMS`.
2022-11-14 01:17:22 -08:00
Benjamin Saunders 641114a69d Fix clippy lints 2022-11-14 01:17:22 -08:00
Damien Deville b80baa008d Add --initial-max-udp-payload-size command line option for perf
client and server binaries to change the initial size of UDP
packet payload.
0.9.0
2022-10-28 09:24:03 +02:00
Damien Deville cebfb270f6 Add --keylog command line option for perf client and server
binaries. This allow dumping crypto keys to disk using
SSLKEYLOGFILE env var.
2022-10-27 17:49:28 -07:00
Dirkjan Ochtman 28a2c8052c quinn: bump dependency on tokio to 1.13
We now use `UdpSocket::poll_send_ready()` and `UdpSocket::poll_recv_ready()`.
2022-10-26 16:10:29 -07:00
Dirkjan Ochtman 57bd7643e7 quinn-udp: bump version to 0.3 2022-10-26 16:10:29 -07:00
Benjamin Saunders 4c4da517fe Bump version numbers for 0.9 release 2022-10-26 12:50:12 +02:00
Benjamin Saunders 00fb34759d Move idle Notify handle into endpoint Shared 2022-10-23 08:18:42 +02:00
Benjamin Saunders 7d51d2e57e Remove Incoming stream in favor of Endpoint::accept 2022-10-23 08:18:42 +02:00
Benjamin Saunders b8857397ff Introduce Endpoint::accept method for better ergonomics 2022-10-23 08:18:42 +02:00
Benjamin Saunders c63059547c Update book for removal of NewConnection 2022-10-23 07:35:41 +02:00
Benjamin Saunders feca8abebf Accessor for free datagram send buffer space
Useful for applications which can adapt to variable bandwidth on the
fly, such as video streaming.
2022-10-20 09:26:20 +02:00
Benjamin Saunders 4c5d7d0894 Expose a getter for the close reason 2022-10-20 09:25:27 +02:00
Benjamin Saunders cd2cf756ac Fix stopped streams not issuing ID credit when reset
Similar to existing logic handling finishing of a stopped stream in
StreamsState::received. The missing credit would be issued if a stream
is later closed through a different code path, but there is no
guarantee that would happen.
2022-10-11 09:33:08 +02:00
dependabot[bot] f86dd7596d Update rcgen requirement from 0.9.1 to 0.10.0
Updates the requirements on [rcgen](https://github.com/est31/rcgen) to permit the latest version.
- [Release notes](https://github.com/est31/rcgen/releases)
- [Changelog](https://github.com/est31/rcgen/blob/master/CHANGELOG.md)
- [Commits](https://github.com/est31/rcgen/compare/v0.9.1...v0.10.0)

---
updated-dependencies:
- dependency-name: rcgen
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-03 15:29:41 +02:00
dependabot[bot] 9441d93647 Update windows-sys requirement from 0.36.1 to 0.42.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.36.1...0.42.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-03 15:29:23 +02:00
Benjamin Saunders 6e4bcbb2fc Drop NewConnection in favor of simpler API 2022-09-27 11:08:26 +02:00
Benjamin Saunders dce1794bbc Revert Connection::open_{uni, bi} to named 'static futures 2022-09-27 11:08:26 +02:00
Benjamin Saunders 6ba0051472 Introduce Connection::{accept_{uni, bi}, read_datagram}
Provides a more natural alternative to the streams in NewConnection
2022-09-27 11:08:26 +02:00
Benjamin Saunders 3e2935ff5f Extract Notify handles from inside connection mutex
Reduces indirection and allows us to avoid cloning an `Arc` each time
one of the relevant events is waited on, and opens the door to
handwritten futures built on them.
2022-09-27 11:08:26 +02:00
Benjamin Saunders 5fa3581edb Fix missing wakeups on large stream credit increase 2022-09-27 11:08:26 +02:00
Benjamin Saunders 49b2620132 Use a cheap approximation for sent ACK tracking
As recommended in RFC 9000 §13.2.4. Simplifies sent packet state and
acknowledgement processing.
2022-09-26 15:00:40 +02:00
Benjamin Saunders 346f2e93a7 Don't send ACKs unless prompted by an ACK-eliciting packet
Application datagrams may be too large to fit into a packet with ACKs
present. Therefore, if we have unsent ACKs, doing so may push a queued
application datagram into the next packet. If no other data is queued,
the first packet will then be ACK-only. Sending an ACK-only packet
without having received an ACK-eliciting packet following our last
ACK-only packet is illegal, and will trigger a debug assert.

By being slightly less enthusiastic about sending ACKs, we ensure that
any inadvertently generated ACK-only packet is legal and simplify our
logic slightly. This approach also seems to be popular with other
implementations, as indicated by ad-hoc feedback on the slack.
2022-09-26 15:00:40 +02:00
Benjamin Saunders ebad48d34f Clarify test diagnostic udp-0.2.0 2022-09-17 20:25:02 +02:00
Benjamin Saunders 558e904414 Fix spurious test panic 2022-09-17 20:25:02 +02:00
Benjamin Saunders 8083a28100 Remove double indirection around Runtime 2022-09-17 20:25:02 +02:00
Benjamin Saunders 0c288d310f Style tweak 2022-09-17 20:25:02 +02:00
Benjamin Saunders 82005ab489 Remove unnecessary as 2022-09-17 20:25:02 +02:00
Benjamin Saunders 471848634b Drop unnecessary manual Clone impl 2022-09-17 20:25:02 +02:00
Banyc 3a25582580 docs: add/modify docs 2022-09-06 13:34:06 -07:00
thekuwayama 166b7fef7f Check QUIC Bit that Short Header Packet set too (#1404) 2022-09-01 07:32:53 +02:00
Benjamin Saunders 332eb605f5 Bump MSRV to 1.59 2022-08-28 07:04:56 +02:00
terrarier2111 b1d28c9cd2 Fix variable name 2022-08-26 19:31:37 +02:00
Benjamin Saunders f7f06bb209 Fix lint 2022-08-17 05:24:35 +02:00
Benjamin Saunders 72a0e08e7b Resolve lints 2022-08-16 19:05:23 +02:00
Benjamin Saunders b01ac88806 Define Connection::closed helper to await connection termination
This has come up several times, most recently in
https://github.com/quinn-rs/quinn/issues/1395. While equivalent
behavior is already possible by waiting for e.g. `IncomingUniStreams`
to yield `Err` or `None`, this is substantially more discoverable.
2022-08-16 19:05:23 +02:00
Benjamin Saunders f7203ee382 Disable IP fragmentation on Windows
Prerequisite of enabling PMTUD, and good for conformance besides.
2022-08-01 20:22:27 +02:00