We are never called in hardirq context - only process or softirq.
Therefore it is not necessary to disable interrupts with
spin_lock_irqsave(), so use spin_lock_bh() everywhere.
} else {
/* We found a matching flow. */
struct sw_flow_actions *old_acts, *new_acts;
} else {
/* We found a matching flow. */
struct sw_flow_actions *old_acts, *new_acts;
- unsigned long int flags;
flow = flow_cast(flow_node);
flow = flow_cast(flow_node);
}
/* Fetch stats, then clear them if necessary. */
}
/* Fetch stats, then clear them if necessary. */
- spin_lock_irqsave(&flow->lock, flags);
+ spin_lock_bh(&flow->lock);
get_stats(flow, stats);
if (uf->flags & ODPPF_ZERO_STATS)
clear_stats(flow);
get_stats(flow, stats);
if (uf->flags & ODPPF_ZERO_STATS)
clear_stats(flow);
- spin_unlock_irqrestore(&flow->lock, flags);
+ spin_unlock_bh(&flow->lock);
{
struct sw_flow_actions *sf_acts;
struct odp_flow_stats stats;
{
struct sw_flow_actions *sf_acts;
struct odp_flow_stats stats;
- unsigned long int flags;
- spin_lock_irqsave(&flow->lock, flags);
+ spin_lock_bh(&flow->lock);
- if (query_flags & ODPFF_ZERO_TCP_FLAGS) {
+ if (query_flags & ODPFF_ZERO_TCP_FLAGS)
- }
- spin_unlock_irqrestore(&flow->lock, flags);
+
+ spin_unlock_bh(&flow->lock);
if (copy_to_user(ustats, &stats, sizeof(struct odp_flow_stats)) ||
get_user(n_actions, n_actionsp))
if (copy_to_user(ustats, &stats, sizeof(struct odp_flow_stats)) ||
get_user(n_actions, n_actionsp))