Skip to content
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
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion quest/m1/quic-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ side by side and fix any name or signature that still differs, and check

## Required

- [Poll forms](/quest/m1/quic-api/poll.md) - both drivers' waits poll as `&self, &kio::Waiter` forwards to moq-quic, the async forms wrap them, and `send::Finished` is a future
- [Native WebTransport](/quest/m1/quic-api/native-web.md) - `quic::web` in both crates implements moq-net's poll traits, deleting the generic `web_transport_trait` adapters and the dependency on it

## Related
Expand Down
4 changes: 0 additions & 4 deletions quest/m1/quic-api/native-web.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,6 @@ Align the two stacks while each gets its impl:
Measure relay CPU per Gbps and allocations per stream before and after on
the same workload.

## Required

- [Poll forms](/quest/m1/quic-api/poll.md) - the leak-free driver polls these impls forward to

## Related

- [Relay allocations](/quest/m2/perf/relay-allocs.md) - retakes its profile after the adapter's per-stream boxing is gone
92 changes: 0 additions & 92 deletions quest/m1/quic-api/poll.md

This file was deleted.

7 changes: 1 addition & 6 deletions quest/m2/quic-ack-hook.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ unsupported has to live in the return type rather than the error, and a
consumer must treat `None` as unknown, never as delivered.

Each QUIC driver, moq-tokio's `quic::driver` and moq-uring's, gets the hook
first, in the shape of [the driver poll waits](/quest/m1/quic-api/poll.md),
first, in the drivers' caller-owned waiter shape,
with an async wrapper:

