diff options
author | 2024-11-17 21:20:13 +0100 | |
---|---|---|
committer | 2024-11-17 22:07:59 +0100 | |
commit | 89a6fc1a6c8e5d1f7439e2fc216af4c47ea709f0 (patch) | |
tree | 29be7e9b4bfd4ec7700f4c9d128c7749479ac3b4 | |
parent | wireguard: selftests: load nf_conntrack if not present (diff) | |
download | wireguard-linux-89a6fc1a6c8e5d1f7439e2fc216af4c47ea709f0.tar.xz wireguard-linux-89a6fc1a6c8e5d1f7439e2fc216af4c47ea709f0.zip |
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 <daniel@iogearbox.net>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r-- | drivers/net/wireguard/device.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireguard/device.c b/drivers/net/wireguard/device.c index a2ba71fbbed4..6cf173a008e7 100644 --- a/drivers/net/wireguard/device.c +++ b/drivers/net/wireguard/device.c @@ -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; } |