Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ACK frequency extension corner case #1672

Merged
merged 4 commits into from
Sep 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.63.0
- uses: dtolnay/rust-toolchain@1.65.0
- uses: Swatinem/rust-cache@v2
- run: cargo check --lib --all-features -p quinn-udp -p quinn-proto -p quinn

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Quinn is a pure-rust, async-compatible implementation of the IETF [QUIC][quic] t
[rustls][rustls] and [*ring*][ring]
- Application-layer datagrams for small, unreliable messages
- Future-based async API
- Minimum supported Rust version of 1.63.0
- Minimum supported Rust version of 1.65.0

## Overview

Expand Down
1 change: 0 additions & 1 deletion bench/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
name = "bench"
version = "0.1.0"
edition = "2021"
rust-version = "1.63"
license = "MIT OR Apache-2.0"
publish = false

Expand Down
1 change: 0 additions & 1 deletion perf/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
name = "perf"
version = "0.1.0"
edition = "2021"
rust-version = "1.63"
license = "MIT OR Apache-2.0"
publish = false

Expand Down
2 changes: 1 addition & 1 deletion quinn-proto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "quinn-proto"
version = "0.11.0"
edition = "2021"
rust-version = "1.63"
rust-version = "1.65"
license = "MIT OR Apache-2.0"
repository = "https://github.com/quinn-rs/quinn"
description = "State machine for the QUIC transport protocol"
Expand Down
27 changes: 17 additions & 10 deletions quinn-proto/src/connection/spaces.rs
Original file line number Diff line number Diff line change
Expand Up @@ -631,18 +631,25 @@ impl PendingAcks {
|| dedup.missing_in_interval(prev_largest_ack_eliciting, packet_number)
}
_ => {
// From acknowledgement frequency draft, section 6.1
if let Some((largest_acked, largest_unacked)) =
// From acknowledgement frequency draft, section 6.1: send an ACK immediately if
// doing so would cause the sender to detect a new packet loss
let Some((largest_acked, largest_unacked)) =
self.largest_acked.zip(self.largest_ack_eliciting_packet)
{
dedup
.smallest_missing_in_interval(largest_acked, largest_unacked)
.map_or(false, |smallest_missing| {
largest_unacked - smallest_missing >= self.reordering_threshold
})
} else {
false
else {
return false;
};
if self.reordering_threshold > largest_acked {
return false;
}
// The largest packet number that could be declared lost without a new ACK being
// sent
let largest_reported = largest_acked - self.reordering_threshold + 1;
let Some(smallest_missing_unreported) =
dedup.smallest_missing_in_interval(largest_reported, largest_unacked)
else {
return false;
};
largest_unacked - smallest_missing_unreported >= self.reordering_threshold
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion quinn-udp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "quinn-udp"
version = "0.5.0"
edition = "2021"
rust-version = "1.63"
rust-version = "1.65"
license = "MIT OR Apache-2.0"
repository = "https://github.com/quinn-rs/quinn"
description = "UDP sockets with ECN information for the QUIC transport protocol"
Expand Down
2 changes: 1 addition & 1 deletion quinn/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ keywords = ["quic"]
categories = [ "network-programming", "asynchronous" ]
workspace = ".."
edition = "2021"
rust-version = "1.63"
rust-version = "1.65"

[package.metadata.docs.rs]
all-features = true
Expand Down