Skip to content

quiche: add ack progress timeout and outstanding sent packets limit - #2815

Open
jrouviere wants to merge 1 commit into
masterfrom
ack-progress-timeout-and-sent-packets-limit
Open

jrouviere wants to merge 1 commit into
masterfrom
ack-progress-timeout-and-sent-packets-limit

Conversation

@jrouviere

Copy link
Copy Markdown
Contributor

Close connections whose packets in flight are not acknowledged for too long, or that track too many sent packets. Both limits are configurable.

@jrouviere
jrouviere requested a review from a team as a code owner October 9, 2026 07:52
@jrouviere
jrouviere force-pushed the ack-progress-timeout-and-sent-packets-limit branch from e424ed6 to d656743 Compare October 9, 2026 07:54
Comment thread quiche/src/lib.rs
Comment thread quiche/src/lib.rs Outdated
Comment thread quiche/src/lib.rs
Comment thread quiche/src/lib.rs Outdated
Comment thread quiche/src/lib.rs Outdated
@ask-bonk

ask-bonk Bot commented Oct 9, 2026

Copy link
Copy Markdown

Review: 5 findings.

The PR adds configurable ACK-progress timeouts and sent-packet limits across Rust, C, and tokio APIs, with migration and timeout tests.

Five inline review comments were posted.

github run

@jrouviere
jrouviere force-pushed the ack-progress-timeout-and-sent-packets-limit branch 2 times, most recently from e89f123 to e8b3a37 Compare October 9, 2026 16:32
@jrouviere

Copy link
Copy Markdown
Contributor Author

/bonk

Comment thread quiche/src/lib.rs Outdated
Comment thread quiche/src/lib.rs
Comment thread quiche/src/lib.rs Outdated
Comment thread quiche/src/lib.rs Outdated
Comment thread quiche/src/lib.rs Outdated
@ask-bonk

ask-bonk Bot commented Oct 9, 2026

Copy link
Copy Markdown

Review: 5 findings.

Adds configurable ACK-progress timeout and sent-packet limits across Rust, C, and tokio APIs, with migration and timeout coverage.

Five inline review comments were posted.

github run

@jrouviere
jrouviere force-pushed the ack-progress-timeout-and-sent-packets-limit branch from e8b3a37 to f62db79 Compare October 13, 2026 08:46
@jrouviere

Copy link
Copy Markdown
Contributor Author

/bonk

Comment on lines +76 to +83
// Use 64-bit arithmetic, as the product can overflow `usize`
// on 32-bit platforms.
let snd_cnt = (self.prr_delivered as u64)
.saturating_mul(ssthresh as u64)
.div_ceil(self.recoverfs as u64);

usize::try_from(snd_cnt)
.unwrap_or(usize::MAX)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small pre-existing issue that showed up in one of the new test.

Comment thread quiche/src/lib.rs Outdated
Comment thread quiche/src/lib.rs Outdated
Comment thread quiche/src/lib.rs Outdated
Comment thread quiche/include/quiche.h Outdated
@ask-bonk

ask-bonk Bot commented Oct 13, 2026

Copy link
Copy Markdown

Since last review: 6 resolved, 4 still open, 4 new.

Adds configurable ACK-progress and sent-packet limits across Rust, C, and tokio APIs, with extensive tests. Four new inline findings were posted.

github run

@jrouviere
jrouviere force-pushed the ack-progress-timeout-and-sent-packets-limit branch from f62db79 to 9b586fe Compare October 13, 2026 09:23
@jrouviere

Copy link
Copy Markdown
Contributor Author

/bonk

Comment thread quiche/src/lib.rs Outdated
Comment thread quiche/src/lib.rs Outdated
@ask-bonk

ask-bonk Bot commented Oct 13, 2026

Copy link
Copy Markdown

Review: 2 findings.

Adds configurable ACK-progress timeout and outstanding sent-packet limits across Rust, C, TLS callbacks, and tokio settings, with migration and recovery coverage.

Two inline correctness comments were posted. Relevant tests passed.

