Skip to content

tokio-quiche: preserve raw socket capabilities - #2588

Open
idy wants to merge 1 commit into
cloudflare:masterfrom
idy:fix/raw-socket-capabilities-main
Open

tokio-quiche: preserve raw socket capabilities#2588
idy wants to merge 1 commit into
cloudflare:masterfrom
idy:fix/raw-socket-capabilities-main

Conversation

@idy

@idy idy commented Aug 16, 2026

Copy link
Copy Markdown

Summary

Preserve the UDP socket capabilities supplied to wrap_quiche_conn() when
constructing the raw connection writer.

The raw wrapper currently hardcodes GSO, pacing offload, and packet-info
support to false, even though Socket<Tx, Rx> already carries the detected
SocketCapabilities. As a result, callers that manually feed received
packets into a raw QUIC connection cannot use send offloads supported by the
underlying socket.

This change:

  • configures GSO from has_gso;
  • configures pacing offload from has_txtime;
  • selects IPv4 or IPv6 packet-info support from the local address family; and
  • adds a regression test for capability propagation.

The default capability values remain disabled, so callers that do not detect
or provide these capabilities retain the existing behavior.

Testing

  • cargo +nightly fmt -- --check
  • cargo test -p tokio-quiche raw_writer_preserves_socket_send_capabilities
  • cargo clippy -p tokio-quiche --all-targets -- -D warnings

Raw QUIC connections discarded the capabilities detected for their UDP
socket, forcing the writer to disable GSO, pacing offload, and packet info.

- Build the raw writer configuration from the supplied socket capabilities
- Select IPv4 or IPv6 packet info according to the local address family
- Add coverage for GSO, pacing offload, and packet-info propagation

Generated with [Codex](https://github.com/openai)
@idy
idy requested a review from a team as a code owner August 16, 2026 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant