[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <151903022826.32574.3763121725718509932.stgit@localhost.localdomain>
Date: Mon, 19 Feb 2018 11:50:28 +0300
From: Kirill Tkhai <ktkhai@...tuozzo.com>
To: davem@...emloft.net, avagin@...tuozzo.com, pablo@...filter.org,
kadlec@...ckhole.kfki.hu, fw@...len.de, yoshfuji@...ux-ipv6.org,
afaerber@...e.de, steffen.klassert@...unet.com,
herbert@...dor.apana.org.au, johannes@...solutions.net,
netdev@...r.kernel.org, ktkhai@...tuozzo.com
Subject: [PATCH 13/16] net: Convert fib6_net_ops,
ipv6_addr_label_ops and ip6_segments_ops
These pernet_operations register and unregister tables
and lists for packets forwarding. All of the entities
are per-net. Init methods makes simple initializations,
and since net is not visible for foreigners at the time
it is working, it can't race with anything. Exit method
is executed when there are only local devices, and there
mustn't be packets in-flight. Also, it looks like no one
pernet_operations want to send ipv6 packets to foreign
net. The same reasons are for ipv6_addr_label_ops and
ip6_segments_ops. So, we are able to mark all them as
async.
Signed-off-by: Kirill Tkhai <ktkhai@...tuozzo.com>
---
net/ipv6/addrlabel.c | 1 +
net/ipv6/ip6_fib.c | 1 +
net/ipv6/seg6.c | 1 +
3 files changed, 3 insertions(+)
diff --git a/net/ipv6/addrlabel.c b/net/ipv6/addrlabel.c
index 1d6ced37ad71..ba2e63633370 100644
--- a/net/ipv6/addrlabel.c
+++ b/net/ipv6/addrlabel.c
@@ -344,6 +344,7 @@ static void __net_exit ip6addrlbl_net_exit(struct net *net)
static struct pernet_operations ipv6_addr_label_ops = {
.init = ip6addrlbl_net_init,
.exit = ip6addrlbl_net_exit,
+ .async = true,
};
int __init ipv6_addr_label_init(void)
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
index 92b8d8c75eed..cab95cf3b39f 100644
--- a/net/ipv6/ip6_fib.c
+++ b/net/ipv6/ip6_fib.c
@@ -2160,6 +2160,7 @@ static void fib6_net_exit(struct net *net)
static struct pernet_operations fib6_net_ops = {
.init = fib6_net_init,
.exit = fib6_net_exit,
+ .async = true,
};
int __init fib6_init(void)
diff --git a/net/ipv6/seg6.c b/net/ipv6/seg6.c
index 7f5621d09571..c3f13c3bd8a9 100644
--- a/net/ipv6/seg6.c
+++ b/net/ipv6/seg6.c
@@ -395,6 +395,7 @@ static void __net_exit seg6_net_exit(struct net *net)
static struct pernet_operations ip6_segments_ops = {
.init = seg6_net_init,
.exit = seg6_net_exit,
+ .async = true,
};
static const struct genl_ops seg6_genl_ops[] = {
Powered by blists - more mailing lists