classifier: Remove classifier_for_each_with_wildcards().
authorBen Pfaff <blp@nicira.com>
Thu, 5 Mar 2009 00:55:15 +0000 (16:55 -0800)
committerBen Pfaff <blp@nicira.com>
Thu, 5 Mar 2009 00:55:15 +0000 (16:55 -0800)
This function is now unused, and it seems unlikely that a new user will
appear, so remove it.

lib/classifier.c
lib/classifier.h

index 7f10aa24b1042091335b75df259d191c6ab521cc..c27113b3510eaca347028e210854073cc50103b7 100644 (file)
@@ -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);
-    }
-}
 \f
 static struct cls_bucket *create_bucket(struct hmap *, size_t hash,
                                         const flow_t *fixed);
index 981d03ab28af61508224be22326e8b708d28510a..f660483f00d8475a8a9501b09851e982ed1e282d 100644 (file)
@@ -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,