From b16ec89b54865a754fdbd17d3382283d6f5e264f Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 4 Mar 2009 16:55:15 -0800 Subject: [PATCH] classifier: Remove classifier_for_each_with_wildcards(). This function is now unused, and it seems unlikely that a new user will appear, so remove it. --- lib/classifier.c | 40 ---------------------------------------- lib/classifier.h | 5 ----- 2 files changed, 45 deletions(-) diff --git a/lib/classifier.c b/lib/classifier.c index 7f10aa24..c27113b3 100644 --- a/lib/classifier.c +++ b/lib/classifier.c @@ -447,46 +447,6 @@ classifier_for_each(const struct classifier *cls, int include, callback(prev_rule, aux); } } - -void -classifier_for_each_with_wildcards(const struct classifier *cls, - uint32_t wildcards, - cls_cb_func *callback, void *aux) -{ - struct cls_rule *prev_rule = NULL; - - assert(!(wildcards & ~OFPFW_ALL)); - if (wildcards) { - int table_idx = table_idx_from_wildcards(wildcards); - const struct hmap *tbl = &cls->tables[table_idx]; - struct cls_bucket *bucket, *next_bucket; - struct cls_rule *rule; - - HMAP_FOR_EACH_SAFE (bucket, next_bucket, - struct cls_bucket, hmap_node, tbl) { - LIST_FOR_EACH (rule, struct cls_rule, node.list, &bucket->rules) { - if (rule->wc.wildcards == wildcards) { - if (prev_rule) { - callback(prev_rule, aux); - } - prev_rule = rule; - } - } - } - } else { - struct cls_rule *rule, *next_rule; - HMAP_FOR_EACH_SAFE (rule, next_rule, - struct cls_rule, node.hmap, &cls->exact_table) { - if (prev_rule) { - callback(prev_rule, aux); - } - prev_rule = rule; - } - } - if (prev_rule) { - callback(prev_rule, aux); - } -} static struct cls_bucket *create_bucket(struct hmap *, size_t hash, const flow_t *fixed); diff --git a/lib/classifier.h b/lib/classifier.h index 981d03ab..f660483f 100644 --- a/lib/classifier.h +++ b/lib/classifier.h @@ -153,14 +153,9 @@ enum { }; void classifier_for_each(const struct classifier *, int include, cls_cb_func *, void *aux); -void classifier_for_each_with_wildcards(const struct classifier *, - uint32_t wildcards, - cls_cb_func *, void *aux); - void classifier_for_each_match(const struct classifier *, const struct cls_rule *, int include, cls_cb_func *, void *aux); - struct cls_rule *classifier_find_rule_exactly(const struct classifier *, const flow_t *target, uint32_t wildcards, -- 2.30.2