summaryrefslogtreecommitdiffstats
path: root/net/openvswitch/flow_table.c
diff options
context:
space:
mode:
authorPravin B Shelar <pshelar@nicira.com>2014-05-07 03:41:20 +0200
committerPravin B Shelar <pshelar@nicira.com>2014-11-06 08:52:34 +0100
commit9b996e544a6bc7d201060fdcbdb5d4a9b734aa1b (patch)
tree460ba6f2685e4030871b43db2d3183bc1f781747 /net/openvswitch/flow_table.c
parentopenvswitch: Add basic MPLS support to kernel (diff)
downloadlinux-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/flow_table.c')
-rw-r--r--net/openvswitch/flow_table.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/net/openvswitch/flow_table.c b/net/openvswitch/flow_table.c
index cf2d853646f0..90f8b40a350b 100644
--- a/net/openvswitch/flow_table.c
+++ b/net/openvswitch/flow_table.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007-2013 Nicira, Inc.
+ * Copyright (c) 2007-2014 Nicira, Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
@@ -250,11 +250,14 @@ skip_flows:
__table_instance_destroy(ti);
}
-void ovs_flow_tbl_destroy(struct flow_table *table, bool deferred)
+/* No need for locking this function is called from RCU callback or
+ * error path.
+ */
+void ovs_flow_tbl_destroy(struct flow_table *table)
{
- struct table_instance *ti = ovsl_dereference(table->ti);
+ struct table_instance *ti = rcu_dereference_raw(table->ti);
- table_instance_destroy(ti, deferred);
+ table_instance_destroy(ti, false);
}
struct sw_flow *ovs_flow_tbl_dump_next(struct table_instance *ti,