2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-30 22:05:19 +00:00

classifier: Make classifier_lookup() 'flow' parameter non-const.

An upcoming commit will make classifier_lookup() sometimes modify its
'flow' argument temporarily during the lookup.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
---
v2: New patch.
v2.1: Rebase.
v3: Rebase.
This commit is contained in:
Ben Pfaff
2014-10-30 14:12:45 -07:00
parent ae99ee4554
commit 2e0bded4b4
5 changed files with 19 additions and 9 deletions

View File

@@ -816,9 +816,12 @@ trie_ctx_init(struct trie_ctx *ctx, const struct cls_trie *trie)
* If a rule is found and 'wc' is non-null, bitwise-OR's 'wc' with the
* set of bits that were significant in the lookup. At some point
* earlier, 'wc' should have been initialized (e.g., by
* flow_wildcards_init_catchall()). */
* flow_wildcards_init_catchall()).
*
* 'flow' is non-const to allow for temporary modifications during the lookup.
* Any changes are restored before returning. */
const struct cls_rule *
classifier_lookup(const struct classifier *cls, const struct flow *flow,
classifier_lookup(const struct classifier *cls, struct flow *flow,
struct flow_wildcards *wc)
{
const struct cls_partition *partition;