Skip to content

Commit 84ad482

Browse files
committed
Merge branch 'wireguard-updates-and-fixes-for-6-13'
Jason A. Donenfeld says: ==================== wireguard updates and fixes for 6.13 This tiny series (+3/-2) fixes one bug and has three small improvements. 1) Fix running the netns.sh test suite on systems that haven't yet inserted the nf_conntrack module. 2) Remove a stray useless function call in a selftest. 3) There's no need to zero out the netdev private data in recent kernels. 4) Set the TSO max size to be GSO_MAX_SIZE, so that we aggregate larger packets. Daniel reports seeing a 15% improvement in a simple load and suggested the speedups would be even better in more complex loads. ==================== Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
2 parents 85c7975 + 06a34f7 commit 84ad482

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

drivers/net/wireguard/device.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +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-
memset(wg, 0, sizeof(*wg));
305+
netif_set_tso_max_size(dev, GSO_MAX_SIZE);
306+
306307
wg->dev = dev;
307308
}
308309

drivers/net/wireguard/selftest/allowedips.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,6 @@ static __init bool randomized_test(void)
383383
for (i = 0; i < NUM_QUERIES; ++i) {
384384
get_random_bytes(ip, 4);
385385
if (lookup(t.root4, 32, ip) != horrible_allowedips_lookup_v4(&h, (struct in_addr *)ip)) {
386-
horrible_allowedips_lookup_v4(&h, (struct in_addr *)ip);
387386
pr_err("allowedips random v4 self-test: FAIL\n");
388387
goto free;
389388
}

tools/testing/selftests/wireguard/netns.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,7 @@ waitiface $netns1 vethc
332332
waitiface $netns2 veths
333333

334334
n0 bash -c 'printf 1 > /proc/sys/net/ipv4/ip_forward'
335+
[[ -e /proc/sys/net/netfilter/nf_conntrack_udp_timeout ]] || modprobe nf_conntrack
335336
n0 bash -c 'printf 2 > /proc/sys/net/netfilter/nf_conntrack_udp_timeout'
336337
n0 bash -c 'printf 2 > /proc/sys/net/netfilter/nf_conntrack_udp_timeout_stream'
337338
n0 iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -d 10.0.0.0/24 -j SNAT --to 10.0.0.1

0 commit comments

Comments
 (0)