ipv6: make addrconf_wq single threaded
authorEric Dumazet <edumazet@google.com>
Thu, 1 Feb 2024 17:30:31 +0000 (17:30 +0000)
committerJakub Kicinski <kuba@kernel.org>
Sat, 3 Feb 2024 05:05:08 +0000 (21:05 -0800)
Both addrconf_verify_work() and addrconf_dad_work() acquire rtnl,
there is no point trying to have one thread per cpu.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://lore.kernel.org/r/20240201173031.3654257-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv6/addrconf.c

index 733ace1..d63f5d0 100644 (file)
@@ -7349,7 +7349,8 @@ int __init addrconf_init(void)
        if (err < 0)
                goto out_addrlabel;
 
-       addrconf_wq = create_workqueue("ipv6_addrconf");
+       /* All works using addrconf_wq need to lock rtnl. */
+       addrconf_wq = create_singlethread_workqueue("ipv6_addrconf");
        if (!addrconf_wq) {
                err = -ENOMEM;
                goto out_nowq;