Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'wireguard-fixes-for-6-17-rc6'

Jason A. Donenfeld says:

====================
wireguard fixes for 6.17-rc6

Please find three small fixes to wireguard:

1) A general simplification to the way wireguard chooses the next
available cpu, by making use of cpumask_nth(), and covering an edge
case.

2) A cleanup to the selftests kconfig.

3) A fix to the selftests kconfig so that it actually runs again.
====================

Link: https://patch.msgid.link/20250910013644.4153708-1-Jason@zx2c4.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+8 -13
+4 -9
drivers/net/wireguard/queueing.h
··· 104 104 105 105 static inline int wg_cpumask_choose_online(int *stored_cpu, unsigned int id) 106 106 { 107 - unsigned int cpu = *stored_cpu, cpu_index, i; 107 + unsigned int cpu = *stored_cpu; 108 108 109 - if (unlikely(cpu >= nr_cpu_ids || 110 - !cpumask_test_cpu(cpu, cpu_online_mask))) { 111 - cpu_index = id % cpumask_weight(cpu_online_mask); 112 - cpu = cpumask_first(cpu_online_mask); 113 - for (i = 0; i < cpu_index; ++i) 114 - cpu = cpumask_next(cpu, cpu_online_mask); 115 - *stored_cpu = cpu; 116 - } 109 + while (unlikely(cpu >= nr_cpu_ids || !cpu_online(cpu))) 110 + cpu = *stored_cpu = cpumask_nth(id % num_online_cpus(), cpu_online_mask); 111 + 117 112 return cpu; 118 113 } 119 114
+4 -4
tools/testing/selftests/wireguard/qemu/kernel.config
··· 20 20 CONFIG_NETFILTER_XT_NAT=y 21 21 CONFIG_NETFILTER_XT_MATCH_LENGTH=y 22 22 CONFIG_NETFILTER_XT_MARK=y 23 - CONFIG_NETFILTER_XT_TARGET_MASQUERADE=m 24 - CONFIG_IP_NF_TARGET_REJECT=m 25 - CONFIG_IP6_NF_TARGET_REJECT=m 23 + CONFIG_NETFILTER_XT_TARGET_MASQUERADE=y 24 + CONFIG_IP_NF_TARGET_REJECT=y 25 + CONFIG_IP6_NF_TARGET_REJECT=y 26 + CONFIG_IP_NF_IPTABLES_LEGACY=y 26 27 CONFIG_IP_NF_IPTABLES=y 27 28 CONFIG_IP_NF_FILTER=y 28 29 CONFIG_IP_NF_MANGLE=y ··· 49 48 CONFIG_FUTEX=y 50 49 CONFIG_SHMEM=y 51 50 CONFIG_SLUB=y 52 - CONFIG_SPARSEMEM_VMEMMAP=y 53 51 CONFIG_SMP=y 54 52 CONFIG_SCHED_SMT=y 55 53 CONFIG_SCHED_MC=y