github lance0/xfr v0.9.1

9 hours ago

What's New (includes v0.9.0 + v0.9.1)

v0.9.0 was tagged but never released due to CI issues. This release includes all v0.9.0 features plus v0.9.1 fixes.

Added

  • MPTCP support (--mptcp) — Multi-Path TCP on Linux 5.6+ (issue #24). Uses IPPROTO_MPTCP at socket creation via socket2. All TCP features work transparently. Server automatically creates MPTCP listeners when available (no flag needed) — accepts both MPTCP and regular TCP clients with silent fallback.
  • Kernel TCP pacing via SO_MAX_PACING_RATE (issue #30) — On Linux, -b now uses the kernel's FQ scheduler with EDT for precise per-packet timing, eliminating burst behavior from userspace sleep/wake cycles. Falls back to userspace pacing on non-Linux, MPTCP sockets, or if the setsockopt fails. Note: -b sets a global bitrate shared across all parallel streams (unlike iperf3 where -b is per-stream).

Changed

  • Library APIcreate_tcp_listener(), connect_tcp(), and connect_tcp_with_bind() now take a mptcp: bool parameter. Pass false to preserve existing behavior.

Fixed

  • High stream-count teardown hardening (issue #32) — client now stops local data streams at local duration expiry instead of waiting for server Result, scales stream join timeout with stream count (max(2s, streams*50ms)), and TCP receivers drain briefly after cancel to reduce reset-on-close bursts at high -P.
  • Best-effort send shutdownsend_data() shutdown no longer propagates errors during normal teardown races.
  • Kernel pacing rate widthSO_MAX_PACING_RATE now uses native c_ulong instead of u32, removing an unintended ~34 Gbps ceiling on 64-bit Linux.
  • JoinHandle panic with many parallel streams (issue #24) — removed second join_all after aborting timed-out stream tasks.
  • Final summary showing 0 retransmits/RTT/cwnd (issue #26) — each stream task captures a final sender-side TCP_INFO snapshot before socket close.
  • Broken pipe / connection reset at teardown (issue #25) — client joins stream task handles with timeout before returning.
  • MPTCP label in server log — server displays "MPTCP" instead of "TCP" when client uses --mptcp.

Install

# Homebrew
brew install lance0/tap/xfr

# Cargo
cargo install xfr

# Binary (Linux x86_64)
curl -sSL https://github.com/lance0/xfr/releases/download/v0.9.1/xfr-x86_64-unknown-linux-musl.tar.gz | tar xz

Acknowledgments

Thanks to @matttbe (Linux kernel MPTCP co-maintainer) for extensive testing, bug reports (#24, #25, #30, #32), suggesting kernel TCP pacing via SO_MAX_PACING_RATE, and catching the FIN vs RST teardown behavior.

Full Changelog: v0.8.0...v0.9.1

Don't miss a new xfr release

NewReleases is sending notifications on new releases.