[ovs-discuss] OpenVSwitch flow forwarding

Masood Moshref Javadi masood.moshref.j at gmail.com
Tue Feb 7 02:28:06 UTC 2012

Thanks for your prompt answer
This is what I understood from the code and your response by now. please
correct me wherever it is wrong.

The kernel module keeps a set of facets of recently matched flows (similar
to exact rules, extractable by ovs-dpctl dump-flows br0) for 5 seconds.
Suppose that this set is empty.
Classifier has multiple tables, each corresponding to a hash of wildcards
of rules (&rules->wc).
When a packet comes, it will first be checked in the kernel, if it is not
there. The classifier goes through all tables, in each table checks if
there is a rule matching the flow (using hashes) (classifier_lookup() in
classsifier.c). Creates the facet. Caches that in the kernel module and
runs it.

Assuming that what I said is correct, I have these questions:
What is the mechanism to find the matched facet in the kernel module
(hashmap) ?
the performance of lookup depends on the number of tables (as all tables
will be checked) and the hashmap in each table. How many tables can we have?
Is there any maximum bound on the number of facets in the kernel module? (I
want to find an upper bound on the number of flows that openvswitch can

Thanks again

On Mon, Feb 6, 2012 at 5:42 PM, Jesse Gross <jesse at nicira.com> wrote:

> On Mon, Feb 6, 2012 at 3:50 PM, Masood Moshref Javadi
> <masood.moshref.j at gmail.com> wrote:
> > I want to figure out the workflow of a packet in the openvswitch (using
> the
> > kernel module). Basically, I have these questions:
> > 1) When a flow comes where it will be compared to the rules?
> Packets for new flows are handled in userspace with a classifier that
> is capable of handling wildcards.  Future packets in that flow are
> handled by an exact match table in the kernel.
> > 2) Is there any difference between rules with wildcard field and exact
> > rules?
> > 3) what is the effect of huge number of rules on the performance of
> > openvswitch
> The userspace table is mostly proportional to the number of unique
> sets of wildcards.  The kernel table is not affected by the number of
> OpenFlow rules.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20120206/406bf138/attachment.html>

More information about the discuss mailing list