Skip to content

Commit 06a34f7

Browse files
borkmannkuba-moo
authored andcommitted
wireguard: device: support big tcp GSO
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]>
1 parent 0290abc commit 06a34f7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/net/wireguard/device.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,8 @@ static void wg_setup(struct net_device *dev)
302302
/* We need to keep the dst around in case of icmp replies. */
303303
netif_keep_dst(dev);
304304

305+
netif_set_tso_max_size(dev, GSO_MAX_SIZE);
306+
305307
wg->dev = dev;
306308
}
307309

0 commit comments

Comments
 (0)