[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241117212030.629159-5-Jason@zx2c4.com>
Date: Sun, 17 Nov 2024 22:20:30 +0100
From: "Jason A. Donenfeld" <Jason@...c4.com>
To: netdev@...r.kernel.org,
kuba@...nel.org,
pabeni@...hat.com
Cc: Daniel Borkmann <daniel@...earbox.net>,
"Jason A. Donenfeld" <Jason@...c4.com>
Subject: [PATCH net-next 4/4] wireguard: device: support big tcp GSO
From: Daniel Borkmann <daniel@...earbox.net>
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@...earbox.net>
Signed-off-by: Jason A. Donenfeld <Jason@...c4.com>
---
drivers/net/wireguard/device.c | 2 ++
1 file changed, 2 insertions(+)
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;
}
--
2.46.0
Powered by blists - more mailing lists