Hi,
I am trying to figure out the cost of using megaflows compared to
the previous exact match table (I understand the benefits of megaflows).

Since I have not followed the list recently, and failed to find a
summary description of the implementation, i had a look at the
source code trying to understand how megaflows is implemented.

Can you folks confirm my interpretation below or correct me ?

As i understand, with megaflows:

1. userspace can push entries to the kernel associated with a mask
   (presumably a sparse one), which is determined from the
   path followed when matching a packet;

2. entries with the same mask are stored in the same hash table,
   so the kernel ends up having multiple hash tables.

3. incoming packets are matched against all tables (on each of them,
   masking the fields with the actual mask associated to the table).
   Presumably (not sure how) tables are somehow ordered so that
   the first match is also the correct one.

(overall, this would be similar to Waldvogel's scheme for IP
lookups, except that in that case sorting comes for free
from the use of contiguous masks)

Assuming my description is correct, I have no clear idea on
whether there is a limit on the number of hash tables that
are created, and how they are sorted.

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 ...

thanks
luigi
-----------------------------------------+-------------------------------
  Prof. Luigi RIZZO, ri...@iet.unipi.it  . Dip. di Ing. dell'Informazione
  http://www.iet.unipi.it/~luigi/        . Universita` di Pisa
  TEL      +39-050-2211611               . via Diotisalvi 2
  Mobile   +39-338-6809875               . 56122 PISA (Italy)
-----------------------------------------+-------------------------------
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to