From: Kirill Tkhai <ktkhai@virtuozzo.com>
To: davem@davemloft.net, pablo@netfilter.org,
kadlec@blackhole.kfki.hu, fw@strlen.de, netdev@vger.kernel.org,
ktkhai@virtuozzo.com
Subject: [PATCH net-next 01/16] net: Convert ip6 tables pernet_operations
Date: Wed, 07 Mar 2018 12:39:06 +0300 [thread overview]
Message-ID: <152041554632.11627.13032659290557313952.stgit@localhost.localdomain> (raw)
In-Reply-To: <152041531893.11627.15708076126889316570.stgit@localhost.localdomain>
The pernet_operations:
ip6table_filter_net_ops
ip6table_mangle_net_ops
ip6table_nat_net_ops
ip6table_raw_net_ops
ip6table_security_net_ops
have exit methods, which call ip6t_unregister_table().
ip6table_filter_net_ops has init method registering
filter table.
Since there must not be in-flight ipv6 packets at the time
of pernet_operations execution and since pernet_operations
don't send ipv6 packets each other, these pernet_operations
are safe to be async.
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
net/ipv6/netfilter/ip6table_filter.c | 1 +
net/ipv6/netfilter/ip6table_mangle.c | 1 +
net/ipv6/netfilter/ip6table_nat.c | 1 +
net/ipv6/netfilter/ip6table_raw.c | 1 +
net/ipv6/netfilter/ip6table_security.c | 1 +
5 files changed, 5 insertions(+)
diff --git a/net/ipv6/netfilter/ip6table_filter.c b/net/ipv6/netfilter/ip6table_filter.c
index 1343077dde93..06561c84c0bc 100644
--- a/net/ipv6/netfilter/ip6table_filter.c
+++ b/net/ipv6/netfilter/ip6table_filter.c
@@ -87,6 +87,7 @@ static void __net_exit ip6table_filter_net_exit(struct net *net)
static struct pernet_operations ip6table_filter_net_ops = {
.init = ip6table_filter_net_init,
.exit = ip6table_filter_net_exit,
+ .async = true,
};
static int __init ip6table_filter_init(void)
diff --git a/net/ipv6/netfilter/ip6table_mangle.c b/net/ipv6/netfilter/ip6table_mangle.c
index b0524b18c4fb..a11e25936b45 100644
--- a/net/ipv6/netfilter/ip6table_mangle.c
+++ b/net/ipv6/netfilter/ip6table_mangle.c
@@ -107,6 +107,7 @@ static void __net_exit ip6table_mangle_net_exit(struct net *net)
static struct pernet_operations ip6table_mangle_net_ops = {
.exit = ip6table_mangle_net_exit,
+ .async = true,
};
static int __init ip6table_mangle_init(void)
diff --git a/net/ipv6/netfilter/ip6table_nat.c b/net/ipv6/netfilter/ip6table_nat.c
index 47306e45a80a..4475fd300bb6 100644
--- a/net/ipv6/netfilter/ip6table_nat.c
+++ b/net/ipv6/netfilter/ip6table_nat.c
@@ -131,6 +131,7 @@ static void __net_exit ip6table_nat_net_exit(struct net *net)
static struct pernet_operations ip6table_nat_net_ops = {
.exit = ip6table_nat_net_exit,
+ .async = true,
};
static int __init ip6table_nat_init(void)
diff --git a/net/ipv6/netfilter/ip6table_raw.c b/net/ipv6/netfilter/ip6table_raw.c
index 710fa0806c37..a88f3b1995b1 100644
--- a/net/ipv6/netfilter/ip6table_raw.c
+++ b/net/ipv6/netfilter/ip6table_raw.c
@@ -75,6 +75,7 @@ static void __net_exit ip6table_raw_net_exit(struct net *net)
static struct pernet_operations ip6table_raw_net_ops = {
.exit = ip6table_raw_net_exit,
+ .async = true,
};
static int __init ip6table_raw_init(void)
diff --git a/net/ipv6/netfilter/ip6table_security.c b/net/ipv6/netfilter/ip6table_security.c
index cf26ccb04056..320048c008dc 100644
--- a/net/ipv6/netfilter/ip6table_security.c
+++ b/net/ipv6/netfilter/ip6table_security.c
@@ -74,6 +74,7 @@ static void __net_exit ip6table_security_net_exit(struct net *net)
static struct pernet_operations ip6table_security_net_ops = {
.exit = ip6table_security_net_exit,
+ .async = true,
};
static int __init ip6table_security_init(void)
next prev parent reply other threads:[~2018-03-07 9:39 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-07 9:38 [PATCH net-next 00/16] Converting pernet_operations (part #5) Kirill Tkhai
2018-03-07 9:39 ` Kirill Tkhai [this message]
2018-03-07 9:39 ` [PATCH net-next 02/16] net: Convert xfrm_user_net_ops Kirill Tkhai
2018-03-07 9:39 ` [PATCH net-next 03/16] net: Convert nf_tables_net_ops Kirill Tkhai
2018-03-07 9:39 ` [PATCH net-next 04/16] net: Convert nfnetlink_net_ops Kirill Tkhai
2018-03-07 9:39 ` [PATCH net-next 05/16] net: Convert nfnl_acct_ops Kirill Tkhai
2018-03-07 9:39 ` [PATCH net-next 06/16] net: Convert cttimeout_ops Kirill Tkhai
2018-03-07 9:40 ` [PATCH net-next 07/16] net: Convert nfnl_log_net_ops Kirill Tkhai
2018-03-07 9:40 ` [PATCH net-next 08/16] net: Convert nfnl_queue_net_ops Kirill Tkhai
2018-03-07 9:40 ` [PATCH net-next 09/16] net: Convert pg_net_ops Kirill Tkhai
2018-03-07 9:40 ` [PATCH net-next 10/16] net: Convert arptable_filter_net_ops Kirill Tkhai
2018-03-07 9:40 ` [PATCH net-next 11/16] net: Convert iptable_mangle_net_ops Kirill Tkhai
2018-03-07 9:40 ` [PATCH net-next 12/16] net: Convert iptable_nat_net_ops Kirill Tkhai
2018-03-07 9:40 ` [PATCH net-next 13/16] net: Convert iptable_raw_net_ops Kirill Tkhai
2018-03-07 9:41 ` [PATCH net-next 14/16] net: Convert iptable_security_net_ops Kirill Tkhai
2018-03-07 9:41 ` [PATCH net-next 15/16] net: Convert ipv4_net_ops Kirill Tkhai
2018-03-07 9:41 ` [PATCH net-next 16/16] net: Convet ipv6_net_ops Kirill Tkhai
2018-03-08 17:40 ` [PATCH net-next 00/16] Converting pernet_operations (part #5) David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=152041554632.11627.13032659290557313952.stgit@localhost.localdomain \
--to=ktkhai@virtuozzo.com \
--cc=davem@davemloft.net \
--cc=fw@strlen.de \
--cc=kadlec@blackhole.kfki.hu \
--cc=netdev@vger.kernel.org \
--cc=pablo@netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox