From 50cfbb6867208e0913bd2d2cf7d595c56c9e49e1 Mon Sep 17 00:00:00 2001 From: shenlei Date: Thu, 15 Oct 2026 10:30:43 +0900 Subject: [PATCH] Raise data-plane TCP buffers to lift single-stream throughput Single TCP streams through the SDK data plane were capped at about window / RTT with a 128 KiB window. Raise the per-socket TCP receive buffer to 1 MiB and transmit buffer to 512 KiB. smoltcp negotiates window scaling from the buffer size, so no wire-format change is needed. Co-Authored-By: Claude Haiku 5.5 --- vendor/easytier/MESHPORT.md | 1 + .../easytier/easytier-core/src/gateway/dataplane/stack.rs | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/vendor/easytier/MESHPORT.md b/vendor/easytier/MESHPORT.md index d23d030..28121fb 100644 --- a/vendor/easytier/MESHPORT.md +++ b/vendor/easytier/MESHPORT.md @@ -19,6 +19,7 @@ Local modifications: - easytier-core/src/peers/peer_manager.rs: apply the same host filter to application TCP/UDP packet destinations. - easytier/src/instance/virtual_nic.rs: recompute filtered route deltas on events and periodic refresh, retry failed route additions. - easytier/Cargo.toml and easytier/src/instance/config.rs: expose the existing core packet proxy as an independent native host capability for subnet-gateway tests, without requiring KCP/QUIC. SDK production builds do not enable it. +- easytier-core/src/gateway/dataplane/stack.rs: data-plane TCP socket buffers raised from 128 KiB to 1 MiB receive / 512 KiB transmit, lifting the single-stream window ceiling (window / RTT). Wire format unchanged; window scaling is negotiated from buffer size. - Cargo.toml: reduced workspace member list. No packet/protobuf wire-format modification. Do not assume mixed-version interoperability from local tests alone. Before upstream updates, compare these files against the pinned revision and rerun MeshPort real overlay and transport fallback tests. See ../../docs/optimization.md for policy limits. diff --git a/vendor/easytier/easytier-core/src/gateway/dataplane/stack.rs b/vendor/easytier/easytier-core/src/gateway/dataplane/stack.rs index 19b664c..e2f7fc8 100644 --- a/vendor/easytier/easytier-core/src/gateway/dataplane/stack.rs +++ b/vendor/easytier/easytier-core/src/gateway/dataplane/stack.rs @@ -93,8 +93,11 @@ impl SmoltcpPlane { .expect("validated IPv4 address"), ], Some(BufferSize { - tcp_rx_size: 1024 * 128, - tcp_tx_size: 1024 * 128, + // Per-socket TCP windows bound single-stream throughput to + // about window / RTT. rx sets the download window; each socket + // allocates rx + tx up front (~1.5 MiB per connection). + tcp_rx_size: 1024 * 1024, + tcp_tx_size: 1024 * 512, udp_rx_size: 1024 * 128, udp_tx_size: 1024 * 128, udp_rx_meta_size: 128,