Sei sulla pagina 1di 10

Open

vSwitch Development Overview


Jus5n Pe7t October 24, 2012

Process
Git version control All development occurs on the mailing lists
dev: Code reviews git: Change no5ca5ons

All code is peer-reviewed Online gitweb:


hGp://openvswitch.org/cgi-bin/gitweb.cgi? p=openvswitch;a=summary

Interes5ng Files
DESIGN: Design decisions used to implement OVS FAQ: FAQ INSTALL.*: Installa5on instruc5ons for a number of plaXorms Integra5onGuide: Guide to integra5ng with new systems (e.g., new hypervisor) PORTING: Guide to por5ng OVS to new plaXorms (e.g., new OS or hardware plaXorm) ovsdb/SPECS: JSON-RPC protocol used by OVSDB (basis for Informa5onal RFC)

Submi7ng Patches
Described in Submi7ngPatches le Use git format-patch with one patch per email The source tree should build and work aaer each patch is applied (run make check) Make sure to update man page and NEWS, if appropriate Need Signed-o-by:, which means agreeing to the Developers Cer5cate of Origin

Code Layout
datapath: Linux kernel datapath implementa5on include: Include les lib: Common library les (netdev, dpif) ofproto: OpenFlow library ovsdb: Database code (server and clients) u5li5es: U5li5es for OVS (ovs-ofctl, ovs-vsctl) vswitchd: ovs-vswitchd source code

Architectural Overview
ovs-vswitchd: Responsible for switching. Reads congura5on from ovsdb-server and passes congura5on down to ofproto library. ofproto: OVS library that implements an OpenFlow switch. dpif: Instance of an ofproto for soaware switches, which explodes wildcard entries into exact match. netdev: Library that abstracts interac5ng with network devices.

Linux Kernel Datapath Example


ovs-vswitchd
bridge (vswitchd)

ofproto (ofproto) netdev (lib) netdev-linux (lib) ofproto-dpif (ofproto) dpif (lib)

dpif-linux (lib)

user kernel
open_vswitch.ko (datapath)

Integra5on Code
Bulk of code is plaXorm independent Distribu5on contains plaXorm-specic code in the following directories:
xenserver debian rhel

PlaXorm-specic install instruc5ons are in the root directory Includes init scripts, plaXorm-specic daemons, and glue code

Python Bindings
The python directory contains Python bindings Many of the C-based library func5ons from lib are available Read/write bindings for OVSDB available A number of small daemons wriGen in Python use these bindings and ship with the distribu5on

Tes5ng
tests directory contains Autotest unit tests Run make checkruns over 1100 unit tests
Run a specic class:
make TESTSUITEFLAGS="-k ofproto" check

If adding new func5onality, please consider adding your own unit tests!

Potrebbero piacerti anche