Thanks for the review. Pushed with also the preceding bigger comment updated.
Jarno On Jul 17, 2014, at 7:13 AM, Jarno Rajahalme <jrajaha...@nicira.com> wrote: > > On Jul 15, 2014, at 2:24 PM, Ben Pfaff <b...@nicira.com> wrote: > >> 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 <jrajaha...@nicira.com> >> >> Here, should the comment on match_plens be something more like >> "Prefixes that could possible match.”? > > You are right, I forgot to update the comment. It is now a bitmask, one bit > for each potentially matching prefix length. Each bit indicates one prefix > length with potential matches, what do you think of this: > > “Bitmask of prefix lengths with possible matches.” > > Jarno >> > >> 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 <b...@nicira.com> > _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev