[ovs-dev] [PATCH v2 2/2] lib/classifier: Optimize megaflows for single rule case.

Ben Pfaff blp at nicira.com
Wed May 28 16:52:21 UTC 2014


On Thu, May 22, 2014 at 04:33:01PM -0700, Jarno Rajahalme wrote:
> 
> On May 22, 2014, at 4:27 PM, Jarno Rajahalme <jrajahalme at nicira.com> wrote:
> 
> >> I find myself wondering whether we could end up with a funny
> >> paradoxical mask, e.g. mark some bit of a TCP port as looked at even
> >> though we didn't mark the IP protocol as looked at.  I am not sure
> >> whether this can happen or whether this is a problem.  Actually,
> >> looking further, I guess it can't happen because we always unwildcard
> >> all the fields up to the current stage when we jump to range_out.  In
> >> fact, I think that range_out wildcards the current stage, too: is that
> >> defeating the intended optimization here?  (I see that you updated the
> >> tests so presumably not?)
> > 
> > range_out: wildcards upto the beginning of the current stage (?ofs.start?). But in this case we update the ?ofs.start? to be the end of the current range before this call? I have to investigate a bit more :-)
> 
> OK, in this case we have just used all the bits in the current range to determine there one potential match (meaning that the bits in the range matched). When we do the full check, and find it still matches, we unwildcard the whole mask (as all of that was significant for the full match). However, if the full match  fails, we need to unwildcard all the bits of the current stage (that proved the packet can match at most one rule), and one additional bit (after the the current stage) that proves the packet does not match the one rule found.
> 
>   Jarno

OK.

Are you preparing a v3?  I think I suggested a few changes earlier.



More information about the dev mailing list