classifier: Remove unused hash functions.
authorJarno Rajahalme <jrajahalme@nicira.com>
Wed, 12 Aug 2015 23:00:49 +0000 (16:00 -0700)
committerJarno Rajahalme <jrajahalme@nicira.com>
Wed, 12 Aug 2015 23:12:16 +0000 (16:12 -0700)
Remove unused cls_rule_hash() and minimatch_hash() functions.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Joe Stringer <joestringer@nicira.com>
lib/classifier-private.h
lib/classifier.c
lib/classifier.h

index 3a150ab..60811d0 100644 (file)
@@ -424,13 +424,6 @@ minimask_hash(const struct minimask *mask, uint32_t basis)
     return miniflow_hash(&mask->masks, basis);
 }
 
-/* Returns a hash value for 'match', given 'basis'. */
-static inline uint32_t
-minimatch_hash(const struct minimatch *match, uint32_t basis)
-{
-    return miniflow_hash(match->flow, minimask_hash(match->mask, basis));
-}
-
 /* Returns a hash value for the bits of range [start, end) in 'minimatch',
  * given 'basis'.
  *
index 0a6855e..d2bf770 100644 (file)
@@ -262,13 +262,6 @@ cls_rule_equal(const struct cls_rule *a, const struct cls_rule *b)
     return a->priority == b->priority && minimatch_equal(&a->match, &b->match);
 }
 
-/* Returns a hash value for 'rule', folding in 'basis'. */
-uint32_t
-cls_rule_hash(const struct cls_rule *rule, uint32_t basis)
-{
-    return minimatch_hash(&rule->match, hash_int(rule->priority, basis));
-}
-
 /* Appends a string describing 'rule' to 's'. */
 void
 cls_rule_format(const struct cls_rule *rule, struct ds *s)
index 5ffe756..889dc1e 100644 (file)
@@ -372,7 +372,6 @@ void cls_rule_set_conjunctions(struct cls_rule *,
                                const struct cls_conjunction *, size_t n);
 
 bool cls_rule_equal(const struct cls_rule *, const struct cls_rule *);
-uint32_t cls_rule_hash(const struct cls_rule *, uint32_t basis);
 void cls_rule_format(const struct cls_rule *, struct ds *);
 bool cls_rule_is_catchall(const struct cls_rule *);
 bool cls_rule_is_loose_match(const struct cls_rule *rule,