Repository navigation
Conversation
bcreane
force-pushed
the
bcreane/investigate-tailscale-issue-20668-slow-dataplane
branch
from
August 6, 2026 14:51
1a61204 to
1223459
Compare
vnet had no MTU concept, so nothing could exercise a path whose real MTU is smaller than the one tailscaled assumes. Add Network.SetMTU, which drops oversized forwarded packets without an ICMP reply (the worst case for a sender that assumes rather than probes), plus a tta /bytes endpoint and Env.HTTPGetN to drive a bulk node-to-node transfer. With a 1280-byte underlay, a 1 MiB transfer over a direct path moves 512 bytes; the same topology at 1500 moves all of it in 590ms. The dropped packets are 1340 bytes: a 1280-byte TUN payload plus 60 of framing. Enabling PMTUD does not change that, which is the useful part. The probes go out and only the 1280-byte one is answered, so discovery finds the real MTU, but DefaultTUNMTU discards it and returns safeTUNMTU per its TODO, pending PTB generation. Throughput is byte-identical either way, so the remaining work is the plumbing plus PTB, not the probing. The repro is behind --run-unfixed-tests since it fails until that lands; TestLargeMTUUnderlayThroughput is the same scenario with a 1500-byte underlay and runs in CI as a harness control. Updates #311 Updates #20668 Signed-off-by: Brendan Creane <[email protected]>
bcreane
force-pushed
the
bcreane/investigate-tailscale-issue-20668-slow-dataplane
branch
from
August 6, 2026 15:16
1223459 to
157a866
Compare
bcreane
marked this pull request as ready for review
August 6, 2026 16:36
Contributor
Author
|
github actions outage causing CI failures: https://www.githubstatus.com/incidents/qcvjkzcs7j74 |
Contributor
Author
|
As @raggi points out:
Closing this test since its based on faulty assumptions. |
bcreane
deleted the
bcreane/investigate-tailscale-issue-20668-slow-dataplane
branch
August 6, 2026 22:49
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.
vnethad no MTU concept, so nothing could exercise a path whose real MTU is smaller than the onetailscaledassumes. AddsNetwork.SetMTU, which drops oversized forwarded packets without an ICMP reply (the worst case for a sender that assumes rather than probes), plus atta/bytesendpoint andEnv.HTTPGetNto drive a bulk node-to-node transfer.Only forwarded traffic crossing the WAN link is constrained - same-LAN packets and netstack-originated traffic (control, DERP, DNS) are unaffected - so a test can narrow the underlay between two nodes while leaving their paths to control and DERP full-size.
What it shows
Dropped packets are 1340 bytes: a 1280-byte TUN payload plus 60 of framing.
Enabling PMTUD makes no difference, which is the useful part. Probing runs and finds the right answer - only the 1280-byte probe is answered - but
DefaultTUNMTUdiscards it and returnssafeTUNMTUper its TODO, pending PTB generation. So the remaining work in #311 is the plumbing plus PTB, not the probing. Full evidence in my comment on #311.Tests
vnet/mtu_test.go- pure Go, no VMs, ~30ms. Covers egress/ingress, the boundary cases, that 0 means unlimited, and that same-LAN traffic is exempt.TestLargeMTUUnderlayThroughput- the 1500-byte control. Expected to pass, runs in CI.TestSmallMTUUnderlayThroughput- the repro. Fails until FR: Implement peer MTU discovery through the tailnet #311 is fixed, so it's behind--run-unfixed-tests(natlab CI discovers everyTest*in the package, and this would otherwise be permanently red).Both VM tests verified locally under TCG; the control passes, the repro fails as described. Needs the
run-natlab-testslabel to exercise them in CI.Updates #311
Updates #20668