Skip to content

add a segmentation offload option to mqp2p quic endpoints - #32

Merged
fabracht merged 1 commit into
mainfrom
mqp2p-segmentation-offload-option
Oct 11, 2026
Merged

fabracht merged 1 commit into
mainfrom
mqp2p-segmentation-offload-option

Conversation

@fabracht

Copy link
Copy Markdown
Contributor

Adds a way to turn off UDP segmentation offload (GSO) on mqp2p's QUIC endpoints.

Why. netem applies loss once per socket buffer, and with GSO quinn hands it multi-packet super-buffers, so configured loss clusters and the measured rate is wrong. c2-fusion's DDIL harness needs exact netem loss to measure convergence under packet loss. Turning offload off at the interface with ethtool does not help, because the qdisc sees the super-buffer before the device segments it; it has to be off in the QUIC stack.

Change

  • quic::SegmentationOffload (Enabled / Disabled), applied through quinn's TransportConfig::enable_segmentation_offload to the server config and to each client config.
  • QuicEndpoint::bind_with_offload; bind keeps its signature and enables offload, so existing callers are unchanged.
  • PeerConfig::without_segmentation_offload(), passed through by Peer::new.
  • mqp2p bumped to 0.3.0, since PeerConfig gains a public field (a breaking change for struct-literal construction); stitch-p2p and stitch-tasks updated.

Tests. New tests/quic_offload.rs: two endpoints with offload disabled connect over loopback and transfer 64 KiB. mqp2p unit tests and the stitch-p2p suite pass, fmt and clippy (-D warnings) are clean for the changed crates. The broker integration test needs a running mqdb and was not run.

@fabracht
fabracht merged commit b98408e into main Oct 11, 2026
5 of 6 checks passed
@fabracht
fabracht deleted the mqp2p-segmentation-offload-option branch October 11, 2026 06:00
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