aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKirill Tkhai <ktkhai@virtuozzo.com>2018-02-26 08:00:31 -0500
committerDavid S. Miller <davem@davemloft.net>2018-02-27 11:01:36 -0500
commit685ecfb19888963f61c6085c17c254dbf665e9da (patch)
treeb9758242b6b6b1f437b8d85aa3da0315f9333576
parent5fcc85843d94e40ac1633d18d9651f69d9f16770 (diff)
net: Convert tc_action_net_init() and tc_action_net_exit() based pernet_operations
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> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/sched/act_bpf.c1
-rw-r--r--net/sched/act_connmark.c1
-rw-r--r--net/sched/act_csum.c1
-rw-r--r--net/sched/act_gact.c1
-rw-r--r--net/sched/act_ife.c1
-rw-r--r--net/sched/act_ipt.c2
-rw-r--r--net/sched/act_mirred.c1
-rw-r--r--net/sched/act_nat.c1
-rw-r--r--net/sched/act_pedit.c1
-rw-r--r--net/sched/act_police.c1
-rw-r--r--net/sched/act_sample.c1
-rw-r--r--net/sched/act_simple.c1
-rw-r--r--net/sched/act_skbedit.c1
-rw-r--r--net/sched/act_skbmod.c1
-rw-r--r--net/sched/act_tunnel_key.c1
-rw-r--r--net/sched/act_vlan.c1
16 files changed, 17 insertions, 0 deletions
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 = {
413 .exit_batch = bpf_exit_net, 413 .exit_batch = bpf_exit_net,
414 .id = &bpf_net_id, 414 .id = &bpf_net_id,
415 .size = sizeof(struct tc_action_net), 415 .size = sizeof(struct tc_action_net),
416 .async = true,
416}; 417};
417 418
418static int __init bpf_init_module(void) 419static 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 = {
222 .exit_batch = connmark_exit_net, 222 .exit_batch = connmark_exit_net,
223 .id = &connmark_net_id, 223 .id = &connmark_net_id,
224 .size = sizeof(struct tc_action_net), 224 .size = sizeof(struct tc_action_net),
225 .async = true,
225}; 226};
226 227
227static int __init connmark_init_module(void) 228static 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 = {
677 .exit_batch = csum_exit_net, 677 .exit_batch = csum_exit_net,
678 .id = &csum_net_id, 678 .id = &csum_net_id,
679 .size = sizeof(struct tc_action_net), 679 .size = sizeof(struct tc_action_net),
680 .async = true,
680}; 681};
681 682
682MODULE_DESCRIPTION("Checksum updating actions"); 683MODULE_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 = {
247 .exit_batch = gact_exit_net, 247 .exit_batch = gact_exit_net,
248 .id = &gact_net_id, 248 .id = &gact_net_id,
249 .size = sizeof(struct tc_action_net), 249 .size = sizeof(struct tc_action_net),
250 .async = true,
250}; 251};
251 252
252MODULE_AUTHOR("Jamal Hadi Salim(2002-4)"); 253MODULE_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 = {
870 .exit_batch = ife_exit_net, 870 .exit_batch = ife_exit_net,
871 .id = &ife_net_id, 871 .id = &ife_net_id,
872 .size = sizeof(struct tc_action_net), 872 .size = sizeof(struct tc_action_net),
873 .async = true,
873}; 874};
874 875
875static int __init ife_init_module(void) 876static 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 = {
349 .exit_batch = ipt_exit_net, 349 .exit_batch = ipt_exit_net,
350 .id = &ipt_net_id, 350 .id = &ipt_net_id,
351 .size = sizeof(struct tc_action_net), 351 .size = sizeof(struct tc_action_net),
352 .async = true,
352}; 353};
353 354
354static int tcf_xt_walker(struct net *net, struct sk_buff *skb, 355static int tcf_xt_walker(struct net *net, struct sk_buff *skb,
@@ -399,6 +400,7 @@ static struct pernet_operations xt_net_ops = {
399 .exit_batch = xt_exit_net, 400 .exit_batch = xt_exit_net,
400 .id = &xt_net_id, 401 .id = &xt_net_id,
401 .size = sizeof(struct tc_action_net), 402 .size = sizeof(struct tc_action_net),
403 .async = true,
402}; 404};
403 405
404MODULE_AUTHOR("Jamal Hadi Salim(2002-13)"); 406MODULE_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 = {
353 .exit_batch = mirred_exit_net, 353 .exit_batch = mirred_exit_net,
354 .id = &mirred_net_id, 354 .id = &mirred_net_id,
355 .size = sizeof(struct tc_action_net), 355 .size = sizeof(struct tc_action_net),
356 .async = true,
356}; 357};
357 358
358MODULE_AUTHOR("Jamal Hadi Salim(2002)"); 359MODULE_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 = {
323 .exit_batch = nat_exit_net, 323 .exit_batch = nat_exit_net,
324 .id = &nat_net_id, 324 .id = &nat_net_id,
325 .size = sizeof(struct tc_action_net), 325 .size = sizeof(struct tc_action_net),
326 .async = true,
326}; 327};
327 328
328MODULE_DESCRIPTION("Stateless NAT actions"); 329MODULE_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 = {
465 .exit_batch = pedit_exit_net, 465 .exit_batch = pedit_exit_net,
466 .id = &pedit_net_id, 466 .id = &pedit_net_id,
467 .size = sizeof(struct tc_action_net), 467 .size = sizeof(struct tc_action_net),
468 .async = true,
468}; 469};
469 470
470MODULE_AUTHOR("Jamal Hadi Salim(2002-4)"); 471MODULE_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 = {
347 .exit_batch = police_exit_net, 347 .exit_batch = police_exit_net,
348 .id = &police_net_id, 348 .id = &police_net_id,
349 .size = sizeof(struct tc_action_net), 349 .size = sizeof(struct tc_action_net),
350 .async = true,
350}; 351};
351 352
352static int __init police_init_module(void) 353static 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 = {
248 .exit_batch = sample_exit_net, 248 .exit_batch = sample_exit_net,
249 .id = &sample_net_id, 249 .id = &sample_net_id,
250 .size = sizeof(struct tc_action_net), 250 .size = sizeof(struct tc_action_net),
251 .async = true,
251}; 252};
252 253
253static int __init sample_init_module(void) 254static 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 = {
216 .exit_batch = simp_exit_net, 216 .exit_batch = simp_exit_net,
217 .id = &simp_net_id, 217 .id = &simp_net_id,
218 .size = sizeof(struct tc_action_net), 218 .size = sizeof(struct tc_action_net),
219 .async = true,
219}; 220};
220 221
221MODULE_AUTHOR("Jamal Hadi Salim(2005)"); 222MODULE_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 = {
253 .exit_batch = skbedit_exit_net, 253 .exit_batch = skbedit_exit_net,
254 .id = &skbedit_net_id, 254 .id = &skbedit_net_id,
255 .size = sizeof(struct tc_action_net), 255 .size = sizeof(struct tc_action_net),
256 .async = true,
256}; 257};
257 258
258MODULE_AUTHOR("Alexander Duyck, <alexander.h.duyck@intel.com>"); 259MODULE_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 = {
278 .exit_batch = skbmod_exit_net, 278 .exit_batch = skbmod_exit_net,
279 .id = &skbmod_net_id, 279 .id = &skbmod_net_id,
280 .size = sizeof(struct tc_action_net), 280 .size = sizeof(struct tc_action_net),
281 .async = true,
281}; 282};
282 283
283MODULE_AUTHOR("Jamal Hadi Salim, <jhs@mojatatu.com>"); 284MODULE_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 = {
337 .exit_batch = tunnel_key_exit_net, 337 .exit_batch = tunnel_key_exit_net,
338 .id = &tunnel_key_net_id, 338 .id = &tunnel_key_net_id,
339 .size = sizeof(struct tc_action_net), 339 .size = sizeof(struct tc_action_net),
340 .async = true,
340}; 341};
341 342
342static int __init tunnel_key_init_module(void) 343static 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 = {
313 .exit_batch = vlan_exit_net, 313 .exit_batch = vlan_exit_net,
314 .id = &vlan_net_id, 314 .id = &vlan_net_id,
315 .size = sizeof(struct tc_action_net), 315 .size = sizeof(struct tc_action_net),
316 .async = true,
316}; 317};
317 318
318static int __init vlan_init_module(void) 319static int __init vlan_init_module(void)