mirror of
https://github.com/slackhq/nebula.git
synced 2026-11-15 16:06:52 +01:00
tunQueue.Read now takes up to 64 queued packets with one recvmsg_x through internal/msgx, each into its own 64KiB slot of a buffer allocated once per queue, and falls back to the readv drain for good when recvmsg_x is refused or returns a batch intact msghdr_x entries can't produce, or for one Read on a transient error. Ported from the pipeline bench build's tunRecvX, minus its env toggle and stats. With 64 pending packets on the utun this is the remaining send gain: on an M2 mini, one stream, pipeline + 64 pending reads 4.9 Gbps with recvmsg_x and 2.6 with the readv loop, the same as this branch before this commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>