diff options
author | Jarno Rajahalme <jarno.rajahalme@nsn.com> | 2013-02-08 00:06:22 +0200 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2013-02-08 12:35:51 -0800 |
commit | 4d935a6bcfb445b93313aedbeee29e60afabc08c (patch) | |
tree | 691689345d1856eef2d64ddb3ae784735072e45a /lib/classifier.h | |
parent | 70fd36009bb4f004cb1c55feafdb87c49ae5a687 (diff) |
Optimize classifier by maintaining the priority of the highest priority rule in each table.
Signed-off-by: Jarno Rajahalme <jarno.rajahalme@nsn.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'lib/classifier.h')
-rw-r--r-- | lib/classifier.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/classifier.h b/lib/classifier.h index bc9db33f..42275712 100644 --- a/lib/classifier.h +++ b/lib/classifier.h @@ -49,6 +49,8 @@ struct cls_table { struct hmap rules; /* Contains "struct cls_rule"s. */ struct minimask mask; /* Wildcards for fields. */ int n_table_rules; /* Number of rules, including duplicates. */ + unsigned int max_priority; /* Max priority of any rule in the table. */ + unsigned int max_count; /* Count of max_priority rules. */ }; /* Returns true if 'table' is a "catch-all" table that will match every |