diff options
author | Pravin B Shelar <pshelar@nicira.com> | 2014-05-07 03:41:20 +0200 |
---|---|---|
committer | Pravin B Shelar <pshelar@nicira.com> | 2014-11-06 08:52:34 +0100 |
commit | 9b996e544a6bc7d201060fdcbdb5d4a9b734aa1b (patch) | |
tree | 460ba6f2685e4030871b43db2d3183bc1f781747 /net/openvswitch/datapath.c | |
parent | openvswitch: Add basic MPLS support to kernel (diff) | |
download | linux-9b996e544a6bc7d201060fdcbdb5d4a9b734aa1b.tar.xz linux-9b996e544a6bc7d201060fdcbdb5d4a9b734aa1b.zip |
openvswitch: Move table destroy to dp-rcu callback.
Ths simplifies flow-table-destroy API. No need to pass explicit
parameter about context.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Thomas Graf <tgraf@redhat.com>
Diffstat (limited to 'net/openvswitch/datapath.c')
-rw-r--r-- | net/openvswitch/datapath.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c index 688cb9bc0ef1..a532a9c46d20 100644 --- a/net/openvswitch/datapath.c +++ b/net/openvswitch/datapath.c @@ -187,6 +187,7 @@ static void destroy_dp_rcu(struct rcu_head *rcu) { struct datapath *dp = container_of(rcu, struct datapath, rcu); + ovs_flow_tbl_destroy(&dp->table); free_percpu(dp->stats_percpu); release_net(ovs_dp_get_net(dp)); kfree(dp->ports); @@ -1444,7 +1445,7 @@ err_destroy_ports_array: err_destroy_percpu: free_percpu(dp->stats_percpu); err_destroy_table: - ovs_flow_tbl_destroy(&dp->table, false); + ovs_flow_tbl_destroy(&dp->table); err_free_dp: release_net(ovs_dp_get_net(dp)); kfree(dp); @@ -1476,8 +1477,6 @@ static void __dp_destroy(struct datapath *dp) ovs_dp_detach_port(ovs_vport_ovsl(dp, OVSP_LOCAL)); /* RCU destroy the flow table */ - ovs_flow_tbl_destroy(&dp->table, true); - call_rcu(&dp->rcu, destroy_dp_rcu); } |