summaryrefslogtreecommitdiff
path: root/tests/test-classifier.c
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2010-10-14 10:13:51 -0700
committerBen Pfaff <blp@nicira.com>2010-10-29 09:53:51 -0700
commit48c3de13bee26106d8e708600904f2b20bd08818 (patch)
tree7aa761136559a8b85e24eaf698018723fd2b10c9 /tests/test-classifier.c
parentfbb2ea0b5bebaae691ce6ac4b3a2eed65c775d9b (diff)
downloadopenvswitch-48c3de13bee26106d8e708600904f2b20bd08818.tar.gz
classifier: Merge classifier_lookup_wild(), classifier_lookup_exact().
Merge these functions into classifier_lookup() and update its interface. The new version of the classifier soon to be implemented naturally merges these functions, so this commit updates the interface early.
Diffstat (limited to 'tests/test-classifier.c')
-rw-r--r--tests/test-classifier.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/tests/test-classifier.c b/tests/test-classifier.c
index d8c0e1021..b5972bdba 100644
--- a/tests/test-classifier.c
+++ b/tests/test-classifier.c
@@ -324,22 +324,6 @@ get_value(unsigned int *x, unsigned n_values)
return rem;
}
-static struct cls_rule *
-lookup_with_include_bits(const struct classifier *cls,
- const struct flow *flow, int include)
-{
- switch (include) {
- case CLS_INC_WILD:
- return classifier_lookup_wild(cls, flow);
- case CLS_INC_EXACT:
- return classifier_lookup_exact(cls, flow);
- case CLS_INC_WILD | CLS_INC_EXACT:
- return classifier_lookup(cls, flow);
- default:
- abort();
- }
-}
-
static void
compare_classifiers(struct classifier *cls, struct tcls *tcls)
{
@@ -373,7 +357,7 @@ compare_classifiers(struct classifier *cls, struct tcls *tcls)
flow.nw_tos = nw_tos_values[get_value(&x, N_NW_TOS_VALUES)];
for (include = 1; include <= 3; include++) {
- cr0 = lookup_with_include_bits(cls, &flow, include);
+ cr0 = classifier_lookup(cls, &flow, include);
cr1 = tcls_lookup(tcls, &flow, include);
assert((cr0 == NULL) == (cr1 == NULL));
if (cr0 != NULL) {