aboutsummaryrefslogtreecommitdiffstats
path: root/net/openvswitch/flow_table.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/openvswitch/flow_table.c')
-rw-r--r--net/openvswitch/flow_table.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/openvswitch/flow_table.c b/net/openvswitch/flow_table.c
index ea7a8073fa02..80ea2a71852e 100644
--- a/net/openvswitch/flow_table.c
+++ b/net/openvswitch/flow_table.c
@@ -98,6 +98,8 @@ struct sw_flow *ovs_flow_alloc(void)
98 98
99 RCU_INIT_POINTER(flow->stats[0], stats); 99 RCU_INIT_POINTER(flow->stats[0], stats);
100 100
101 cpumask_set_cpu(0, &flow->cpu_used_mask);
102
101 return flow; 103 return flow;
102err: 104err:
103 kmem_cache_free(flow_cache, flow); 105 kmem_cache_free(flow_cache, flow);
@@ -141,7 +143,7 @@ static void flow_free(struct sw_flow *flow)
141 if (flow->sf_acts) 143 if (flow->sf_acts)
142 ovs_nla_free_flow_actions((struct sw_flow_actions __force *)flow->sf_acts); 144 ovs_nla_free_flow_actions((struct sw_flow_actions __force *)flow->sf_acts);
143 /* We open code this to make sure cpu 0 is always considered */ 145 /* We open code this to make sure cpu 0 is always considered */
144 for (cpu = 0; cpu < nr_cpu_ids; cpu = cpumask_next(cpu, cpu_possible_mask)) 146 for (cpu = 0; cpu < nr_cpu_ids; cpu = cpumask_next(cpu, &flow->cpu_used_mask))
145 if (flow->stats[cpu]) 147 if (flow->stats[cpu])
146 kmem_cache_free(flow_stats_cache, 148 kmem_cache_free(flow_stats_cache,
147 (struct flow_stats __force *)flow->stats[cpu]); 149 (struct flow_stats __force *)flow->stats[cpu]);