noq-proto: expose RttEstimator's latest RTT sample for delay-based detectors

Open
#876 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
rust
Domain
networking

Research direction

Start in noq-proto's RTT estimator module, where RttEstimator's get(), conservative() and min() are defined and where update applies the RFC 9002 §5.3 adjusted_rtt. Add latest(), latest_adjusted() and a samples() counter without changing behaviour, then expose Connection::rtt_estimator(path_id). Done means the new accessors return the per-ACK sample under tests, with no allocation added.

Written by the indexing model from the issue text.

Description

RttEstimator exposes get(), conservative() and min(), but not the per-ACK sample they are built from. A queue-delay detector, such as the classic-ECN AQM fallback of RFC 9331 §4.3 (Linux TCP Prague runs it on every ACK), needs each sample with its own gain, not the 1/8-gain smoothed value.

Proposal, no behaviour change and no allocation:

  • RttEstimator::latest(), latest_adjusted() (RFC 9002 §5.3's adjusted_rtt, the value update already uses) and a samples() count, so a caller that polls once per tick can tell a new sample from one it has seen;
  • Connection::rtt_estimator(path_id) -> Option<RttEstimator>;
  • optionally latest_less_ack_delay(): the sample less the declared ack delay without §5.3's min_rtt guard (None for Initial/Handshake ACKs). The guard is right for PTO, but when a peer holds every ACK for a fixed time (a server that answers on its tick), the hold lands in min_rtt and the guard then keeps every sample whole, so the hold reads as a standing queue.

We run this in a vendored copy with tests. Would you take a PR? If you prefer push over poll, a Controller hook would work for us too.

Dominant language
Rust
Stars
454
Forks
98
Avg merge
2d 8h
Merged PRs (30d)
19

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from n0-computer/noq

All issues in n0-computer/noq

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.