Commit Graph

3698 Commits

Author SHA1 Message Date
Phoenix Kahlo eebccff309 quinn: Fix missing re-exports 2024-11-13 05:22:22 +00:00
Phoenix Kahlo 7944e0fabc proto: Fix missing re-exports 2024-11-13 05:22:22 +00:00
Phoenix Kahlo 8c664916f7 proto: Rename frame::Type to FrameType
quic_proto::frame::Type should be publically re-exported. This commit
renames the it to a name more befitting of a public type.
2024-11-13 05:22:22 +00:00
dependabot[bot] 18b7956969 build(deps): update thiserror requirement from 1.0.21 to 2.0.3
Updates the requirements on [thiserror](https://github.com/dtolnay/thiserror) to permit the latest version.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.21...1.0.69)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-11 14:07:32 +00:00
Ross Younger 9be256e1c4 feat: enable rustls logging, gated by rustls-log feature flag 2024-11-10 11:03:28 +00:00
Philipp Krüger a0d8985021 feat(quinn-proto): Support & test wasm32-unknown-unknown target 2024-11-08 08:15:28 +00:00
Floris Bruynooghe 497462129e feat(quinn-proto): Allow notifying of network path changes
This gives the proto state the ability to be externally notified about
network path changes it might not be aware off.  In this case it will
re-set the RTT, Congestion Controller and MTU settings to the initial
states based on the TransportConfig.

This addresses the quinn-proto part of #2018.
2024-11-05 20:21:35 +00:00
Petr Sumbera a0bcb35334 quinn-udp: increase crate patch version to v0.5.7 quinn-udp-0.5.7 2024-11-05 12:56:14 +01:00
Petr Sumbera 722835b3bb Unbreak Solaris build after #1993 2024-11-05 12:56:14 +01:00
Benjamin Saunders 13a9e5e4e9 Fix debug_assert when coalescing large packets 2024-11-04 17:29:13 +00:00
Benjamin Saunders 8e4e7620d4 Fix some packet/datagram confusion in comments 2024-11-04 17:29:13 +00:00
Benjamin Saunders 690f0d9d49 Account for worst-case header + tag size when deciding to coalesce
A header and tag could easily be larger than 40 bytes.
2024-11-04 17:29:13 +00:00
Benjamin Saunders d4e7691e2f Format 2024-11-04 17:29:13 +00:00
Benjamin Saunders 2006eca73d const VarInt::size 2024-11-04 17:29:13 +00:00
Benjamin Saunders 44651ca050 Adopt Option::insert 2024-11-04 17:29:13 +00:00
dependabot[bot] c3e70aa7ab build(deps): update rustls-platform-verifier requirement from 0.3 to 0.4
Updates the requirements on [rustls-platform-verifier](https://github.com/rustls/rustls-platform-verifier) to permit the latest version.
- [Release notes](https://github.com/rustls/rustls-platform-verifier/releases)
- [Changelog](https://github.com/rustls/rustls-platform-verifier/blob/main/CHANGELOG)
- [Commits](https://github.com/rustls/rustls-platform-verifier/compare/v/0.3.0...v/0.3.4)

---
updated-dependencies:
- dependency-name: rustls-platform-verifier
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-04 15:26:15 +00:00
Max Inden e7ae56300a chore(quinn-udp): increase crate patch version to v0.5.6 quinn-udp-0.5.6 2024-10-28 20:35:00 +00:00
Max Inden a461695fe3 feat(quinn-udp): support both windows-sys v0.52 and v0.59
`quinn-udp` depends on the `windows-sys` crate, more specifically
`windows_sys::Win32::Networking::WinSock`:

https://github.com/quinn-rs/quinn/blob/a5d9bd1154b7644ff22b75191a89db9687546fdb/quinn-udp/src/cmsg/windows.rs#L6

https://github.com/quinn-rs/quinn/blob/a5d9bd1154b7644ff22b75191a89db9687546fdb/quinn-udp/src/windows.rs#L13

Previously `quinn-udp` was using `windows-sys` `v0.52`.
https://github.com/quinn-rs/quinn/pull/1960 updated `quinn-udp` to `v0.59`.
Note that `windows-sys` went straight from `v0.52` to `v0.59`. There are no
versions in between.

`quinn-udp` does not depend on any `windows-sys` `v0.59` features. In other
words, it can support both `windows-sys` `v0.52` and `v0.59`.

https://github.com/microsoft/windows-rs/releases/tag/0.59.0

This commit allows downstream users of `quinn-udp` to explicitly use `quinn-udp` with `windows-sys` `v0.52`.

For other users not explicitly demanding `windows-sys` `v0.52`, cargo will
choose `windows-sys` `v0.59`:

> It also attempts to use the greatest version currently available within that compatibility range.

https://doc.rust-lang.org/cargo/reference/resolver.html#semver-compatibility
2024-10-28 19:10:50 +00:00
BiagioFesta a5d9bd1154 crypto: expose negotiated_cipher_suite in the hadshake data 2024-10-25 20:38:48 +00:00
Thomas Eizinger bb68125b73 Introduce UdpSocketState::try_send API for fallback 2024-10-25 20:07:25 +00:00
Thomas Eizinger e055980104 Introduce UdpSocketState::try_send API for windows 2024-10-25 20:07:25 +00:00
Thomas Eizinger 62ba0798f0 Introduce UdpSocketState::try_send API for unix 2024-10-25 20:07:25 +00:00
Thomas Eizinger d442b50463 Extract send free function for fallback implementation
This allows us to have it follow the exact same implementation as the
unix and windows one.
2024-10-25 20:07:25 +00:00
Thomas Eizinger f06738b4d3 Extract send free function for Windows implementation 2024-10-25 20:07:25 +00:00
Thomas Eizinger b8e29f5ea4 Move logging of non-WouldBlock errors for unix
This makes it more apparent that this logging is happening because users
are more likely to read at least the first "layer" of the APIs they are
using.

In addition, we are going to offer a `try_send` API which requires us to
decouple the `send` free-function from this logging behaviour.
2024-10-25 20:07:25 +00:00
Lars Eggert 5dd3497107 chore: cargo +nightly clippy --fix 2024-10-25 20:04:11 +00:00
Lars Eggert adc4a06841 feat: Faster UDP/IO on Apple platforms
This uses Apple's private sendmsg_x and recvmsg_x system calls for
multi-packet UDP I/O.
2024-10-25 07:21:35 +00:00
Max Inden 91a639f67c feat(udp/bench): support recvmmsg 2024-10-24 10:47:06 +00:00
Max Inden b5902da5a9 fix(udp/bench): enforce max 64k UDP datagram limit
Linux drops UDP datagrams larger than 64k, even when segmented. In other words,
64k - headers is the maximum GSO payload size.
2024-10-24 10:47:06 +00:00
Max Inden a5046add78 refactor(udp/bench): switch to async 2024-10-24 10:47:06 +00:00
Max Inden a5e3b6f063 refactor(udp/bench): add fn new_socket 2024-10-24 10:47:06 +00:00
Max Inden c7a8758ab9 ci: test-run benchmarks 2024-10-24 10:47:06 +00:00
stormshield-gt 184568ea59 Fix example std::net imports 2024-10-17 18:56:55 +00:00
stormshield-gt 4aca580cb4 Adapt tests to the aws-lc-rs feature 2024-10-17 18:56:55 +00:00
stormshield-gt 127c83a36d Uniformize weak dependency utilisation 2024-10-17 18:56:55 +00:00
stormshield-gt 9e4c09ac29 Fix rustls provider features 2024-10-17 18:56:55 +00:00
Alessandro Decina 41850c8a30 StreamState: allow reusing Recv instances
Recv is used to receive data during the lifetime of a stream.  When a
stream is closed, instead of throwing away the corresponding Recv, put
it in a free list so they can be reused.

This reduces allocations by avoiding repeated allocations of BinaryHeaps
within Assemblers, and allocations of Box(es) for the actual Recvs. For
servers that serve millions of streams, this drastically reduces
allocations, effectively allocating a max_(uni|bi)_streams window worth
of Recvs and then reusing them instead of allocating for each new
stream.
2024-10-14 08:07:06 +00:00
Jakub Kubík 459322b180 ci(workflows/features): only test FIPS features on Ubuntu 2024-10-12 20:19:43 +00:00
Jakub Kubík aae5bdc3fa feat(quinn, quinn-proto): add aws-lc-rs-fips feature flag
Adds support for aws-lc-rs FIPS mode using a feature flag in quinn and quinn-proto.
2024-10-12 20:19:43 +00:00
Alessandro Decina 9d63e6236b PendingStreams: add alternative (unfair) send stream scheduling strategy
This adds TransportConfig::send_fairness(bool). When set to false,
streams are still scheduled based on priority, but once a chunk of a
stream has been written out, we'll try to complete the stream instead of
trying to round-robin balance it among the streams with the same
priority.

This reduces fragmentation, protocol overhead and stream receive latency
when sending many small streams. It also sends same-priority streams in
the order they are opened. This - assuming little to no network packet
reordering - allows receivers to advertise a large stream window but
keep a smaller, sliding receive window.
2024-10-12 18:27:14 +00:00
Alessandro Decina 62f1818dc4 PendingStreams: add missing internal API methods
Add methods to PendingStreams to avoid accessing PendingStreams::streams
directly.
2024-10-12 18:27:14 +00:00
Yury Yarashevich 31a95ee85f #2008: Make max_idle_timeout negotiation commutative
Ensure that both endpoints can agree on the same idle_timeout value,
regardless of the announced max_idle_timeout parameters.
This fix addresses a corner case where a locally configured idle_timeout
of 0 was used as the negotiated value instead of the non-zero
max_idle_timeout provided by the remote side.
2024-10-11 21:07:41 +00:00
Lars Eggert 15a4dcef42 chore: Replace IP strings with address types
Avoids a bunch of parsing and checking.
2024-10-09 08:05:22 +00:00
Romain Roffé 08ee9ee471 Add tvOS support 2024-10-03 16:33:15 +00:00
Romain Roffé d126000854 Add visionOS support 2024-10-03 16:33:15 +00:00
Dirkjan Ochtman ead9b9316c proto: update DatagramState::outgoing_total on drop_oversized() 2024-10-02 06:46:23 +00:00
Austin Bonander bcb962b222 proto: remove panic-on-drop from Chunks 2024-09-29 18:08:22 +00:00
Austin Bonander 41989fef33 proto: export ShouldTransmit 2024-09-29 18:08:22 +00:00
Floris Bruynooghe 2330895383 Export SendDatagram struct to the public API
This is retunred by the public API but was not being provided.  This
export this publicly.
2024-09-26 16:02:15 +00:00
Dirkjan Ochtman 9a656d2d0b Enable use of aws-lc-rs instead of ring 2024-09-24 07:33:03 +00:00