net: Convert pg_net_ops
authorKirill Tkhai <ktkhai@virtuozzo.com>
Wed, 7 Mar 2018 09:40:19 +0000 (12:40 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 8 Mar 2018 17:36:44 +0000 (12:36 -0500)
These pernet_operations create per-net pktgen threads
and /proc entries. These pernet subsys looks closed
in itself, and there are no pernet_operations outside
this file, which are interested in the threads.
Init and/or exit methods look safe to be executed
in parallel.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/pktgen.c

index b8ab5c8295113a8d30b64d8a260d2d7582ead0f3..d81bddd1bb807a8c0eb696bd51ca8828700e7eea 100644 (file)
@@ -3851,6 +3851,7 @@ static struct pernet_operations pg_net_ops = {
        .exit = pg_net_exit,
        .id   = &pg_net_id,
        .size = sizeof(struct pktgen_net),
+       .async = true,
 };
 
 static int __init pg_init(void)