From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: netdev@vger.kernel.org, kuba@kernel.org, pabeni@redhat.com
Cc: Daniel Borkmann <daniel@iogearbox.net>,
"Jason A. Donenfeld" <Jason@zx2c4.com>
Subject: [PATCH net-next 4/4] wireguard: device: support big tcp GSO
Date: Sun, 17 Nov 2024 22:20:30 +0100 [thread overview]
Message-ID: <20241117212030.629159-5-Jason@zx2c4.com> (raw)
In-Reply-To: <20241117212030.629159-1-Jason@zx2c4.com>
From: Daniel Borkmann <daniel@iogearbox.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@iogearbox.net>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.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
next prev parent reply other threads:[~2024-11-17 21:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-17 21:20 [PATCH net-next 0/4] wireguard updates and fixes for 6.13 Jason A. Donenfeld
2024-11-17 21:20 ` [PATCH net-next 1/4] wireguard: device: omit unnecessary memset of netdev private data Jason A. Donenfeld
2024-11-17 21:20 ` [PATCH net-next 2/4] wireguard: allowedips: remove redundant selftest call Jason A. Donenfeld
2024-11-17 21:20 ` [PATCH net-next 3/4] wireguard: selftests: load nf_conntrack if not present Jason A. Donenfeld
2024-11-17 21:20 ` Jason A. Donenfeld [this message]
2024-11-19 4:00 ` [PATCH net-next 0/4] wireguard updates and fixes for 6.13 patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241117212030.629159-5-Jason@zx2c4.com \
--to=jason@zx2c4.com \
--cc=daniel@iogearbox.net \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.