- * Ignores target->priority.
- *
- * 'callback' is allowed to delete the rule that is passed as its argument, but
- * it must not delete (or move) any other rules in 'cls' that have the same
- * wildcards as the argument rule. */
-void
-classifier_for_each_match(const struct classifier *cls_,
- const struct cls_rule *target,
- cls_cb_func *callback, void *aux)
-{
- struct classifier *cls = (struct classifier *) cls_;
- struct cls_table *table, *next_table;
-
- for (table = classifier_first_table(cls); table; table = next_table) {
- if (!flow_wildcards_has_extra(&table->wc, &target->wc)) {
- /* We have eliminated the "no" case in the truth table above. Two
- * of the three remaining cases are trivial. We only need to check
- * the fourth case, where both 'rule' and 'target' require an exact
- * match. */
- struct cls_rule *head, *next_head;
-
- table->n_refs++;
- HMAP_FOR_EACH_SAFE (head, next_head, hmap_node, &table->rules) {
- if (flow_equal_except(&head->flow, &target->flow,
- &target->wc)) {
- struct cls_rule *rule, *next_rule;
-
- FOR_EACH_RULE_IN_LIST_SAFE (rule, next_rule, head) {
- callback(rule, aux);
- }
- }
- }
- next_table = classifier_next_table(cls, table);
- if (!--table->n_refs && !table->n_table_rules) {
- destroy_table(cls, table);
- }
- } else {
- next_table = classifier_next_table(cls, table);
- }
- }
-}
-
-/* 'callback' is allowed to delete the rule that is passed as its argument, but
- * it must not delete (or move) any other rules in 'cls' that have the same
- * wildcards as the argument rule. */
-void
-classifier_for_each(const struct classifier *cls_,
- cls_cb_func *callback, void *aux)