[ovs-dev] [PATCH 3/4] lib/classifier: Return all matching prefix lengths from trie lookup.
Ben Pfaff
blp at nicira.com
Tue Jul 15 21:24:17 UTC 2014
On Fri, Jul 11, 2014 at 04:55:56AM -0700, Jarno Rajahalme wrote:
> Previously we only returned the last matching prefix length
> encountered during a trie lookup, and skipped subtables that had
> prefixes longer than that. This patch changes the trie lookup
> functions to return all matching prefix lengths seen, so that all
> non-matching prefix lengths can be skipped.
>
> Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
Here, should the comment on match_plens be something more like
"Prefixes that could possible match."?
struct trie_ctx {
const struct cls_trie *trie;
bool lookup_done; /* Status of the lookup. */
uint8_t be32ofs; /* U32 offset of the field in question. */
- unsigned int match_plen; /* Longest prefix than could possibly match. */
unsigned int maskbits; /* Prefix length needed to avoid false matches. */
+ union mf_value match_plens; /* Longest prefix than could possibly match. */
};
Acked-by: Ben Pfaff <blp at nicira.com>
More information about the dev
mailing list