Repository navigation
add a segmentation offload option to mqp2p quic endpoints - #32
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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'sTransportConfig::enable_segmentation_offloadto the server config and to each client config.QuicEndpoint::bind_with_offload;bindkeeps its signature and enables offload, so existing callers are unchanged.PeerConfig::without_segmentation_offload(), passed through byPeer::new.PeerConfiggains 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 runningmqdband was not run.