[ovs-dev] Open Vswitch design docs..where to start.

Jesse Gross jesse at nicira.com
Tue Apr 20 16:18:46 UTC 2010

On Fri, Apr 16, 2010 at 7:15 PM, Ben Pfaff <blp at nicira.com> wrote:

> On Fri, Apr 16, 2010 at 06:06:06PM -0400, Ramesh Mishra wrote:
> > I have just downloaded the src code openvswitch-0.99.2 version on my
> > machine and started playing with it. In order to get a head start,
> > could you guys point me to any documentation either inside the src
> > code or on the web that would help in understanding the internals.
> You might want to skim through the HotNets paper on the openvswitch.org
> Documentation page.  It gives an overview of the structure of the
> system.

Also, here is an excerpt from an email that I sent out previously that gives
a little more source level detail:

Here's an overview of the path that a packet takes:

We have support for modular datapath providers (lib/dpif.h,
lib/dpif-provider.h) to handle the fast path for packet processing, though
currently the primary one is a Linux kernel module (datapath/).  When a
packet is received it is compared to an exact match flow table, which is
populated on demand by ovs-vswitchd.  Since this is this first packet in the
flow there is no match and it is pushed to userspace for further processing.
 In userspace (ofproto/ofproto.c) it is matched against a more general flow
table that supports wildcards and a variety of actions according to the
OpenFlow spec.  In addition to specifying output ports the userspace flow
table (lib/classifier.c) may list a 'normal' action, in which case the
output is that of an L2 learning switch.  The normal action
(vswitchd/bridge.c) can provides MAC learning, bonding, etc.  The result of
the userspace processing is an exact match flow with a set of output ports
plus modifications such as adding or stripping VLAN tags.  This flow is
pushed into the datapath so that future packets can avoid the trip to
userspace.  The datapath is designed to be as simple and fast as possible,
keeping most of the logic in userspace.

Two other major libraries are netdev (lib/netdev.h), which is an abstraction
for userspace to access network devices and a new config database in the
'next' branch (ovsdb/).  The OpenFlow spec (openflowswitch.org) describes
the matching and output capability.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-dev/attachments/20100420/657a477b/attachment-0003.html>

More information about the dev mailing list