datapath: Move table destroy to dp-rcu callback.
[sliver-openvswitch.git] / datapath / flow_table.c
index a680895..be2d7d5 100644 (file)
@@ -141,7 +141,7 @@ static void flow_free(struct sw_flow *flow)
 {
        int node;
 
-       kfree((struct sf_flow_acts __force *)flow->sf_acts);
+       kfree((struct sw_flow_actions __force *)flow->sf_acts);
        for_each_node(node)
                if (flow->stats[node])
                        kmem_cache_free(flow_stats_cache,
@@ -259,11 +259,13 @@ 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 = (struct table_instance __force *)table->ti;
 
-       table_instance_destroy(ti, deferred);
+       table_instance_destroy(ti, false);
 }
 
 struct sw_flow *ovs_flow_tbl_dump_next(struct table_instance *ti,