[ovs-dev] implementation details on megaflows ?

Luigi Rizzo rizzo at iet.unipi.it
Thu Oct 10 01:15:14 UTC 2013


On Wed, Oct 09, 2013 at 05:59:43PM -0700, Ben Pfaff wrote:
> Your question deserves a more detailed answer, but here's an easy part.
> 
> On Thu, Oct 10, 2013 at 02:54:19AM +0200, Luigi Rizzo wrote:
> > Perhaps a simple example could help me -- e.g. say you have these
> > four flow entries, how many hash tables are created with megaflows ?
> > 
> >         (1) nw_src=1.2.3.0/24 ...
> >         (2) nw_src=1.2.4.0/24 ...
> >         (3) nw_dst=5.6.7.0/24 ...
> >         (4) nw_src=1.2.5.0/24 ...
> 
> Two, one for flows 1, 2, and 4 (since they match on the same bits of the
> same field), and one for flow 3 (which matches on a different field
> entirely).

thanks.
the thing i do not understand is, these two packets

	A: 1.2.3.4 -> 5.6.7.8 (matches flow 1)
	B: 1.2.5.6 -> 5.6.7.8 (matches flow 3)

match different flows, but if we only have two hash tables in the kernel
(and they match both) how do we make sure that they are classified
properly (A could be misclassified as flow 3 if the table for nw_dst/24
comes first; conversely, B could be misclassified as flow 4 if
the other hash table comes first)

I suppose I am missing some details in my description of the scheme.

cheers
luigi

> The megaflows kernel design is similar to the userspace classifier.  The
> main difference is that overlapping flows aren't allowed, so that any
> match that is found can be accepted.



More information about the dev mailing list