All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 00/28] Converting pernet_operations (part #3)
@ 2018-02-26 12:59 Kirill Tkhai
  2018-02-26 12:59 ` [PATCH net-next 01/28] net: Convert /proc creating and destroying pernet_operations Kirill Tkhai
                   ` (28 more replies)
  0 siblings, 29 replies; 31+ messages in thread
From: Kirill Tkhai @ 2018-02-26 12:59 UTC (permalink / raw)
  To: davem, pablo, kadlec, fw, netdev, kvalo, davem, edumazet, jhs,
	xiyou.wangcong, jiri, mostrows, alex.aring, stefan, avagin,
	ktkhai

This patchset continues to review and to convert pernet_operations
to async. Where it is possible, they are grouped by type of actions
init/exit methods ([1/28], for example). I hope this will make
the review a little bit easier. The changes are tree-wide: in net, fs,
drivers and security.

Thanks,
Kirill
---

Kirill Tkhai (28):
      net: Convert /proc creating and destroying pernet_operations
      net: Convert hashlimit_net_ops and recent_net_ops
      net: Convert synproxy_net_ops
      net: Convert nfs_net_ops
      net: Convert simple pernet_operations
      net: Convert cma_pernet_operations
      net: Convert sysctl creating and destroying pernet_operations
      net: Convert tc_action_net_init() and tc_action_net_exit() based pernet_operations
      net: Convert bond_net_ops
      net: Convert geneve_net_ops
      net: Convert gtp_net_ops
      net: Convert ppp_net_ops
      net: Convert vxlan_net_ops
      net: Convert br_net_ops
      net: Convert ipgre_net_ops, ipgre_tap_net_ops, erspan_net_ops, vti_net_ops and ipip_net_ops
      net: Convert ip6gre_net_ops
      net: Convert ip6_tnl_net_ops
      net: Convert vti6_net_ops
      net: Convert sit_net_ops
      net: Convert cfg802154_pernet_ops
      net: Convert ipvlan_net_ops
      net: Convert brnf_net_ops
      net: Convert clusterip_net_ops
      net: Convert defrag4_net_ops
      net: Convert ila_net_ops
      net: Convert defrag6_net_ops
      net: Convert selinux_net_ops
      net: Convert smack_net_ops


 drivers/infiniband/core/cma.c             |    1 +
 drivers/net/bonding/bond_main.c           |    1 +
 drivers/net/geneve.c                      |    1 +
 drivers/net/gtp.c                         |    1 +
 drivers/net/ipvlan/ipvlan_main.c          |    1 +
 drivers/net/ppp/ppp_generic.c             |    1 +
 drivers/net/ppp/pppoe.c                   |    1 +
 drivers/net/vrf.c                         |    1 +
 drivers/net/vxlan.c                       |    1 +
 fs/lockd/svc.c                            |    1 +
 fs/nfs/inode.c                            |    1 +
 fs/nfs_common/grace.c                     |    1 +
 net/8021q/vlan.c                          |    1 +
 net/bridge/br.c                           |    1 +
 net/bridge/br_netfilter_hooks.c           |    1 +
 net/can/bcm.c                             |    1 +
 net/ieee802154/core.c                     |    1 +
 net/ipv4/ip_gre.c                         |    3 +++
 net/ipv4/ip_vti.c                         |    1 +
 net/ipv4/ipip.c                           |    1 +
 net/ipv4/netfilter/ipt_CLUSTERIP.c        |    1 +
 net/ipv4/netfilter/nf_defrag_ipv4.c       |    1 +
 net/ipv6/ila/ila_xlat.c                   |    1 +
 net/ipv6/ip6_gre.c                        |    1 +
 net/ipv6/ip6_tunnel.c                     |    1 +
 net/ipv6/ip6_vti.c                        |    1 +
 net/ipv6/netfilter/nf_defrag_ipv6_hooks.c |    1 +
 net/ipv6/sit.c                            |    1 +
 net/ipv6/xfrm6_tunnel.c                   |    1 +
 net/kcm/kcmproc.c                         |    1 +
 net/kcm/kcmsock.c                         |    1 +
 net/key/af_key.c                          |    1 +
 net/l2tp/l2tp_ppp.c                       |    1 +
 net/netfilter/ipvs/ip_vs_lblc.c           |    1 +
 net/netfilter/ipvs/ip_vs_lblcr.c          |    1 +
 net/netfilter/nf_synproxy_core.c          |    1 +
 net/netfilter/xt_hashlimit.c              |    1 +
 net/netfilter/xt_recent.c                 |    1 +
 net/phonet/pn_dev.c                       |    1 +
 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 +
 net/sched/cls_api.c                       |    1 +
 security/selinux/hooks.c                  |    1 +
 security/smack/smack_netfilter.c          |    1 +
 58 files changed, 61 insertions(+)

--
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [PATCH net-next 01/28] net: Convert /proc creating and destroying pernet_operations
  2018-02-26 12:59 [PATCH net-next 00/28] Converting pernet_operations (part #3) Kirill Tkhai
@ 2018-02-26 12:59 ` Kirill Tkhai
  2018-02-26 12:59 ` [PATCH net-next 02/28] net: Convert hashlimit_net_ops and recent_net_ops Kirill Tkhai
                   ` (27 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Kirill Tkhai @ 2018-02-26 12:59 UTC (permalink / raw)
  To: davem, pablo, kadlec, fw, netdev, kvalo, davem, edumazet, jhs,
	xiyou.wangcong, jiri, mostrows, alex.aring, stefan, avagin,
	ktkhai

These pernet_operations just create and destroy /proc entries,
and they can safely marked as async:

pppoe_net_ops
vlan_net_ops
canbcm_pernet_ops
kcm_net_ops
pfkey_net_ops
pppol2tp_net_ops
phonet_net_ops

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 drivers/net/ppp/pppoe.c |    1 +
 net/8021q/vlan.c        |    1 +
 net/can/bcm.c           |    1 +
 net/kcm/kcmproc.c       |    1 +
 net/key/af_key.c        |    1 +
 net/l2tp/l2tp_ppp.c     |    1 +
 net/phonet/pn_dev.c     |    1 +
 7 files changed, 7 insertions(+)

diff --git a/drivers/net/ppp/pppoe.c b/drivers/net/ppp/pppoe.c
index bd89d1c559ce..c10e6181a2f0 100644
--- a/drivers/net/ppp/pppoe.c
+++ b/drivers/net/ppp/pppoe.c
@@ -1161,6 +1161,7 @@ static struct pernet_operations pppoe_net_ops = {
 	.exit = pppoe_exit_net,
 	.id   = &pppoe_net_id,
 	.size = sizeof(struct pppoe_net),
+	.async = true,
 };
 
 static int __init pppoe_init(void)
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index bad01b14a4ad..bd0ed39f65fb 100644
--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -729,6 +729,7 @@ static struct pernet_operations vlan_net_ops = {
 	.exit = vlan_exit_net,
 	.id   = &vlan_net_id,
 	.size = sizeof(struct vlan_net),
+	.async = true,
 };
 
 static int __init vlan_proto_init(void)
diff --git a/net/can/bcm.c b/net/can/bcm.c
index ac5e5e34fee3..26730d39e048 100644
--- a/net/can/bcm.c
+++ b/net/can/bcm.c
@@ -1717,6 +1717,7 @@ static void canbcm_pernet_exit(struct net *net)
 static struct pernet_operations canbcm_pernet_ops __read_mostly = {
 	.init = canbcm_pernet_init,
 	.exit = canbcm_pernet_exit,
+	.async = true,
 };
 
 static int __init bcm_module_init(void)
diff --git a/net/kcm/kcmproc.c b/net/kcm/kcmproc.c
index 9d5649e4e8b7..2c1c8b3e4452 100644
--- a/net/kcm/kcmproc.c
+++ b/net/kcm/kcmproc.c
@@ -433,6 +433,7 @@ static void kcm_proc_exit_net(struct net *net)
 static struct pernet_operations kcm_net_ops = {
 	.init = kcm_proc_init_net,
 	.exit = kcm_proc_exit_net,
+	.async = true,
 };
 
 int __init kcm_proc_init(void)
diff --git a/net/key/af_key.c b/net/key/af_key.c
index 7e2e7188e7f4..3ac08ab26207 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -3863,6 +3863,7 @@ static struct pernet_operations pfkey_net_ops = {
 	.exit = pfkey_net_exit,
 	.id   = &pfkey_net_id,
 	.size = sizeof(struct netns_pfkey),
+	.async = true,
 };
 
 static void __exit ipsec_pfkey_exit(void)
diff --git a/net/l2tp/l2tp_ppp.c b/net/l2tp/l2tp_ppp.c
index 99a03c72db4f..0c4f49a6a0cb 100644
--- a/net/l2tp/l2tp_ppp.c
+++ b/net/l2tp/l2tp_ppp.c
@@ -1770,6 +1770,7 @@ static struct pernet_operations pppol2tp_net_ops = {
 	.init = pppol2tp_init_net,
 	.exit = pppol2tp_exit_net,
 	.id   = &pppol2tp_net_id,
+	.async = true,
 };
 
 /*****************************************************************************
diff --git a/net/phonet/pn_dev.c b/net/phonet/pn_dev.c
index 77787512fc32..9454e8393793 100644
--- a/net/phonet/pn_dev.c
+++ b/net/phonet/pn_dev.c
@@ -342,6 +342,7 @@ static struct pernet_operations phonet_net_ops = {
 	.exit = phonet_exit_net,
 	.id   = &phonet_net_id,
 	.size = sizeof(struct phonet_net),
+	.async = true,
 };
 
 /* Initialize Phonet devices list */

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH net-next 02/28] net: Convert hashlimit_net_ops and recent_net_ops
  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 ` Kirill Tkhai
  2018-02-26 12:59 ` [PATCH net-next 03/28] net: Convert synproxy_net_ops Kirill Tkhai
                   ` (26 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Kirill Tkhai @ 2018-02-26 12:59 UTC (permalink / raw)
  To: davem, pablo, kadlec, fw, netdev, kvalo, davem, edumazet, jhs,
	xiyou.wangcong, jiri, mostrows, alex.aring, stefan, avagin,
	ktkhai

These pernet_operations just create and destroy /proc entries.
Also, new /proc entries also may come after new nf rules
are added, but this is not possible, when net isn't alive.
So, they are safe to be marked as async.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 net/netfilter/xt_hashlimit.c |    1 +
 net/netfilter/xt_recent.c    |    1 +
 2 files changed, 2 insertions(+)

diff --git a/net/netfilter/xt_hashlimit.c b/net/netfilter/xt_hashlimit.c
index ca6847403ca2..53889a7bf91d 100644
--- a/net/netfilter/xt_hashlimit.c
+++ b/net/netfilter/xt_hashlimit.c
@@ -1343,6 +1343,7 @@ static struct pernet_operations hashlimit_net_ops = {
 	.exit	= hashlimit_net_exit,
 	.id	= &hashlimit_net_id,
 	.size	= sizeof(struct hashlimit_net),
+	.async	= true,
 };
 
 static int __init hashlimit_mt_init(void)
diff --git a/net/netfilter/xt_recent.c b/net/netfilter/xt_recent.c
index 245fa350a7a8..d25cede62cb1 100644
--- a/net/netfilter/xt_recent.c
+++ b/net/netfilter/xt_recent.c
@@ -689,6 +689,7 @@ static struct pernet_operations recent_net_ops = {
 	.exit	= recent_net_exit,
 	.id	= &recent_net_id,
 	.size	= sizeof(struct recent_net),
+	.async	= true,
 };
 
 static struct xt_match recent_mt_reg[] __read_mostly = {

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH net-next 03/28] net: Convert synproxy_net_ops
  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 ` Kirill Tkhai
  2018-02-26 12:59 ` [PATCH net-next 04/28] net: Convert nfs_net_ops Kirill Tkhai
                   ` (25 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Kirill Tkhai @ 2018-02-26 12:59 UTC (permalink / raw)
  To: davem, pablo, kadlec, fw, netdev, kvalo, davem, edumazet, jhs,
	xiyou.wangcong, jiri, mostrows, alex.aring, stefan, avagin,
	ktkhai

These pernet_operations create and destroy /proc entries
and allocate extents to template ct, which depend on global
nf_ct_ext_types[] array. So, we are able to mark them async.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 net/netfilter/nf_synproxy_core.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/net/netfilter/nf_synproxy_core.c b/net/netfilter/nf_synproxy_core.c
index 92139a087260..64b875e452ca 100644
--- a/net/netfilter/nf_synproxy_core.c
+++ b/net/netfilter/nf_synproxy_core.c
@@ -398,6 +398,7 @@ static struct pernet_operations synproxy_net_ops = {
 	.exit		= synproxy_net_exit,
 	.id		= &synproxy_net_id,
 	.size		= sizeof(struct synproxy_net),
+	.async		= true,
 };
 
 static int __init synproxy_core_init(void)

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH net-next 04/28] net: Convert nfs_net_ops
  2018-02-26 12:59 [PATCH net-next 00/28] Converting pernet_operations (part #3) Kirill Tkhai
                   ` (2 preceding siblings ...)
  2018-02-26 12:59 ` [PATCH net-next 03/28] net: Convert synproxy_net_ops Kirill Tkhai
@ 2018-02-26 12:59 ` Kirill Tkhai
  2018-02-26 12:59 ` [PATCH net-next 05/28] net: Convert simple pernet_operations Kirill Tkhai
                   ` (24 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Kirill Tkhai @ 2018-02-26 12:59 UTC (permalink / raw)
  To: davem, pablo, kadlec, fw, netdev, kvalo, davem, edumazet, jhs,
	xiyou.wangcong, jiri, mostrows, alex.aring, stefan, avagin,
	ktkhai

These pernet_operations just create and destroy /proc entries
and net_generic()->cb_ident_idr IDR. So, we are able to mark
them async.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 fs/nfs/inode.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 7d893543cf3b..6c3083c992e5 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -2122,6 +2122,7 @@ static struct pernet_operations nfs_net_ops = {
 	.exit = nfs_net_exit,
 	.id   = &nfs_net_id,
 	.size = sizeof(struct nfs_net),
+	.async = true,
 };
 
 /*

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH net-next 05/28] net: Convert simple pernet_operations
  2018-02-26 12:59 [PATCH net-next 00/28] Converting pernet_operations (part #3) Kirill Tkhai
                   ` (3 preceding siblings ...)
  2018-02-26 12:59 ` [PATCH net-next 04/28] net: Convert nfs_net_ops Kirill Tkhai
@ 2018-02-26 12:59 ` Kirill Tkhai
  2018-02-26 13:00 ` [PATCH net-next 06/28] net: Convert cma_pernet_operations Kirill Tkhai
                   ` (23 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Kirill Tkhai @ 2018-02-26 12:59 UTC (permalink / raw)
  To: davem, pablo, kadlec, fw, netdev, kvalo, davem, edumazet, jhs,
	xiyou.wangcong, jiri, mostrows, alex.aring, stefan, avagin,
	ktkhai

These pernet_operations make pretty simple actions
like variable initialization on init, debug checks
on exit, and so on, and they obviously are able
to be executed in parallel with any others:

vrf_net_ops
lockd_net_ops
grace_net_ops
xfrm6_tunnel_net_ops
kcm_net_ops
tcf_net_ops

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 drivers/net/vrf.c       |    1 +
 fs/lockd/svc.c          |    1 +
 fs/nfs_common/grace.c   |    1 +
 net/ipv6/xfrm6_tunnel.c |    1 +
 net/kcm/kcmsock.c       |    1 +
 net/sched/cls_api.c     |    1 +
 6 files changed, 6 insertions(+)

diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c
index 951a4b42cb29..71b174e404e5 100644
--- a/drivers/net/vrf.c
+++ b/drivers/net/vrf.c
@@ -1431,6 +1431,7 @@ static struct pernet_operations vrf_net_ops __net_initdata = {
 	.init = vrf_netns_init,
 	.id   = &vrf_net_id,
 	.size = sizeof(bool),
+	.async = true,
 };
 
 static int __init vrf_init_module(void)
diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c
index 9c36d614bf89..2dee4e03ff1c 100644
--- a/fs/lockd/svc.c
+++ b/fs/lockd/svc.c
@@ -709,6 +709,7 @@ static struct pernet_operations lockd_net_ops = {
 	.exit = lockd_exit_net,
 	.id = &lockd_net_id,
 	.size = sizeof(struct lockd_net),
+	.async = true,
 };
 
 
diff --git a/fs/nfs_common/grace.c b/fs/nfs_common/grace.c
index 5be08f02a76b..8c743a405df6 100644
--- a/fs/nfs_common/grace.c
+++ b/fs/nfs_common/grace.c
@@ -118,6 +118,7 @@ static struct pernet_operations grace_net_ops = {
 	.exit = grace_exit_net,
 	.id   = &grace_net_id,
 	.size = sizeof(struct list_head),
+	.async = true,
 };
 
 static int __init
diff --git a/net/ipv6/xfrm6_tunnel.c b/net/ipv6/xfrm6_tunnel.c
index f85f0d7480ac..a9673619e0e9 100644
--- a/net/ipv6/xfrm6_tunnel.c
+++ b/net/ipv6/xfrm6_tunnel.c
@@ -353,6 +353,7 @@ static struct pernet_operations xfrm6_tunnel_net_ops = {
 	.exit	= xfrm6_tunnel_net_exit,
 	.id	= &xfrm6_tunnel_net_id,
 	.size	= sizeof(struct xfrm6_tunnel_net),
+	.async	= true,
 };
 
 static int __init xfrm6_tunnel_init(void)
diff --git a/net/kcm/kcmsock.c b/net/kcm/kcmsock.c
index 435594648dac..a6cd0712e063 100644
--- a/net/kcm/kcmsock.c
+++ b/net/kcm/kcmsock.c
@@ -2015,6 +2015,7 @@ static struct pernet_operations kcm_net_ops = {
 	.exit = kcm_exit_net,
 	.id   = &kcm_net_id,
 	.size = sizeof(struct kcm_net),
+	.async = true,
 };
 
 static int __init kcm_init(void)
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index 3e14d38e5d42..f0763234105a 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -1613,6 +1613,7 @@ static struct pernet_operations tcf_net_ops = {
 	.exit = tcf_net_exit,
 	.id   = &tcf_net_id,
 	.size = sizeof(struct tcf_net),
+	.async = true,
 };
 
 static int __init tc_filter_init(void)

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH net-next 06/28] net: Convert cma_pernet_operations
  2018-02-26 12:59 [PATCH net-next 00/28] Converting pernet_operations (part #3) Kirill Tkhai
                   ` (4 preceding siblings ...)
  2018-02-26 12:59 ` [PATCH net-next 05/28] net: Convert simple pernet_operations Kirill Tkhai
@ 2018-02-26 13:00 ` Kirill Tkhai
  2018-02-26 13:00 ` [PATCH net-next 07/28] net: Convert sysctl creating and destroying pernet_operations Kirill Tkhai
                   ` (22 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Kirill Tkhai @ 2018-02-26 13:00 UTC (permalink / raw)
  To: davem, pablo, kadlec, fw, netdev, kvalo, davem, edumazet, jhs,
	xiyou.wangcong, jiri, mostrows, alex.aring, stefan, avagin,
	ktkhai

These pernet_operations just create and destroy IDR.
So, we mark them as async.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 drivers/infiniband/core/cma.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index e66963ca58bd..3ae32d1ddd27 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -4549,6 +4549,7 @@ static struct pernet_operations cma_pernet_operations = {
 	.exit = cma_exit_net,
 	.id = &cma_pernet_id,
 	.size = sizeof(struct cma_pernet),
+	.async = true,
 };
 
 static int __init cma_init(void)

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH net-next 07/28] net: Convert sysctl creating and destroying pernet_operations
  2018-02-26 12:59 [PATCH net-next 00/28] Converting pernet_operations (part #3) Kirill Tkhai
                   ` (5 preceding siblings ...)
  2018-02-26 13:00 ` [PATCH net-next 06/28] net: Convert cma_pernet_operations Kirill Tkhai
@ 2018-02-26 13:00 ` Kirill Tkhai
  2018-02-26 13:00 ` [PATCH net-next 08/28] net: Convert tc_action_net_init() and tc_action_net_exit() based pernet_operations Kirill Tkhai
                   ` (21 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Kirill Tkhai @ 2018-02-26 13:00 UTC (permalink / raw)
  To: davem, pablo, kadlec, fw, netdev, kvalo, davem, edumazet, jhs,
	xiyou.wangcong, jiri, mostrows, alex.aring, stefan, avagin,
	ktkhai

These pernet_operations create and destroy sysctl tables,
and they are able to be executed in parallel with any others:

ip_vs_lblc_ops
ip_vs_lblcr_ops

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 net/netfilter/ipvs/ip_vs_lblc.c  |    1 +
 net/netfilter/ipvs/ip_vs_lblcr.c |    1 +
 2 files changed, 2 insertions(+)

diff --git a/net/netfilter/ipvs/ip_vs_lblc.c b/net/netfilter/ipvs/ip_vs_lblc.c
index d625179de485..6a340c94c4b8 100644
--- a/net/netfilter/ipvs/ip_vs_lblc.c
+++ b/net/netfilter/ipvs/ip_vs_lblc.c
@@ -604,6 +604,7 @@ static void __net_exit __ip_vs_lblc_exit(struct net *net) { }
 static struct pernet_operations ip_vs_lblc_ops = {
 	.init = __ip_vs_lblc_init,
 	.exit = __ip_vs_lblc_exit,
+	.async = true,
 };
 
 static int __init ip_vs_lblc_init(void)
diff --git a/net/netfilter/ipvs/ip_vs_lblcr.c b/net/netfilter/ipvs/ip_vs_lblcr.c
index 84c57b62a588..0627881128da 100644
--- a/net/netfilter/ipvs/ip_vs_lblcr.c
+++ b/net/netfilter/ipvs/ip_vs_lblcr.c
@@ -789,6 +789,7 @@ static void __net_exit __ip_vs_lblcr_exit(struct net *net) { }
 static struct pernet_operations ip_vs_lblcr_ops = {
 	.init = __ip_vs_lblcr_init,
 	.exit = __ip_vs_lblcr_exit,
+	.async = true,
 };
 
 static int __init ip_vs_lblcr_init(void)

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH net-next 08/28] net: Convert tc_action_net_init() and tc_action_net_exit() based pernet_operations
  2018-02-26 12:59 [PATCH net-next 00/28] Converting pernet_operations (part #3) Kirill Tkhai
                   ` (6 preceding siblings ...)
  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
  2018-02-26 13:00 ` [PATCH net-next 09/28] net: Convert bond_net_ops Kirill Tkhai
                   ` (20 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Kirill Tkhai @ 2018-02-26 13:00 UTC (permalink / raw)
  To: davem, pablo, kadlec, fw, netdev, kvalo, davem, edumazet, jhs,
	xiyou.wangcong, jiri, mostrows, alex.aring, stefan, avagin,
	ktkhai

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)

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH net-next 09/28] net: Convert bond_net_ops
  2018-02-26 12:59 [PATCH net-next 00/28] Converting pernet_operations (part #3) Kirill Tkhai
                   ` (7 preceding siblings ...)
  2018-02-26 13:00 ` [PATCH net-next 08/28] net: Convert tc_action_net_init() and tc_action_net_exit() based pernet_operations Kirill Tkhai
@ 2018-02-26 13:00 ` Kirill Tkhai
  2018-02-26 13:00 ` [PATCH net-next 10/28] net: Convert geneve_net_ops Kirill Tkhai
                   ` (19 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Kirill Tkhai @ 2018-02-26 13:00 UTC (permalink / raw)
  To: davem, pablo, kadlec, fw, netdev, kvalo, davem, edumazet, jhs,
	xiyou.wangcong, jiri, mostrows, alex.aring, stefan, avagin,
	ktkhai

These pernet_operations populate/depopulate /proc and /sys
entries. Exit method unregisters all net bond devices, and
it seems another pernet_operations are not interested in
foreign net bond list. So, it's possible to mark them async.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 drivers/net/bonding/bond_main.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index c669554d70bb..4c19d23dd282 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -4791,6 +4791,7 @@ static struct pernet_operations bond_net_ops = {
 	.exit = bond_net_exit,
 	.id   = &bond_net_id,
 	.size = sizeof(struct bond_net),
+	.async = true,
 };
 
 static int __init bonding_init(void)

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH net-next 10/28] net: Convert geneve_net_ops
  2018-02-26 12:59 [PATCH net-next 00/28] Converting pernet_operations (part #3) Kirill Tkhai
                   ` (8 preceding siblings ...)
  2018-02-26 13:00 ` [PATCH net-next 09/28] net: Convert bond_net_ops Kirill Tkhai
@ 2018-02-26 13:00 ` Kirill Tkhai
  2018-02-26 13:01 ` [PATCH net-next 11/28] net: Convert gtp_net_ops Kirill Tkhai
                   ` (18 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Kirill Tkhai @ 2018-02-26 13:00 UTC (permalink / raw)
  To: davem, pablo, kadlec, fw, netdev, kvalo, davem, edumazet, jhs,
	xiyou.wangcong, jiri, mostrows, alex.aring, stefan, avagin,
	ktkhai

These pernet_operations are similar to bond_net_ops. Exit method
unregisters all net geneve devices, and it looks like another
pernet_operations are not interested in foreign net geneve list.
So, it's possible to mark them async.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 drivers/net/geneve.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c
index b919e89a9b93..516dd59249d7 100644
--- a/drivers/net/geneve.c
+++ b/drivers/net/geneve.c
@@ -1694,6 +1694,7 @@ static struct pernet_operations geneve_net_ops = {
 	.exit_batch = geneve_exit_batch_net,
 	.id   = &geneve_net_id,
 	.size = sizeof(struct geneve_net),
+	.async = true,
 };
 
 static int __init geneve_init_module(void)

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH net-next 11/28] net: Convert gtp_net_ops
  2018-02-26 12:59 [PATCH net-next 00/28] Converting pernet_operations (part #3) Kirill Tkhai
                   ` (9 preceding siblings ...)
  2018-02-26 13:00 ` [PATCH net-next 10/28] net: Convert geneve_net_ops Kirill Tkhai
@ 2018-02-26 13:01 ` Kirill Tkhai
  2018-02-26 13:01 ` [PATCH net-next 12/28] net: Convert ppp_net_ops Kirill Tkhai
                   ` (17 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Kirill Tkhai @ 2018-02-26 13:01 UTC (permalink / raw)
  To: davem, pablo, kadlec, fw, netdev, kvalo, davem, edumazet, jhs,
	xiyou.wangcong, jiri, mostrows, alex.aring, stefan, avagin,
	ktkhai

These pernet_operations are similar to bond_net_ops. Exit method
unregisters all net gtp devices, and it looks like another
pernet_operations are not interested in foreign net gtp list.
So, it's possible to mark them async.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 drivers/net/gtp.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c
index f38e32a7ec9c..127edd23018f 100644
--- a/drivers/net/gtp.c
+++ b/drivers/net/gtp.c
@@ -1325,6 +1325,7 @@ static struct pernet_operations gtp_net_ops = {
 	.exit	= gtp_net_exit,
 	.id	= &gtp_net_id,
 	.size	= sizeof(struct gtp_net),
+	.async	= true,
 };
 
 static int __init gtp_init(void)

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH net-next 12/28] net: Convert ppp_net_ops
  2018-02-26 12:59 [PATCH net-next 00/28] Converting pernet_operations (part #3) Kirill Tkhai
                   ` (10 preceding siblings ...)
  2018-02-26 13:01 ` [PATCH net-next 11/28] net: Convert gtp_net_ops Kirill Tkhai
@ 2018-02-26 13:01 ` Kirill Tkhai
  2018-02-26 13:01 ` [PATCH net-next 13/28] net: Convert vxlan_net_ops Kirill Tkhai
                   ` (16 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Kirill Tkhai @ 2018-02-26 13:01 UTC (permalink / raw)
  To: davem, pablo, kadlec, fw, netdev, kvalo, davem, edumazet, jhs,
	xiyou.wangcong, jiri, mostrows, alex.aring, stefan, avagin,
	ktkhai

These pernet_operations are similar to bond_net_ops. Exit method
unregisters all net ppp devices, and it looks like another
pernet_operations are not interested in foreign net ppp list.
So, it's possible to mark them async.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 drivers/net/ppp/ppp_generic.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c
index 255a5def56e9..a393c1dff7dc 100644
--- a/drivers/net/ppp/ppp_generic.c
+++ b/drivers/net/ppp/ppp_generic.c
@@ -971,6 +971,7 @@ static struct pernet_operations ppp_net_ops = {
 	.exit = ppp_exit_net,
 	.id   = &ppp_net_id,
 	.size = sizeof(struct ppp_net),
+	.async = true,
 };
 
 static int ppp_unit_register(struct ppp *ppp, int unit, bool ifname_is_set)

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH net-next 13/28] net: Convert vxlan_net_ops
  2018-02-26 12:59 [PATCH net-next 00/28] Converting pernet_operations (part #3) Kirill Tkhai
                   ` (11 preceding siblings ...)
  2018-02-26 13:01 ` [PATCH net-next 12/28] net: Convert ppp_net_ops Kirill Tkhai
@ 2018-02-26 13:01 ` Kirill Tkhai
  2018-02-26 13:01 ` [PATCH net-next 14/28] net: Convert br_net_ops Kirill Tkhai
                   ` (15 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Kirill Tkhai @ 2018-02-26 13:01 UTC (permalink / raw)
  To: davem, pablo, kadlec, fw, netdev, kvalo, davem, edumazet, jhs,
	xiyou.wangcong, jiri, mostrows, alex.aring, stefan, avagin,
	ktkhai

These pernet_operations are similar to bond_net_ops. Exit method
unregisters all net vlanx devices, and it looks like another
pernet_operations are not interested in foreign net vlanx list.
So, it's possible to mark them async.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 drivers/net/vxlan.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index fab7a4db249e..aa5f034d6ad1 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -3752,6 +3752,7 @@ static struct pernet_operations vxlan_net_ops = {
 	.exit_batch = vxlan_exit_batch_net,
 	.id   = &vxlan_net_id,
 	.size = sizeof(struct vxlan_net),
+	.async = true,
 };
 
 static int __init vxlan_init_module(void)

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH net-next 14/28] net: Convert br_net_ops
  2018-02-26 12:59 [PATCH net-next 00/28] Converting pernet_operations (part #3) Kirill Tkhai
                   ` (12 preceding siblings ...)
  2018-02-26 13:01 ` [PATCH net-next 13/28] net: Convert vxlan_net_ops Kirill Tkhai
@ 2018-02-26 13:01 ` 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
                   ` (14 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Kirill Tkhai @ 2018-02-26 13:01 UTC (permalink / raw)
  To: davem, pablo, kadlec, fw, netdev, kvalo, davem, edumazet, jhs,
	xiyou.wangcong, jiri, mostrows, alex.aring, stefan, avagin,
	ktkhai

These pernet_operations are similar to bond_net_ops. Exit method
unregisters all net bridge devices, and it looks like another
pernet_operations are not interested in foreign net bridge list.
So, it's possible to mark them async.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 net/bridge/br.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/net/bridge/br.c b/net/bridge/br.c
index 6bf06e756df2..7770481a6506 100644
--- a/net/bridge/br.c
+++ b/net/bridge/br.c
@@ -188,6 +188,7 @@ static void __net_exit br_net_exit(struct net *net)
 
 static struct pernet_operations br_net_ops = {
 	.exit	= br_net_exit,
+	.async	= true,
 };
 
 static const struct stp_proto br_stp_proto = {

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH net-next 15/28] net: Convert ipgre_net_ops, ipgre_tap_net_ops, erspan_net_ops, vti_net_ops and ipip_net_ops
  2018-02-26 12:59 [PATCH net-next 00/28] Converting pernet_operations (part #3) Kirill Tkhai
                   ` (13 preceding siblings ...)
  2018-02-26 13:01 ` [PATCH net-next 14/28] net: Convert br_net_ops Kirill Tkhai
@ 2018-02-26 13:01 ` Kirill Tkhai
  2018-02-26 13:02 ` [PATCH net-next 16/28] net: Convert ip6gre_net_ops Kirill Tkhai
                   ` (13 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Kirill Tkhai @ 2018-02-26 13:01 UTC (permalink / raw)
  To: davem, pablo, kadlec, fw, netdev, kvalo, davem, edumazet, jhs,
	xiyou.wangcong, jiri, mostrows, alex.aring, stefan, avagin,
	ktkhai

These pernet_operations are similar to bond_net_ops. Exit methods
unregisters all net ipgre/ipgre_tap/erspan/vti/ipip devices, and it
looks like another pernet_operations are not interested in foreign
net ipgre/ipgre_tap/erspan/vti/ipip list. Init method also does not
intersect with something pernet-specific. So, it's possible
to mark them async.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 net/ipv4/ip_gre.c |    3 +++
 net/ipv4/ip_vti.c |    1 +
 net/ipv4/ipip.c   |    1 +
 3 files changed, 5 insertions(+)

diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index 45d97e9b2759..e496afa47709 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -1044,6 +1044,7 @@ static struct pernet_operations ipgre_net_ops = {
 	.exit_batch = ipgre_exit_batch_net,
 	.id   = &ipgre_net_id,
 	.size = sizeof(struct ip_tunnel_net),
+	.async = true,
 };
 
 static int ipgre_tunnel_validate(struct nlattr *tb[], struct nlattr *data[],
@@ -1623,6 +1624,7 @@ static struct pernet_operations ipgre_tap_net_ops = {
 	.exit_batch = ipgre_tap_exit_batch_net,
 	.id   = &gre_tap_net_id,
 	.size = sizeof(struct ip_tunnel_net),
+	.async = true,
 };
 
 static int __net_init erspan_init_net(struct net *net)
@@ -1641,6 +1643,7 @@ static struct pernet_operations erspan_net_ops = {
 	.exit_batch = erspan_exit_batch_net,
 	.id   = &erspan_net_id,
 	.size = sizeof(struct ip_tunnel_net),
+	.async = true,
 };
 
 static int __init ipgre_init(void)
diff --git a/net/ipv4/ip_vti.c b/net/ipv4/ip_vti.c
index 51b1669334fe..b10bf563afd9 100644
--- a/net/ipv4/ip_vti.c
+++ b/net/ipv4/ip_vti.c
@@ -454,6 +454,7 @@ static struct pernet_operations vti_net_ops = {
 	.exit_batch = vti_exit_batch_net,
 	.id   = &vti_net_id,
 	.size = sizeof(struct ip_tunnel_net),
+	.async = true,
 };
 
 static int vti_tunnel_validate(struct nlattr *tb[], struct nlattr *data[],
diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c
index c891235b4966..9c5a4d164f09 100644
--- a/net/ipv4/ipip.c
+++ b/net/ipv4/ipip.c
@@ -669,6 +669,7 @@ static struct pernet_operations ipip_net_ops = {
 	.exit_batch = ipip_exit_batch_net,
 	.id   = &ipip_net_id,
 	.size = sizeof(struct ip_tunnel_net),
+	.async = true,
 };
 
 static int __init ipip_init(void)

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH net-next 16/28] net: Convert ip6gre_net_ops
  2018-02-26 12:59 [PATCH net-next 00/28] Converting pernet_operations (part #3) Kirill Tkhai
                   ` (14 preceding siblings ...)
  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 ` Kirill Tkhai
  2018-02-26 13:02 ` [PATCH net-next 17/28] net: Convert ip6_tnl_net_ops Kirill Tkhai
                   ` (12 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Kirill Tkhai @ 2018-02-26 13:02 UTC (permalink / raw)
  To: davem, pablo, kadlec, fw, netdev, kvalo, davem, edumazet, jhs,
	xiyou.wangcong, jiri, mostrows, alex.aring, stefan, avagin,
	ktkhai

These pernet_operations are similar to bond_net_ops. Exit method
unregisters all net ip6gre devices, and it looks like another
pernet_operations are not interested in foreign net ip6gre list
or net_generic()->tunnels_wc. Init method registers net device.
So, it's possible to mark them async.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 net/ipv6/ip6_gre.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
index 3c353125546d..3026662a6413 100644
--- a/net/ipv6/ip6_gre.c
+++ b/net/ipv6/ip6_gre.c
@@ -1517,6 +1517,7 @@ static struct pernet_operations ip6gre_net_ops = {
 	.exit_batch = ip6gre_exit_batch_net,
 	.id   = &ip6gre_net_id,
 	.size = sizeof(struct ip6gre_net),
+	.async = true,
 };
 
 static int ip6gre_tunnel_validate(struct nlattr *tb[], struct nlattr *data[],

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH net-next 17/28] net: Convert ip6_tnl_net_ops
  2018-02-26 12:59 [PATCH net-next 00/28] Converting pernet_operations (part #3) Kirill Tkhai
                   ` (15 preceding siblings ...)
  2018-02-26 13:02 ` [PATCH net-next 16/28] net: Convert ip6gre_net_ops Kirill Tkhai
@ 2018-02-26 13:02 ` Kirill Tkhai
  2018-02-26 13:02 ` [PATCH net-next 18/28] net: Convert vti6_net_ops Kirill Tkhai
                   ` (11 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Kirill Tkhai @ 2018-02-26 13:02 UTC (permalink / raw)
  To: davem, pablo, kadlec, fw, netdev, kvalo, davem, edumazet, jhs,
	xiyou.wangcong, jiri, mostrows, alex.aring, stefan, avagin,
	ktkhai

These pernet_operations are similar to ip6gre_net_ops. Exit method
unregisters all net ip6_tnl tunnels, and it looks like another
pernet_operations are not interested in foreign net tunnels list.
So, it's possible to mark them async.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 net/ipv6/ip6_tunnel.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
index 4b15fe928278..869e2e6750f7 100644
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -2250,6 +2250,7 @@ static struct pernet_operations ip6_tnl_net_ops = {
 	.exit_batch = ip6_tnl_exit_batch_net,
 	.id   = &ip6_tnl_net_id,
 	.size = sizeof(struct ip6_tnl_net),
+	.async = true,
 };
 
 /**

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH net-next 18/28] net: Convert vti6_net_ops
  2018-02-26 12:59 [PATCH net-next 00/28] Converting pernet_operations (part #3) Kirill Tkhai
                   ` (16 preceding siblings ...)
  2018-02-26 13:02 ` [PATCH net-next 17/28] net: Convert ip6_tnl_net_ops Kirill Tkhai
@ 2018-02-26 13:02 ` Kirill Tkhai
  2018-02-26 13:02 ` [PATCH net-next 19/28] net: Convert sit_net_ops Kirill Tkhai
                   ` (10 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Kirill Tkhai @ 2018-02-26 13:02 UTC (permalink / raw)
  To: davem, pablo, kadlec, fw, netdev, kvalo, davem, edumazet, jhs,
	xiyou.wangcong, jiri, mostrows, alex.aring, stefan, avagin,
	ktkhai

These pernet_operations are similar to ip6_tnl_net_ops. Exit method
unregisters all net vti6 tunnels, and it looks like another
pernet_operations are not interested in foreign net vti6 list.
Init method registers netdevice. So, it's possible to mark them async.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 net/ipv6/ip6_vti.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/net/ipv6/ip6_vti.c b/net/ipv6/ip6_vti.c
index fa3ae1cb50d3..c617ea17faa8 100644
--- a/net/ipv6/ip6_vti.c
+++ b/net/ipv6/ip6_vti.c
@@ -1148,6 +1148,7 @@ static struct pernet_operations vti6_net_ops = {
 	.exit_batch = vti6_exit_batch_net,
 	.id   = &vti6_net_id,
 	.size = sizeof(struct vti6_net),
+	.async = true,
 };
 
 static struct xfrm6_protocol vti_esp6_protocol __read_mostly = {

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH net-next 19/28] net: Convert sit_net_ops
  2018-02-26 12:59 [PATCH net-next 00/28] Converting pernet_operations (part #3) Kirill Tkhai
                   ` (17 preceding siblings ...)
  2018-02-26 13:02 ` [PATCH net-next 18/28] net: Convert vti6_net_ops Kirill Tkhai
@ 2018-02-26 13:02 ` Kirill Tkhai
  2018-02-26 13:02 ` [PATCH net-next 20/28] net: Convert cfg802154_pernet_ops Kirill Tkhai
                   ` (9 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Kirill Tkhai @ 2018-02-26 13:02 UTC (permalink / raw)
  To: davem, pablo, kadlec, fw, netdev, kvalo, davem, edumazet, jhs,
	xiyou.wangcong, jiri, mostrows, alex.aring, stefan, avagin,
	ktkhai

These pernet_operations are similar to ip6_tnl_net_ops. Exit method
unregisters all net sit devices, and it looks like another
pernet_operations are not interested in foreign net sit list.
Init method registers netdevice. So, it's possible to mark them async.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 net/ipv6/sit.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index 3873d3877135..5472eff6ec72 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -1878,6 +1878,7 @@ static struct pernet_operations sit_net_ops = {
 	.exit_batch = sit_exit_batch_net,
 	.id   = &sit_net_id,
 	.size = sizeof(struct sit_net),
+	.async = true,
 };
 
 static void __exit sit_cleanup(void)

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH net-next 20/28] net: Convert cfg802154_pernet_ops
  2018-02-26 12:59 [PATCH net-next 00/28] Converting pernet_operations (part #3) Kirill Tkhai
                   ` (18 preceding siblings ...)
  2018-02-26 13:02 ` [PATCH net-next 19/28] net: Convert sit_net_ops Kirill Tkhai
@ 2018-02-26 13:02 ` 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
                   ` (8 subsequent siblings)
  28 siblings, 1 reply; 31+ messages in thread
From: Kirill Tkhai @ 2018-02-26 13:02 UTC (permalink / raw)
  To: davem, pablo, kadlec, fw, netdev, kvalo, davem, edumazet, jhs,
	xiyou.wangcong, jiri, mostrows, alex.aring, stefan, avagin,
	ktkhai

These pernet_operations have only exit method, which
moves devices from cfg802154_rdev_list to init_net.
This may occur in any time from nl802154_wpan_phy_netns(),
so we are nice with rtnl_lock() synchronization.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 net/ieee802154/core.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/net/ieee802154/core.c b/net/ieee802154/core.c
index cb7176cd4cd6..9104943c15ba 100644
--- a/net/ieee802154/core.c
+++ b/net/ieee802154/core.c
@@ -345,6 +345,7 @@ static void __net_exit cfg802154_pernet_exit(struct net *net)
 
 static struct pernet_operations cfg802154_pernet_ops = {
 	.exit = cfg802154_pernet_exit,
+	.async = true,
 };
 
 static int __init wpan_phy_class_init(void)

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH net-next 21/28] net: Convert ipvlan_net_ops
  2018-02-26 12:59 [PATCH net-next 00/28] Converting pernet_operations (part #3) Kirill Tkhai
                   ` (19 preceding siblings ...)
  2018-02-26 13:02 ` [PATCH net-next 20/28] net: Convert cfg802154_pernet_ops Kirill Tkhai
@ 2018-02-26 13:02 ` Kirill Tkhai
  2018-02-26 13:02 ` [PATCH net-next 22/28] net: Convert brnf_net_ops Kirill Tkhai
                   ` (7 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Kirill Tkhai @ 2018-02-26 13:02 UTC (permalink / raw)
  To: davem, pablo, kadlec, fw, netdev, kvalo, davem, edumazet, jhs,
	xiyou.wangcong, jiri, mostrows, alex.aring, stefan, avagin,
	ktkhai

These pernet_operations unregister ipvlan net hooks.
nf_unregister_net_hooks() removes hooks one-by-one,
and then frees the memory via rcu. This looks similar
to that happens, when a new hooks is added: allocation
of bigger memory region, copy of old content, and rcu
freeing the old memory. So, all of net code should be
well with this behavior. Also at the time of hook
unregistering, there are no packets, and foreign net
pernet_operations are not interested in others hooks.
So, we mark them as async.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 drivers/net/ipvlan/ipvlan_main.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ipvlan/ipvlan_main.c b/drivers/net/ipvlan/ipvlan_main.c
index 67c91ceda979..d05b902c925b 100644
--- a/drivers/net/ipvlan/ipvlan_main.c
+++ b/drivers/net/ipvlan/ipvlan_main.c
@@ -1024,6 +1024,7 @@ static struct pernet_operations ipvlan_net_ops = {
 	.id = &ipvlan_netid,
 	.size = sizeof(struct ipvlan_netns),
 	.exit = ipvlan_ns_exit,
+	.async = true,
 };
 
 static int __init ipvlan_init_module(void)

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH net-next 22/28] net: Convert brnf_net_ops
  2018-02-26 12:59 [PATCH net-next 00/28] Converting pernet_operations (part #3) Kirill Tkhai
                   ` (20 preceding siblings ...)
  2018-02-26 13:02 ` [PATCH net-next 21/28] net: Convert ipvlan_net_ops Kirill Tkhai
@ 2018-02-26 13:02 ` Kirill Tkhai
  2018-02-26 13:03 ` [PATCH net-next 23/28] net: Convert clusterip_net_ops Kirill Tkhai
                   ` (6 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Kirill Tkhai @ 2018-02-26 13:02 UTC (permalink / raw)
  To: davem, pablo, kadlec, fw, netdev, kvalo, davem, edumazet, jhs,
	xiyou.wangcong, jiri, mostrows, alex.aring, stefan, avagin,
	ktkhai

These pernet_operations only unregister nf hooks.
So, they are able to be marked as async.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 net/bridge/br_netfilter_hooks.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/net/bridge/br_netfilter_hooks.c b/net/bridge/br_netfilter_hooks.c
index 27f1d4f2114a..484f54150525 100644
--- a/net/bridge/br_netfilter_hooks.c
+++ b/net/bridge/br_netfilter_hooks.c
@@ -967,6 +967,7 @@ static struct pernet_operations brnf_net_ops __read_mostly = {
 	.exit = brnf_exit_net,
 	.id   = &brnf_net_id,
 	.size = sizeof(struct brnf_net),
+	.async = true,
 };
 
 static struct notifier_block brnf_notifier __read_mostly = {

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH net-next 23/28] net: Convert clusterip_net_ops
  2018-02-26 12:59 [PATCH net-next 00/28] Converting pernet_operations (part #3) Kirill Tkhai
                   ` (21 preceding siblings ...)
  2018-02-26 13:02 ` [PATCH net-next 22/28] net: Convert brnf_net_ops Kirill Tkhai
@ 2018-02-26 13:03 ` Kirill Tkhai
  2018-02-26 13:03 ` [PATCH net-next 24/28] net: Convert defrag4_net_ops Kirill Tkhai
                   ` (5 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Kirill Tkhai @ 2018-02-26 13:03 UTC (permalink / raw)
  To: davem, pablo, kadlec, fw, netdev, kvalo, davem, edumazet, jhs,
	xiyou.wangcong, jiri, mostrows, alex.aring, stefan, avagin,
	ktkhai

These pernet_operations register and unregister nf hooks,
and populate and destroy /proc entry. So, they are able
to be marked as async.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 net/ipv4/netfilter/ipt_CLUSTERIP.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/net/ipv4/netfilter/ipt_CLUSTERIP.c b/net/ipv4/netfilter/ipt_CLUSTERIP.c
index 3a84a60f6b39..09d93698aa05 100644
--- a/net/ipv4/netfilter/ipt_CLUSTERIP.c
+++ b/net/ipv4/netfilter/ipt_CLUSTERIP.c
@@ -836,6 +836,7 @@ static struct pernet_operations clusterip_net_ops = {
 	.exit = clusterip_net_exit,
 	.id   = &clusterip_net_id,
 	.size = sizeof(struct clusterip_net),
+	.async = true,
 };
 
 static int __init clusterip_tg_init(void)

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH net-next 24/28] net: Convert defrag4_net_ops
  2018-02-26 12:59 [PATCH net-next 00/28] Converting pernet_operations (part #3) Kirill Tkhai
                   ` (22 preceding siblings ...)
  2018-02-26 13:03 ` [PATCH net-next 23/28] net: Convert clusterip_net_ops Kirill Tkhai
@ 2018-02-26 13:03 ` Kirill Tkhai
  2018-02-26 13:03 ` [PATCH net-next 25/28] net: Convert ila_net_ops Kirill Tkhai
                   ` (4 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Kirill Tkhai @ 2018-02-26 13:03 UTC (permalink / raw)
  To: davem, pablo, kadlec, fw, netdev, kvalo, davem, edumazet, jhs,
	xiyou.wangcong, jiri, mostrows, alex.aring, stefan, avagin,
	ktkhai

These pernet_operations only unregister nf hooks.
So, they are able to be marked as async.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 net/ipv4/netfilter/nf_defrag_ipv4.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/net/ipv4/netfilter/nf_defrag_ipv4.c b/net/ipv4/netfilter/nf_defrag_ipv4.c
index a0d3ad60a411..57244b62a4fc 100644
--- a/net/ipv4/netfilter/nf_defrag_ipv4.c
+++ b/net/ipv4/netfilter/nf_defrag_ipv4.c
@@ -118,6 +118,7 @@ static void __net_exit defrag4_net_exit(struct net *net)
 
 static struct pernet_operations defrag4_net_ops = {
 	.exit = defrag4_net_exit,
+	.async = true,
 };
 
 static int __init nf_defrag_init(void)

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH net-next 25/28] net: Convert ila_net_ops
  2018-02-26 12:59 [PATCH net-next 00/28] Converting pernet_operations (part #3) Kirill Tkhai
                   ` (23 preceding siblings ...)
  2018-02-26 13:03 ` [PATCH net-next 24/28] net: Convert defrag4_net_ops Kirill Tkhai
@ 2018-02-26 13:03 ` Kirill Tkhai
  2018-02-26 13:03 ` [PATCH net-next 26/28] net: Convert defrag6_net_ops Kirill Tkhai
                   ` (3 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Kirill Tkhai @ 2018-02-26 13:03 UTC (permalink / raw)
  To: davem, pablo, kadlec, fw, netdev, kvalo, davem, edumazet, jhs,
	xiyou.wangcong, jiri, mostrows, alex.aring, stefan, avagin,
	ktkhai

These pernet_operations register and unregister nf hooks.
Also they populate and depopulate ila_net_id-pointed hash
table. The table is changed by hooks during skb processing
and via netlink request. It looks impossible for another
net pernet_operations to force the table reading or writing,
so, they are able to be marked as async.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 net/ipv6/ila/ila_xlat.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/net/ipv6/ila/ila_xlat.c b/net/ipv6/ila/ila_xlat.c
index 44c39c5f0638..e438699f000f 100644
--- a/net/ipv6/ila/ila_xlat.c
+++ b/net/ipv6/ila/ila_xlat.c
@@ -613,6 +613,7 @@ static struct pernet_operations ila_net_ops = {
 	.exit = ila_exit_net,
 	.id   = &ila_net_id,
 	.size = sizeof(struct ila_net),
+	.async = true,
 };
 
 static int ila_xlat_addr(struct sk_buff *skb, bool sir2ila)

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH net-next 26/28] net: Convert defrag6_net_ops
  2018-02-26 12:59 [PATCH net-next 00/28] Converting pernet_operations (part #3) Kirill Tkhai
                   ` (24 preceding siblings ...)
  2018-02-26 13:03 ` [PATCH net-next 25/28] net: Convert ila_net_ops Kirill Tkhai
@ 2018-02-26 13:03 ` Kirill Tkhai
  2018-02-26 13:03 ` [PATCH net-next 27/28] net: Convert selinux_net_ops Kirill Tkhai
                   ` (2 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Kirill Tkhai @ 2018-02-26 13:03 UTC (permalink / raw)
  To: davem, pablo, kadlec, fw, netdev, kvalo, davem, edumazet, jhs,
	xiyou.wangcong, jiri, mostrows, alex.aring, stefan, avagin,
	ktkhai

These pernet_operations only unregister nf hooks.
So, they are able to be marked as async.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 net/ipv6/netfilter/nf_defrag_ipv6_hooks.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/net/ipv6/netfilter/nf_defrag_ipv6_hooks.c b/net/ipv6/netfilter/nf_defrag_ipv6_hooks.c
index c87b48359e8f..32f98bc06900 100644
--- a/net/ipv6/netfilter/nf_defrag_ipv6_hooks.c
+++ b/net/ipv6/netfilter/nf_defrag_ipv6_hooks.c
@@ -103,6 +103,7 @@ static void __net_exit defrag6_net_exit(struct net *net)
 
 static struct pernet_operations defrag6_net_ops = {
 	.exit = defrag6_net_exit,
+	.async = true,
 };
 
 static int __init nf_defrag_init(void)

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH net-next 27/28] net: Convert selinux_net_ops
  2018-02-26 12:59 [PATCH net-next 00/28] Converting pernet_operations (part #3) Kirill Tkhai
                   ` (25 preceding siblings ...)
  2018-02-26 13:03 ` [PATCH net-next 26/28] net: Convert defrag6_net_ops Kirill Tkhai
@ 2018-02-26 13:03 ` 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
  28 siblings, 0 replies; 31+ messages in thread
From: Kirill Tkhai @ 2018-02-26 13:03 UTC (permalink / raw)
  To: davem, pablo, kadlec, fw, netdev, kvalo, davem, edumazet, jhs,
	xiyou.wangcong, jiri, mostrows, alex.aring, stefan, avagin,
	ktkhai

These pernet_operations only register and unregister nf hooks.
So, they are able to be marked as async.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 security/selinux/hooks.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 8644d864e3c1..b4d7b6242a40 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -6743,6 +6743,7 @@ static void __net_exit selinux_nf_unregister(struct net *net)
 static struct pernet_operations selinux_net_ops = {
 	.init = selinux_nf_register,
 	.exit = selinux_nf_unregister,
+	.async = true,
 };
 
 static int __init selinux_nf_ip_init(void)

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH net-next 28/28] net: Convert smack_net_ops
  2018-02-26 12:59 [PATCH net-next 00/28] Converting pernet_operations (part #3) Kirill Tkhai
                   ` (26 preceding siblings ...)
  2018-02-26 13:03 ` [PATCH net-next 27/28] net: Convert selinux_net_ops Kirill Tkhai
@ 2018-02-26 13:04 ` Kirill Tkhai
  2018-02-27 16:08 ` [PATCH net-next 00/28] Converting pernet_operations (part #3) David Miller
  28 siblings, 0 replies; 31+ messages in thread
From: Kirill Tkhai @ 2018-02-26 13:04 UTC (permalink / raw)
  To: davem, pablo, kadlec, fw, netdev, kvalo, davem, edumazet, jhs,
	xiyou.wangcong, jiri, mostrows, alex.aring, stefan, avagin,
	ktkhai

These pernet_operations only register and unregister nf hooks.
So, they are able to be marked as async.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 security/smack/smack_netfilter.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/security/smack/smack_netfilter.c b/security/smack/smack_netfilter.c
index e36d17835d4f..3f29c03162ca 100644
--- a/security/smack/smack_netfilter.c
+++ b/security/smack/smack_netfilter.c
@@ -89,6 +89,7 @@ static void __net_exit smack_nf_unregister(struct net *net)
 static struct pernet_operations smack_net_ops = {
 	.init = smack_nf_register,
 	.exit = smack_nf_unregister,
+	.async = true,
 };
 
 static int __init smack_nf_ip_init(void)

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* Re: [PATCH net-next 20/28] net: Convert cfg802154_pernet_ops
  2018-02-26 13:02 ` [PATCH net-next 20/28] net: Convert cfg802154_pernet_ops Kirill Tkhai
@ 2018-02-27 10:24   ` Stefan Schmidt
  0 siblings, 0 replies; 31+ messages in thread
From: Stefan Schmidt @ 2018-02-27 10:24 UTC (permalink / raw)
  To: Kirill Tkhai, davem, pablo, kadlec, fw, netdev, kvalo, edumazet,
	jhs, xiyou.wangcong, jiri, mostrows, alex.aring, avagin

Hello.


On 02/26/2018 02:02 PM, Kirill Tkhai wrote:
> These pernet_operations have only exit method, which
> moves devices from cfg802154_rdev_list to init_net.
> This may occur in any time from nl802154_wpan_phy_netns(),
> so we are nice with rtnl_lock() synchronization.
>
> Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
> ---
>  net/ieee802154/core.c |    1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/net/ieee802154/core.c b/net/ieee802154/core.c
> index cb7176cd4cd6..9104943c15ba 100644
> --- a/net/ieee802154/core.c
> +++ b/net/ieee802154/core.c
> @@ -345,6 +345,7 @@ static void __net_exit cfg802154_pernet_exit(struct net *net)
>  
>  static struct pernet_operations cfg802154_pernet_ops = {
>  	.exit = cfg802154_pernet_exit,
> +	.async = true,
>  };
>  
>  static int __init wpan_phy_class_init(void)
>


Acked-by: Stefan Schmidt <stefan@osg.samsung.com>

regards
Stefan Schmidt

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH net-next 00/28] Converting pernet_operations (part #3)
  2018-02-26 12:59 [PATCH net-next 00/28] Converting pernet_operations (part #3) Kirill Tkhai
                   ` (27 preceding siblings ...)
  2018-02-26 13:04 ` [PATCH net-next 28/28] net: Convert smack_net_ops Kirill Tkhai
@ 2018-02-27 16:08 ` David Miller
  28 siblings, 0 replies; 31+ messages in thread
From: David Miller @ 2018-02-27 16:08 UTC (permalink / raw)
  To: ktkhai
  Cc: pablo, kadlec, fw, netdev, kvalo, edumazet, jhs, xiyou.wangcong,
	jiri, mostrows, alex.aring, stefan, avagin

From: Kirill Tkhai <ktkhai@virtuozzo.com>
Date: Mon, 26 Feb 2018 15:59:10 +0300

> This patchset continues to review and to convert pernet_operations
> to async. Where it is possible, they are grouped by type of actions
> init/exit methods ([1/28], for example). I hope this will make
> the review a little bit easier. The changes are tree-wide: in net, fs,
> drivers and security.

Ok, this series looks good.  Thanks for all of your hard work.

Series applied.

^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2018-02-27 16:08 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH net-next 08/28] net: Convert tc_action_net_init() and tc_action_net_exit() based pernet_operations Kirill Tkhai
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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.