Skip to content

fix: restore mtu probe promotion#287

Open
marcus-pousette-hp wants to merge 1 commit into
mainfrom
fix/mtu-probe-promotion
Open

fix: restore mtu probe promotion#287
marcus-pousette-hp wants to merge 1 commit into
mainfrom
fix/mtu-probe-promotion

Conversation

@marcus-pousette-hp

@marcus-pousette-hp marcus-pousette-hp commented Jun 2, 2026

Copy link
Copy Markdown

This fixes MTU probe promotion after 1302a45, which replaced assert(wanted_size > pkt->size) with an early return. That condition is the normal in-band probe case: the packet is smaller than the target MTU and should be padded up to the probe size.

The fix removes that inverted return and rejects invalid padding after computing it. Negative padding means the packet is already larger than the target probe size; padding above 255 cannot fit in the header field.

I added a regression test that transfers 8 MiB over loopback and asserts that successful probes promote the sender from UDX_MTU_BASE to UDX_MTU_MAX.

I also tested this through udx-native@1.20.6 against a remote blind relay. Both peers ran locally and were forced through the remote relay; the remote host was only the relay. Each run transferred 8 MiB.

Build Passes Avg MTU RTOs Retransmits Byte multiplier Throughput
before 5/5 1200 / 1200 4 20,238 1.46x 0.636 MiB/s
after 5/5 ~1443 / ~1437 3 14,120 1.38x 0.673 MiB/s

Verified with ctest --test-dir build-debug --output-on-failure: 30/30 passed, with the existing perf test disabled.

Co-written with AI

@marcus-pousette-hp marcus-pousette-hp force-pushed the fix/mtu-probe-promotion branch from f346121 to 2b71491 Compare June 2, 2026 10:06
@marcus-pousette-hp marcus-pousette-hp marked this pull request as ready for review June 2, 2026 10:18
@marcus-pousette-hp marcus-pousette-hp requested a review from a team June 2, 2026 10:18
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