]> Git Repo - linux.git/commitdiff
wireguard: device: support big tcp GSO
authorDaniel Borkmann <[email protected]>
Sun, 17 Nov 2024 21:20:30 +0000 (22:20 +0100)
committerJakub Kicinski <[email protected]>
Tue, 19 Nov 2024 03:32:27 +0000 (19:32 -0800)
Advertise GSO_MAX_SIZE as TSO max size in order support BIG TCP for wireguard.
This helps to improve wireguard performance a bit when enabled as it allows
wireguard to aggregate larger skbs in wg_packet_consume_data_done() via
napi_gro_receive(), but also allows the stack to build larger skbs on xmit
where the driver then segments them before encryption inside wg_xmit().
We've seen a 15% improvement in TCP stream performance.

Signed-off-by: Daniel Borkmann <[email protected]>
Signed-off-by: Jason A. Donenfeld <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
drivers/net/wireguard/device.c

index a2ba71fbbed46954bd176c621af066b1b82878c5..6cf173a008e782c8254d45bbd250202fc215da5a 100644 (file)
@@ -302,6 +302,8 @@ static void wg_setup(struct net_device *dev)
        /* We need to keep the dst around in case of icmp replies. */
        netif_keep_dst(dev);
 
+       netif_set_tso_max_size(dev, GSO_MAX_SIZE);
+
        wg->dev = dev;
 }
 
This page took 0.05293 seconds and 4 git commands to generate.