summaryrefslogtreecommitdiff
path: root/lib/classifier-private.h
diff options
context:
space:
mode:
authorJarno Rajahalme <jrajahalme@nicira.com>2014-11-14 14:47:03 -0800
committerJarno Rajahalme <jrajahalme@nicira.com>2014-11-14 15:55:44 -0800
commitf47eef15b78a642659e019412125d6c2775acb84 (patch)
tree9d025eaf6e62a7fc7b39bd11db23b36c553f9d9c /lib/classifier-private.h
parentd07ac93e1e154b8a5c031ed2bad97ca8b95d7fc4 (diff)
downloadopenvswitch-f47eef15b78a642659e019412125d6c2775acb84.tar.gz
classifier: Do not insert duplicate rules in indices.
There is no point in adding duplicate information into prefix tries. Also, since the lower-priority duplicate rules are not visible to lookups, they do not need to be in staged lookup indices directly either (the head rule is). Finally, now that cmap operations return the number of elements in the cmap, subtable's 'n_rules' member is not needed any more. Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'lib/classifier-private.h')
-rw-r--r--lib/classifier-private.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/classifier-private.h b/lib/classifier-private.h
index a00c0018f..441aaff94 100644
--- a/lib/classifier-private.h
+++ b/lib/classifier-private.h
@@ -31,11 +31,12 @@ struct cls_subtable {
struct cmap_node cmap_node; /* Within struct classifier 'subtables_map'. */
/* The fields are only used by writers. */
- int n_rules OVS_GUARDED; /* Number of rules, including
- * duplicates. */
int max_priority OVS_GUARDED; /* Max priority of any rule in subtable. */
unsigned int max_count OVS_GUARDED; /* Count of max_priority rules. */
+ /* Identical, but lower priority rules are not inserted to any of the
+ * following data structures. */
+
/* These fields are accessed by readers who care about wildcarding. */
const tag_type tag; /* Tag generated from mask for partitioning. */
const uint8_t n_indices; /* How many indices to use. */