net: Convert ovs_net_ops
authorKirill Tkhai <ktkhai@virtuozzo.com>
Thu, 15 Mar 2018 09:11:16 +0000 (12:11 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 17 Mar 2018 21:07:39 +0000 (17:07 -0400)
These pernet_operations initialize and destroy net_generic()
data pointed by ovs_net_id. Exit method destroys vports from
alive net to exiting net. Since they are only pernet_operations
interested in this data, and exit method is executed under
exclusive global lock (ovs_mutex), they are safe to be executed
in parallel.

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

index ef38e5aecd2851d61d204e4e04c9d6d723f14887..100191df03714d9b67e742dffe5339f7d438cb32 100644 (file)
@@ -2384,6 +2384,7 @@ static struct pernet_operations ovs_net_ops = {
        .exit = ovs_exit_net,
        .id   = &ovs_net_id,
        .size = sizeof(struct ovs_net),
+       .async = true,
 };
 
 static int __init dp_init(void)