Netdev List
 help / color / mirror / Atom feed
From: Kirill Tkhai <ktkhai@virtuozzo.com>
To: davem@davemloft.net, pablo@netfilter.org,
	kadlec@blackhole.kfki.hu, fw@strlen.de, netdev@vger.kernel.org,
	kvalo@codeaurora.org, davem@davemloft.net, edumazet@google.com,
	jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us,
	mostrows@earthlink.net, alex.aring@gmail.com,
	stefan@osg.samsung.com, avagin@virtuozzo.com,
	ktkhai@virtuozzo.com
Subject: [PATCH net-next 08/28] net: Convert tc_action_net_init() and tc_action_net_exit() based pernet_operations
Date: Mon, 26 Feb 2018 16:00:31 +0300	[thread overview]
Message-ID: <151965003143.28549.2784970274166951993.stgit@localhost.localdomain> (raw)
In-Reply-To: <151964991129.28549.5478247975928036472.stgit@localhost.localdomain>

These pernet_operations are from net/sched directory, and they call only
tc_action_net_init() and tc_action_net_exit():

bpf_net_ops
connmark_net_ops
csum_net_ops
gact_net_ops
ife_net_ops
ipt_net_ops
xt_net_ops
mirred_net_ops
nat_net_ops
pedit_net_ops
police_net_ops
sample_net_ops
simp_net_ops
skbedit_net_ops
skbmod_net_ops
tunnel_key_net_ops
vlan_net_ops

1)tc_action_net_init() just allocates and initializes per-net memory.
2)There should not be in-flight packets at the time of tc_action_net_exit()
call, or another pernet_operations send packets to dying net (except
netlink). So, it seems they can be marked as async.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 net/sched/act_bpf.c        |    1 +
 net/sched/act_connmark.c   |    1 +
 net/sched/act_csum.c       |    1 +
 net/sched/act_gact.c       |    1 +
 net/sched/act_ife.c        |    1 +
 net/sched/act_ipt.c        |    2 ++
 net/sched/act_mirred.c     |    1 +
 net/sched/act_nat.c        |    1 +
 net/sched/act_pedit.c      |    1 +
 net/sched/act_police.c     |    1 +
 net/sched/act_sample.c     |    1 +
 net/sched/act_simple.c     |    1 +
 net/sched/act_skbedit.c    |    1 +
 net/sched/act_skbmod.c     |    1 +
 net/sched/act_tunnel_key.c |    1 +
 net/sched/act_vlan.c       |    1 +
 16 files changed, 17 insertions(+)

diff --git a/net/sched/act_bpf.c b/net/sched/act_bpf.c
index cb3c5d403c88..da72e0cf2b1f 100644
--- a/net/sched/act_bpf.c
+++ b/net/sched/act_bpf.c
@@ -413,6 +413,7 @@ static struct pernet_operations bpf_net_ops = {
 	.exit_batch = bpf_exit_net,
 	.id   = &bpf_net_id,
 	.size = sizeof(struct tc_action_net),
+	.async = true,
 };
 
 static int __init bpf_init_module(void)
diff --git a/net/sched/act_connmark.c b/net/sched/act_connmark.c
index e4b880fa51fe..371e5e4ab3e2 100644
--- a/net/sched/act_connmark.c
+++ b/net/sched/act_connmark.c
@@ -222,6 +222,7 @@ static struct pernet_operations connmark_net_ops = {
 	.exit_batch = connmark_exit_net,
 	.id   = &connmark_net_id,
 	.size = sizeof(struct tc_action_net),
+	.async = true,
 };
 
 static int __init connmark_init_module(void)
diff --git a/net/sched/act_csum.c b/net/sched/act_csum.c
index d5c2e528d150..1fb1f1f6a555 100644
--- a/net/sched/act_csum.c
+++ b/net/sched/act_csum.c
@@ -677,6 +677,7 @@ static struct pernet_operations csum_net_ops = {
 	.exit_batch = csum_exit_net,
 	.id   = &csum_net_id,
 	.size = sizeof(struct tc_action_net),
+	.async = true,
 };
 
 MODULE_DESCRIPTION("Checksum updating actions");
