Files
tailscale/kernel
Brad Fitzpatrick 7e5804da87 kernel/linux/src: add zero-copy receive behind a module parameter, off by default
rx_zerocopy (writable at /sys/module/tswg/parameters/rx_zerocopy) makes
tswg_decrypt_gso decrypt data messages in place in the received packet's
pages, when nothing else can see them, and hand out packets that
reference those pages, rather than copy each message into a new packet.

It's off because it doesn't pay: on a CPU-bound subnet router it was 7%
slower, scatterlist decryption costing more than linear decryption of a
cache-hot copy, and on a 200 Gbps c6in.32xlarge router, where the NIC
interrupt CPUs' page allocation is the limit, it took tswg's own page
allocations out but was still no faster (62.5-63.3 Gbps against
63.4-64.7) at 10% more CPU per byte, since ENA's page per received
packet is what binds. It stays for NICs and loads where it might.

The copying path, unchanged, moves into tswg_decrypt_message_copy.

Updates #426

Signed-off-by: Brad Fitzpatrick <[email protected]>
Change-Id: Ieb6aa3531f869dd47d768fe367c424fbd22aa3f1
2026-11-07 21:49:17 +00:00
..