[ovs-dev] [PATCH net-next 4/5] ovs: Remove rtnl_lock() from ovs_exit_net()

2018-03-29 Thread Kirill Tkhai
Here we iterate for_each_net() and removes vport from alive net to the exiting net. ovs_net::dps are protected by ovs_mutex(), and the others, who change it (ovs_dp_cmd_new(), __dp_destroy()) also take it. The same with datapath::ports list. So, we remove rtnl_lock() here. Signed-off-by: Kirill

[ovs-dev] [PATCH net-next 5/5] net: Remove rtnl_lock() in nf_ct_iterate_destroy()

2018-03-29 Thread Kirill Tkhai
rtnl_lock() doesn't protect net::ct::count, and it's not needed for__nf_ct_unconfirmed_destroy() and for nf_queue_nf_hook_drop(). Signed-off-by: Kirill Tkhai --- net/netfilter/nf_conntrack_core.c |2 -- 1 file changed, 2 deletions(-) diff --git a/net/netfilter/nf_conntrack_cor

[ovs-dev] [PATCH net-next 3/5] security: Remove rtnl_lock() in selinux_xfrm_notify_policyload()

2018-03-29 Thread Kirill Tkhai
to iterate net_namespace_list only, and we can remove it. Signed-off-by: Kirill Tkhai --- security/selinux/include/xfrm.h |2 -- 1 file changed, 2 deletions(-) diff --git a/security/selinux/include/xfrm.h b/security/selinux/include/xfrm.h index 31d66431be1e..a0b465316292 100644 --- a/securi

[ovs-dev] [PATCH net-next 2/5] net: Don't take rtnl_lock() in wireless_nlevent_flush()

2018-03-29 Thread Kirill Tkhai
that can change the order, but since skb can be queued in any order, it doesn't matter, how many threads do this in parallel. In case of several threads, this will be even faster. So, we can remove rtnl_lock() here, as it was used for iteration over net_namespace_list only. Signed-off-by: Ki

[ovs-dev] [PATCH net-next 1/5] net: Introduce net_rwsem to protect net_namespace_list

2018-03-29 Thread Kirill Tkhai
emove rtnl_lock() there are in next patches. Fine grained locks generally are better, then one big lock, so let's do that with net_namespace_list, while the situation allows that. Signed-off-by: Kirill Tkhai --- drivers/infiniband/core/roce_gid_mgmt.c |2 ++ include/linux/rtnetlink.h

[ovs-dev] [PATCH net-next 0/5] Introduce net_rwsem to protect net_namespace_list

2018-03-29 Thread Kirill Tkhai
people, and I add all to CC. Note, that this patch is independent of "Close race between {un, }register_netdevice_notifier and pernet_operations": https://patchwork.ozlabs.org/project/netdev/list/?series=36495 Signed-off-by: Kirill Tkhai --- Kirill Tkhai (5): net: Introduce ne

Re: [ovs-dev] [PATCH net-next 0/6] Converting pernet_operations (part #8)

2018-03-17 Thread Kirill Tkhai
On 18.03.2018 00:07, David Miller wrote: > From: Kirill Tkhai > Date: Thu, 15 Mar 2018 12:10:47 +0300 > >> this series continues to review and to convert pernet_operations >> to make them possible to be executed in parallel for several >> net namespaces at the sam

[ovs-dev] [PATCH net-next 6/6] net: Convert ip_vs_ftp_ops

2018-03-15 Thread Kirill Tkhai
These pernet_operations register and unregister ipvs app. register_ip_vs_app(), unregister_ip_vs_app() and register_ip_vs_app_inc() modify per-net structures, and there are no global structures touched. So, this looks safe to be marked as async. Signed-off-by: Kirill Tkhai --- net/netfilter

[ovs-dev] [PATCH net-next 5/6] net: Convert ipvs_core_dev_ops

2018-03-15 Thread Kirill Tkhai
Exit method stops two per-net threads and cancels delayed work. Everything looks nicely per-net divided. Signed-off-by: Kirill Tkhai --- net/netfilter/ipvs/ip_vs_core.c |1 + 1 file changed, 1 insertion(+) diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c index

[ovs-dev] [PATCH net-next 3/6] net: Convert ovs_net_ops

2018-03-15 Thread Kirill Tkhai
be executed in parallel. Signed-off-by: Kirill Tkhai --- net/openvswitch/datapath.c |1 + 1 file changed, 1 insertion(+) diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c index ef38e5aecd28..100191df0371 100644 --- a/net/openvswitch/datapath.c +++ b/net/openvswitch

[ovs-dev] [PATCH net-next 4/6] net: Convert ipvs_core_ops

2018-03-15 Thread Kirill Tkhai
were possible several timer expirations before this patch, and since they are safe, the patch does not invent new parallelism of their destruction. These pernet_operations look safe to be converted. Signed-off-by: Kirill Tkhai --- net/netfilter/ipvs/ip_vs_core.c |1 + 1 file changed, 1

[ovs-dev] [PATCH net-next 2/6] net: Convert mpls_net_ops

2018-03-15 Thread Kirill Tkhai
These pernet_operations register and unregister sysctl table. Exit methods frees platform_labels from net::mpls::platform_label. Everything is per-net, and they looks safe to be marked async. Signed-off-by: Kirill Tkhai --- net/mpls/af_mpls.c |1 + 1 file changed, 1 insertion(+) diff --git

[ovs-dev] [PATCH net-next 0/6] Converting pernet_operations (part #8)

2018-03-15 Thread Kirill Tkhai
Hi, this series continues to review and to convert pernet_operations to make them possible to be executed in parallel for several net namespaces at the same time. There are different operations over the tree, mostly are ipvs. Thanks, Kirill --- Kirill Tkhai (6): net: Convert l2tp_net_ops

[ovs-dev] [PATCH net-next 1/6] net: Convert l2tp_net_ops

2018-03-15 Thread Kirill Tkhai
Init method is rather simple. Exit method queues del_work for every tunnel from per-net list. This seems to be safe to be marked async. Signed-off-by: Kirill Tkhai --- net/l2tp/l2tp_core.c |1 + 1 file changed, 1 insertion(+) diff --git a/net/l2tp/l2tp_core.c b/net/l2tp/l2tp_core.c index