X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Ftest-classifier.c;h=e0a3e96351688d52d760544edc3de7bbfe03b178;hb=093ca5b366899cb187ac0fb70b9308eeb8f452eb;hp=57a1e2c2cc60d2817053df546fb23c217c9e589c;hpb=70d3fbe7658b59bac65f8b4f2ba03602acf7f1c2;p=openvswitch diff --git a/tests/test-classifier.c b/tests/test-classifier.c index 57a1e2c2..e0a3e963 100644 --- a/tests/test-classifier.c +++ b/tests/test-classifier.c @@ -155,7 +155,7 @@ read_uint32(const void *p) } static bool -match(const struct cls_rule *wild, const flow_t *fixed) +match(const struct cls_rule *wild, const struct flow *fixed) { int f_idx; @@ -187,7 +187,7 @@ match(const struct cls_rule *wild, const flow_t *fixed) } static struct cls_rule * -tcls_lookup(const struct tcls *cls, const flow_t *flow, int include) +tcls_lookup(const struct tcls *cls, const struct flow *flow, int include) { size_t i; @@ -335,7 +335,7 @@ get_value(unsigned int *x, unsigned n_values) static struct cls_rule * lookup_with_include_bits(const struct classifier *cls, - const flow_t *flow, int include) + const struct flow *flow, int include) { switch (include) { case CLS_INC_WILD: @@ -359,7 +359,7 @@ compare_classifiers(struct classifier *cls, struct tcls *tcls) assert(classifier_count_exact(cls) == tcls_count_exact(tcls)); for (i = 0; i < confidence; i++) { struct cls_rule *cr0, *cr1; - flow_t flow; + struct flow flow; unsigned int x; int include; @@ -380,7 +380,6 @@ compare_classifiers(struct classifier *cls, struct tcls *tcls) ETH_ADDR_LEN); flow.nw_proto = nw_proto_values[get_value(&x, N_NW_PROTO_VALUES)]; flow.nw_tos = nw_tos_values[get_value(&x, N_NW_TOS_VALUES)]; - memset(flow.reserved, 0, sizeof flow.reserved); for (include = 1; include <= 3; include++) { cr0 = lookup_with_include_bits(cls, &flow, include); @@ -430,7 +429,7 @@ check_tables(const struct classifier *cls, if (!hmap_is_empty(&cls->tables[i])) { found_tables++; } - HMAP_FOR_EACH (bucket, struct cls_bucket, hmap_node, &cls->tables[i]) { + HMAP_FOR_EACH (bucket, hmap_node, &cls->tables[i]) { found_buckets++; assert(!list_is_empty(&bucket->rules)); found_rules += list_size(&bucket->rules); @@ -454,7 +453,7 @@ make_rule(int wc_fields, unsigned int priority, int value_pat) const struct cls_field *f; struct test_rule *rule; uint32_t wildcards; - flow_t flow; + struct flow flow; wildcards = 0; memset(&flow, 0, sizeof flow);