```rust
Expand Down Expand Up @@ -97,8 +97,3 @@ close.
Decided in the 2026-09-30 audit: moved to m2 with its consumers, the
[viewer lag histogram](/quest/m2/qos/lag-histogram.md) and the
[delivery-delay histogram](/quest/m2/delivery-delay.md).

## Required

- [QUIC driver poll waits](/quest/m1/quic-api/poll.md) - the `&self, &kio::Waiter`
driver shape `poll_acked` takes
6 changes: 1 addition & 5 deletions quest/m2/quic-sansio-driver.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ whose C, C++, and Kotlin bindings drive it from their own loops
Decided with the maintainer on 2026-10-28, from
[moq-dev/rust2#215](https://github.com/moq-dev/rust2/pull/215):

- **After the waits (landed) and [poll](/quest/m1/quic-api/poll.md).**
- **The waits and driver poll forms have landed.**
Once moq-quic owns its waits, a driver is I/O, timers, and a lock. This one is the
timers and the lock, with the caller doing the I/O. Built earlier, it would carry the
waiter tables that waits deletes.
Expand Down Expand Up @@ -46,7 +46,3 @@ other drivers do.

Public API: a new driver, its endpoint and connection types, and their `poll::Session`
impl.

## Required

- [Poll forms](/quest/m1/quic-api/poll.md) - the drivers' poll shape this one mirrors
7 changes: 7 additions & 0 deletions rs/moq-quic/MIGRATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ How to update your code for each breaking change, newest first.

## Unreleased

### Receive operations wake transmission themselves ([#7707](https://github.com/moq-dev/moq/pull/7707))

`ShouldTransmit` is removed. `recv::Stream::lease` returns `Result<Lease, Error>` and
`poll_lease` returns `Poll<Result<Lease, Error>>`; remove the transmit hint from tuple
destructuring. `restore`, `release`, and `Chunks::finalize` return `()`; call them
directly. Each operation wakes the connection's transmit waiter when needed.

### Waits replace stream and connection events

Every wait is a `poll_*` taking the caller's `&kio::Waiter`, which moq-quic registers and wakes itself, so a driver keeps no waiter tables.
Expand Down
6 changes: 3 additions & 3 deletions rs/moq-quic/benches/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ fn drain(conn: &mut Connection, id: StreamId, sink: Sink, received: &mut Receive
Poll::Ready(Err(err)) => panic!("read failed: {err}"),
}
};
let _ = chunks.finalize();
chunks.finalize();
done
}

Expand All @@ -374,7 +374,7 @@ fn drain(conn: &mut Connection, id: StreamId, sink: Sink, received: &mut Receive
fn lease(conn: &mut Connection, id: StreamId, want: usize, received: &mut Received, waiter: &kio::Waiter) -> bool {
loop {
let mut stream = conn.recv_stream(id);
let mut lease = match stream.poll_lease(waiter, want).0 {
let mut lease = match stream.poll_lease(waiter, want) {
Poll::Ready(Ok(lease)) => lease,
Poll::Pending => return false,
Poll::Ready(Err(recv::Error::Closed)) => return true,
Expand All @@ -394,7 +394,7 @@ fn lease(conn: &mut Connection, id: StreamId, want: usize, received: &mut Receiv
let chunk = lease.copy_to_bytes(lease.chunk().len());
received.bytes += chunk.len() as u64;
}
let _ = stream.release(lease);
stream.release(lease);
if fin {
received.finished += 1;
let _ = stream.stop(VarInt::from_u32(0));
Expand Down
2 changes: 1 addition & 1 deletion rs/moq-quic/benches/receive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ fn bench_reset_debt(c: &mut Criterion<ThreadCpu>) {
let mut stream = conn.recv_stream(id);
let mut chunks = stream.read().unwrap();
assert!(matches!(chunks.next(usize::MAX), Err(recv::Error::Reset(_))));
let _ = chunks.finalize();
chunks.finalize();
}
let mut limits = moq_quic::Limits::default();
limits.receive_window = std::num::NonZeroU64::new(window as u64);
Expand Down
2 changes: 1 addition & 1 deletion rs/moq-quic/benches/receive_bursts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ fn burst(pair: &mut Pair, mode: Mode, streams: usize, packets: usize) -> isize {
}
}
pair.server.received.finished += 1;
let _ = chunks.finalize();
chunks.finalize();
}
}
pair.server.busy += start.elapsed();
Expand Down
12 changes: 6 additions & 6 deletions rs/moq-quic/src/connection/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ pub use stats::{CreditStats, FrameStats, PathStats, Stats, UdpStats};

mod streams;
pub(crate) use streams::StreamsState;
pub use streams::{ShouldTransmit, Streams, recv, send};
pub use streams::{Streams, recv, send};

mod timer;

Expand Down Expand Up @@ -1383,7 +1383,7 @@ impl Connection {
.streams
.receive_rate_deadline()
.is_some_and(|deadline| deadline <= now)
&& self.streams.grant_receive_rate(now).should_transmit()
&& self.streams.grant_receive_rate(now)
{
self.spaces[SpaceId::Data].pending.max_data = true;
}
Expand Down Expand Up @@ -1728,7 +1728,7 @@ impl Connection {
limits.validate()?;
// The cap first, so a window opened with it is paced rather than granted at once.
if let Some(rate) = limits.receive_rate
&& self.streams.set_receive_rate(rate).should_transmit()
&& self.streams.set_receive_rate(rate)
{
self.spaces[SpaceId::Data].pending.max_data = true;
}
Expand Down Expand Up @@ -3097,7 +3097,7 @@ impl Connection {
let payload = packet.payload.freeze();
// Earned before anything this packet carries is charged against the cap, and granted now:
// the refill retires the credit deadline, so a later timeout would not grant it.
if self.streams.grant_receive_rate(now).should_transmit() {
if self.streams.grant_receive_rate(now) {
self.spaces[SpaceId::Data].pending.max_data = true;
}
let mut is_probing_packet = true;
Expand Down Expand Up @@ -3144,7 +3144,7 @@ impl Connection {
self.read_crypto(SpaceId::Data, &frame, payload_len)?;
}
Frame::Stream(frame) => {
if self.streams.received(frame, payload_len)?.should_transmit() {
if self.streams.received(frame, payload_len)? {
self.spaces[SpaceId::Data].pending.max_data = true;
}
}
Expand Down Expand Up @@ -3202,7 +3202,7 @@ impl Connection {
err.frame = Some(frame::FrameType::RESET_STREAM_AT);
return Err(err);
}
if self.streams.received_reset(frame)?.should_transmit() {
if self.streams.received_reset(frame)? {
self.spaces[SpaceId::Data].pending.max_data = true;
}
}
Expand Down
4 changes: 2 additions & 2 deletions rs/moq-quic/src/connection/mux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ impl Connection {
err.frame = Some(frame::FrameType::RESET_STREAM_AT);
return Err(err);
}
if self.streams.received_reset(reset)?.should_transmit() {
if self.streams.received_reset(reset)? {
self.pending.max_data = true;
}
}
Expand Down Expand Up @@ -799,7 +799,7 @@ impl Connection {
}

fn on_stream(&mut self, stream: frame::Stream, allocation: usize) -> Result<(), TransportError> {
if self.streams.received(stream, allocation)?.should_transmit() {
if self.streams.received(stream, allocation)? {
self.pending.max_data = true;
}
Ok(())
Expand Down
4 changes: 2 additions & 2 deletions rs/moq-quic/src/connection/mux/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ fn read_all(conn: &mut Connection, id: StreamId) -> (Vec<u8>, bool) {
Err(err) => panic!("read failed: {err}"),
}
}
let _ = chunks.finalize();
chunks.finalize();
(data, fin)
}

Expand Down Expand Up @@ -444,7 +444,7 @@ fn reset_stream_at_delivers_the_prefix() {
Err(err) => break err,
}
};
let _ = chunks.finalize();
chunks.finalize();
assert!(data.starts_with(b"header"), "{data:?} {err:?}");
assert_eq!(err, recv::Error::Reset(VarInt::from_u32(9)));
}
Expand Down
Loading
Loading