diff --git a/net/sched/act_gact.c b/net/sched/act_gact.c
index f072bcf33760..74563254e676 100644
--- a/net/sched/act_gact.c
+++ b/net/sched/act_gact.c
@@ -247,6 +247,7 @@ static struct pernet_operations gact_net_ops = {
 	.exit_batch = gact_exit_net,
 	.id   = &gact_net_id,
 	.size = sizeof(struct tc_action_net),
+	.async = true,
 };
 
 MODULE_AUTHOR("Jamal Hadi Salim(2002-4)");
diff --git a/net/sched/act_ife.c b/net/sched/act_ife.c
index a5994cf0512b..555b1caeff72 100644
--- a/net/sched/act_ife.c
+++ b/net/sched/act_ife.c
@@ -870,6 +870,7 @@ static struct pernet_operations ife_net_ops = {
 	.exit_batch = ife_exit_net,
 	.id   = &ife_net_id,
 	.size = sizeof(struct tc_action_net),
+	.async = true,
 };
 
 static int __init ife_init_module(void)
diff --git a/net/sched/act_ipt.c b/net/sched/act_ipt.c
index 9784629090ad..10866717f88e 100644
--- a/net/sched/act_ipt.c
+++ b/net/sched/act_ipt.c
@@ -349,6 +349,7 @@ static struct pernet_operations ipt_net_ops = {
 	.exit_batch = ipt_exit_net,
 	.id   = &ipt_net_id,
 	.size = sizeof(struct tc_action_net),
+	.async = true,
 };
 
 static int tcf_xt_walker(struct net *net, struct sk_buff *skb,
@@ -399,6 +400,7 @@ static struct pernet_operations xt_net_ops = {
 	.exit_batch = xt_exit_net,
 	.id   = &xt_net_id,
 	.size = sizeof(struct tc_action_net),
+	.async = true,
 };
 
 MODULE_AUTHOR("Jamal Hadi Salim(2002-13)");
diff --git a/net/sched/act_mirred.c b/net/sched/act_mirred.c
index fd34015331ab..64c86579c3d9 100644
--- a/net/sched/act_mirred.c
+++ b/net/sched/act_mirred.c
@@ -353,6 +353,7 @@ static struct pernet_operations mirred_net_ops = {
 	.exit_batch = mirred_exit_net,
 	.id   = &mirred_net_id,
 	.size = sizeof(struct tc_action_net),
+	.async = true,
 };
 
 MODULE_AUTHOR("Jamal Hadi Salim(2002)");
diff --git a/net/sched/act_nat.c b/net/sched/act_nat.c
index 4b5848b6c252..b1bc757f6491 100644
--- a/net/sched/act_nat.c
+++ b/net/sched/act_nat.c
@@ -323,6 +323,7 @@ static struct pernet_operations nat_net_ops = {
 	.exit_batch = nat_exit_net,
 	.id   = &nat_net_id,
 	.size = sizeof(struct tc_action_net),
+	.async = true,
 };
 
 MODULE_DESCRIPTION("Stateless NAT actions");
diff --git a/net/sched/act_pedit.c b/net/sched/act_pedit.c
index 094303c27c5e..5e8cc8f63acd 100644
--- a/net/sched/act_pedit.c
+++ b/net/sched/act_pedit.c
@@ -465,6 +465,7 @@ static struct pernet_operations pedit_net_ops = {
 	.exit_batch = pedit_exit_net,
 	.id   = &pedit_net_id,
 	.size = sizeof(struct tc_action_net),
+	.async = true,
 };
 
 MODULE_AUTHOR("Jamal Hadi Salim(2002-4)");
diff --git a/net/sched/act_police.c b/net/sched/act_police.c
index ff55bd6c7db0..51fe4fe343f7 100644
--- a/net/sched/act_police.c
+++ b/net/sched/act_police.c
@@ -347,6 +347,7 @@ static struct pernet_operations police_net_ops = {
 	.exit_batch = police_exit_net,
 	.id   = &police_net_id,
 	.size = sizeof(struct tc_action_net),
+	.async = true,
 };
 
 static int __init police_init_module(void)
diff --git a/net/sched/act_sample.c b/net/sched/act_sample.c
index 9765145aaf40..238dfd27e995 100644
--- a/net/sched/act_sample.c
+++ b/net/sched/act_sample.c
@@ -248,6 +248,7 @@ static struct pernet_operations sample_net_ops = {
 	.exit_batch = sample_exit_net,
 	.id   = &sample_net_id,
 	.size = sizeof(struct tc_action_net),
+	.async = true,
 };
 
 static int __init sample_init_module(void)
diff --git a/net/sched/act_simple.c b/net/sched/act_simple.c
index 8244e221fe4f..91816d73f3f3 100644
--- a/net/sched/act_simple.c
+++ b/net/sched/act_simple.c
@@ -216,6 +216,7 @@ static struct pernet_operations simp_net_ops = {
 	.exit_batch = simp_exit_net,
 	.id   = &simp_net_id,
 	.size = sizeof(struct tc_action_net),
+	.async = true,
 };
 
 MODULE_AUTHOR("Jamal Hadi Salim(2005)");
diff --git a/net/sched/act_skbedit.c b/net/sched/act_skbedit.c
index ddf69fc01bdf..7971510fe61b 100644
--- a/net/sched/act_skbedit.c
+++ b/net/sched/act_skbedit.c
@@ -253,6 +253,7 @@ static struct pernet_operations skbedit_net_ops = {
 	.exit_batch = skbedit_exit_net,
 	.id   = &skbedit_net_id,
 	.size = sizeof(struct tc_action_net),
+	.async = true,
 };
 
 MODULE_AUTHOR("Alexander Duyck, <alexander.h.duyck@intel.com>");
diff --git a/net/sched/act_skbmod.c b/net/sched/act_skbmod.c
index a406f191cb84..febec75f4f7a 100644
--- a/net/sched/act_skbmod.c
+++ b/net/sched/act_skbmod.c
@@ -278,6 +278,7 @@ static struct pernet_operations skbmod_net_ops = {
 	.exit_batch = skbmod_exit_net,
 	.id   = &skbmod_net_id,
 	.size = sizeof(struct tc_action_net),
+	.async = true,
 };
 
 MODULE_AUTHOR("Jamal Hadi Salim, <jhs@mojatatu.com>");
diff --git a/net/sched/act_tunnel_key.c b/net/sched/act_tunnel_key.c
index 41ff9d0e5c62..9169b7e78ada 100644
--- a/net/sched/act_tunnel_key.c
+++ b/net/sched/act_tunnel_key.c
@@ -337,6 +337,7 @@ static struct pernet_operations tunnel_key_net_ops = {
 	.exit_batch = tunnel_key_exit_net,
 	.id   = &tunnel_key_net_id,
 	.size = sizeof(struct tc_action_net),
+	.async = true,
 };
 
 static int __init tunnel_key_init_module(void)
diff --git a/net/sched/act_vlan.c b/net/sched/act_vlan.c
index 71411a255f04..c2ee7fd51cc9 100644
--- a/net/sched/act_vlan.c
+++ b/net/sched/act_vlan.c
@@ -313,6 +313,7 @@ static struct pernet_operations vlan_net_ops = {
 	.exit_batch = vlan_exit_net,
 	.id   = &vlan_net_id,
 	.size = sizeof(struct tc_action_net),
+	.async = true,
 };
 
 static int __init vlan_init_module(void)

  parent reply	other threads:[~2018-02-26 13:00 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-26 12:59 [PATCH net-next 00/28] Converting pernet_operations (part #3) Kirill Tkhai
2018-02-26 12:59 ` [PATCH net-next 01/28] net: Convert /proc creating and destroying pernet_operations Kirill Tkhai
2018-02-26 12:59 ` [PATCH net-next 02/28] net: Convert hashlimit_net_ops and recent_net_ops Kirill Tkhai
2018-02-26 12:59 ` [PATCH net-next 03/28] net: Convert synproxy_net_ops Kirill Tkhai
2018-02-26 12:59 ` [PATCH net-next 04/28] net: Convert nfs_net_ops Kirill Tkhai
2018-02-26 12:59 ` [PATCH net-next 05/28] net: Convert simple pernet_operations Kirill Tkhai
2018-02-26 13:00 ` [PATCH net-next 06/28] net: Convert cma_pernet_operations Kirill Tkhai
2018-02-26 13:00 ` [PATCH net-next 07/28] net: Convert sysctl creating and destroying pernet_operations Kirill Tkhai
2018-02-26 13:00 ` Kirill Tkhai [this message]
2018-02-26 13:00 ` [PATCH net-next 09/28] net: Convert bond_net_ops Kirill Tkhai
2018-02-26 13:00 ` [PATCH net-next 10/28] net: Convert geneve_net_ops Kirill Tkhai
2018-02-26 13:01 ` [PATCH net-next 11/28] net: Convert gtp_net_ops Kirill Tkhai
2018-02-26 13:01 ` [PATCH net-next 12/28] net: Convert ppp_net_ops Kirill Tkhai
2018-02-26 13:01 ` [PATCH net-next 13/28] net: Convert vxlan_net_ops Kirill Tkhai
2018-02-26 13:01 ` [PATCH net-next 14/28] net: Convert br_net_ops Kirill Tkhai
2018-02-26 13:01 ` [PATCH net-next 15/28] net: Convert ipgre_net_ops, ipgre_tap_net_ops, erspan_net_ops, vti_net_ops and ipip_net_ops Kirill Tkhai
2018-02-26 13:02 ` [PATCH net-next 16/28] net: Convert ip6gre_net_ops Kirill Tkhai
2018-02-26 13:02 ` [PATCH net-next 17/28] net: Convert ip6_tnl_net_ops Kirill Tkhai
2018-02-26 13:02 ` [PATCH net-next 18/28] net: Convert vti6_net_ops Kirill Tkhai
2018-02-26 13:02 ` [PATCH net-next 19/28] net: Convert sit_net_ops Kirill Tkhai
2018-02-26 13:02 ` [PATCH net-next 20/28] net: Convert cfg802154_pernet_ops Kirill Tkhai
2018-02-27 10:24   ` Stefan Schmidt
2018-02-26 13:02 ` [PATCH net-next 21/28] net: Convert ipvlan_net_ops Kirill Tkhai
2018-02-26 13:02 ` [PATCH net-next 22/28] net: Convert brnf_net_ops Kirill Tkhai
2018-02-26 13:03 ` [PATCH net-next 23/28] net: Convert clusterip_net_ops Kirill Tkhai
2018-02-26 13:03 ` [PATCH net-next 24/28] net: Convert defrag4_net_ops Kirill Tkhai
2018-02-26 13:03 ` [PATCH net-next 25/28] net: Convert ila_net_ops Kirill Tkhai
2018-02-26 13:03 ` [PATCH net-next 26/28] net: Convert defrag6_net_ops Kirill Tkhai
2018-02-26 13:03 ` [PATCH net-next 27/28] net: Convert selinux_net_ops Kirill Tkhai
2018-02-26 13:04 ` [PATCH net-next 28/28] net: Convert smack_net_ops Kirill Tkhai
2018-02-27 16:08 ` [PATCH net-next 00/28] Converting pernet_operations (part #3) 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=151965003143.28549.2784970274166951993.stgit@localhost.localdomain \
    --to=ktkhai@virtuozzo.com \
    --cc=alex.aring@gmail.com \
    --cc=avagin@virtuozzo.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=fw@strlen.de \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=kadlec@blackhole.kfki.hu \
    --cc=kvalo@codeaurora.org \
    --cc=mostrows@earthlink.net \
    --cc=netdev@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=stefan@osg.samsung.com \
    --cc=xiyou.wangcong@gmail.com \
    /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