struct sw_table_dummy *td = (struct sw_table_dummy *) swt;
struct sw_flow *flow;
list_for_each_entry (flow, &td->flows, node) {
- if (flow_matches(&flow->key, key)) {
+ if (flow_matches_1wild(key, &flow->key)) {
return flow;
}
}
*/
list_del_rcu(&flow->node);
list_del_rcu(&flow->iter_node);
+ flow_deferred_free(flow);
return 1;
}
int (*callback)(struct sw_flow *, void *),
void *private)
{
- struct sw_table_dummy *tl = (struct sw_table_dummy *) swt;
+ struct sw_table_dummy *td = (struct sw_table_dummy *) swt;
struct sw_flow *flow;
unsigned long start;
start = ~position->private[0];
- list_for_each_entry (flow, &tl->iter_flows, iter_node) {
- if (flow->serial <= start && flow_matches(key, &flow->key)) {
+ list_for_each_entry (flow, &td->iter_flows, iter_node) {
+ if (flow->serial <= start && flow_matches_2wild(key,
+ &flow->key)) {
int error = callback(flow, private);
if (error) {
position->private[0] = ~flow->serial;
{
struct sw_table_dummy *td = (struct sw_table_dummy *) swt;
stats->name = "dummy";
- stats->n_flows = td->n_flows;
+ stats->wildcards = OFPFW_ALL; /* xxx Set this appropriately */
+ stats->n_flows = td->n_flows;
stats->max_flows = td->max_flows;
+ stats->n_matched = swt->n_matched;
}