diff options
author | Kirill Tkhai <ktkhai@virtuozzo.com> | 2018-02-26 08:01:52 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-02-27 11:01:37 -0500 |
commit | 31502104b301c0dcacd5df8e92fba9dcf20dfccb (patch) | |
tree | b31d92a8d6089829c67a48d74a8a0f018dc85799 /net | |
parent | 3cec5fb3476e07833fea9a1e2d5f6c629078b4ae (diff) |
net: Convert ipgre_net_ops, ipgre_tap_net_ops, erspan_net_ops, vti_net_ops and ipip_net_ops
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/ip_gre.c | 3 | ||||
-rw-r--r-- | net/ipv4/ip_vti.c | 1 | ||||
-rw-r--r-- | net/ipv4/ipip.c | 1 |
3 files changed, 5 insertions, 0 deletions
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 = { | |||
1044 | .exit_batch = ipgre_exit_batch_net, | 1044 | .exit_batch = ipgre_exit_batch_net, |
1045 | .id = &ipgre_net_id, | 1045 | .id = &ipgre_net_id, |
1046 | .size = sizeof(struct ip_tunnel_net), | 1046 | .size = sizeof(struct ip_tunnel_net), |
1047 | .async = true, | ||
1047 | }; | 1048 | }; |
1048 | 1049 | ||
1049 | static int ipgre_tunnel_validate(struct nlattr *tb[], struct nlattr *data[], | 1050 | static int ipgre_tunnel_validate(struct nlattr *tb[], struct nlattr *data[], |
@@ -1623,6 +1624,7 @@ static struct pernet_operations ipgre_tap_net_ops = { | |||
1623 | .exit_batch = ipgre_tap_exit_batch_net, | 1624 | .exit_batch = ipgre_tap_exit_batch_net, |
1624 | .id = &gre_tap_net_id, | 1625 | .id = &gre_tap_net_id, |
1625 | .size = sizeof(struct ip_tunnel_net), | 1626 | .size = sizeof(struct ip_tunnel_net), |
1627 | .async = true, | ||
1626 | }; | 1628 | }; |
1627 | 1629 | ||
1628 | static int __net_init erspan_init_net(struct net *net) | 1630 | static int __net_init erspan_init_net(struct net *net) |
@@ -1641,6 +1643,7 @@ static struct pernet_operations erspan_net_ops = { | |||
1641 | .exit_batch = erspan_exit_batch_net, | 1643 | .exit_batch = erspan_exit_batch_net, |
1642 | .id = &erspan_net_id, | 1644 | .id = &erspan_net_id, |
1643 | .size = sizeof(struct ip_tunnel_net), | 1645 | .size = sizeof(struct ip_tunnel_net), |
1646 | .async = true, | ||
1644 | }; | 1647 | }; |
1645 | 1648 | ||
1646 | static int __init ipgre_init(void) | 1649 | 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 = { | |||
454 | .exit_batch = vti_exit_batch_net, | 454 | .exit_batch = vti_exit_batch_net, |
455 | .id = &vti_net_id, | 455 | .id = &vti_net_id, |
456 | .size = sizeof(struct ip_tunnel_net), | 456 | .size = sizeof(struct ip_tunnel_net), |
457 | .async = true, | ||
457 | }; | 458 | }; |
458 | 459 | ||
459 | static int vti_tunnel_validate(struct nlattr *tb[], struct nlattr *data[], | 460 | 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 = { | |||
669 | .exit_batch = ipip_exit_batch_net, | 669 | .exit_batch = ipip_exit_batch_net, |
670 | .id = &ipip_net_id, | 670 | .id = &ipip_net_id, |
671 | .size = sizeof(struct ip_tunnel_net), | 671 | .size = sizeof(struct ip_tunnel_net), |
672 | .async = true, | ||
672 | }; | 673 | }; |
673 | 674 | ||
674 | static int __init ipip_init(void) | 675 | static int __init ipip_init(void) |