github run

Comment thread quiche/src/lib.rs
// The default number of sent packets that can be tracked for loss detection
// before the connection is closed. The limit is raised to twice the largest
// congestion window, so that connections making progress are not affected.
const DEFAULT_MAX_OUTSTANDING_SENT_PACKETS: usize = 40_000;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I don't think it needs to be twice the max cwnd. 1.2 -- 1.5 is probably plenty (and IIRC google quic has 10k as default if not hardcoded)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One issue is that cubic doesn't have a max cwnd. Since this is the default and will be applied to all users I prefered to be on the safe side, we can always set a lower limits via configuration.

Comment thread quiche/src/lib.rs Outdated
Comment thread quiche/src/lib.rs Outdated
Comment thread quiche/src/lib.rs Outdated
Comment thread quiche/src/lib.rs Outdated
Comment thread quiche/src/lib.rs
Comment thread tokio-quiche/src/settings/config.rs Outdated
@jrouviere
jrouviere force-pushed the ack-progress-timeout-and-sent-packets-limit branch 2 times, most recently from 5002ca5 to 0b5325f Compare October 14, 2026 08:46
@jrouviere

Copy link
Copy Markdown
Contributor Author

/bonk

Comment thread quiche/src/lib.rs
Comment thread quiche/src/lib.rs Outdated
@ask-bonk

ask-bonk Bot commented Oct 14, 2026

Copy link
Copy Markdown

Review: 2 findings.

Adds configurable ACK-progress timeouts and outstanding sent-packet limits across Rust, C, TLS callbacks, and tokio settings, with multipath/recovery tests.

Two inline correctness comments were posted.

github run

@jrouviere
jrouviere force-pushed the ack-progress-timeout-and-sent-packets-limit branch 2 times, most recently from 48e4ec4 to 2883234 Compare October 14, 2026 09:30
@jrouviere

Copy link
Copy Markdown
Contributor Author

/bonk

Comment thread quiche/src/lib.rs Outdated
@ask-bonk

ask-bonk Bot commented Oct 14, 2026

Copy link
Copy Markdown

Review: 1 findings.

Adds configurable ACK-progress timeout and sent-packet limits across Rust, C, TLS, and tokio APIs, with recovery and multipath tests.

One inline correctness comment was posted.

github run

@jrouviere
jrouviere force-pushed the ack-progress-timeout-and-sent-packets-limit branch from 2883234 to 81a71f2 Compare October 14, 2026 10:14
@jrouviere

Copy link
Copy Markdown
Contributor Author

/bonk

Comment thread quiche/src/tests.rs
Comment thread quiche/src/tests.rs Outdated
@ask-bonk

ask-bonk Bot commented Oct 14, 2026

Copy link
Copy Markdown

Review: 2 findings.

Adds configurable ACK-progress and outstanding-packet limits across Rust, C, TLS callbacks, and tokio settings, with recovery and migration coverage.

Two inline test-flakiness findings were posted.

github run

@jrouviere
jrouviere force-pushed the ack-progress-timeout-and-sent-packets-limit branch from 81a71f2 to a995b7c Compare October 14, 2026 13:32
@jrouviere

Copy link
Copy Markdown
Contributor Author

/bonk

@ask-bonk

ask-bonk Bot commented Oct 14, 2026

Copy link
Copy Markdown

LGTM!

github run

@jrouviere

Copy link
Copy Markdown
Contributor Author

LGTM!

github run

Only took 8 reviews!

@ghedo ghedo added type: bugfix Corrects defective behavior. area: core Changes related to core. area: recovery Changes related to recovery. labels Oct 14, 2026
Close connections whose packets in flight are not acknowledged for too
long, or that track too many sent packets. Both limits are configurable.
@jrouviere
jrouviere force-pushed the ack-progress-timeout-and-sent-packets-limit branch from a995b7c to d8d9c60 Compare October 15, 2026 12:49

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: core Changes related to core. area: recovery Changes related to recovery. type: bugfix Corrects defective behavior.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants