Date: Thu, 9 Aug 2012 08:22:10 +0000 (UTC) From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r302330 - in head/net/openvswitch: . files Message-ID: <201208090822.q798MAJR086284@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: trasz Date: Thu Aug 9 08:22:10 2012 New Revision: 302330 URL: http://svn.freebsd.org/changeset/ports/302330 Log: Update to 1.7.0. Big thanks to Ed Maste for making this happen. Added: head/net/openvswitch/files/patch-bsd-netdev.diff (contents, props changed) Deleted: head/net/openvswitch/files/patch-acinclude.m4 head/net/openvswitch/files/patch-lib-backtrace.c head/net/openvswitch/files/patch-lib-dpif.c head/net/openvswitch/files/patch-lib-netdev-bsd.c head/net/openvswitch/files/patch-porting.diff Modified: head/net/openvswitch/Makefile head/net/openvswitch/distinfo head/net/openvswitch/files/ovsdb-server.in head/net/openvswitch/pkg-plist Modified: head/net/openvswitch/Makefile ============================================================================== --- head/net/openvswitch/Makefile Thu Aug 9 06:58:03 2012 (r302329) +++ head/net/openvswitch/Makefile Thu Aug 9 08:22:10 2012 (r302330) @@ -6,17 +6,9 @@ # PORTNAME= openvswitch -DISTVERSION= 1.1.0pre2 +PORTVERSION= 1.7.0 CATEGORIES= net MASTER_SITES= http://openvswitch.org/releases/ -#MASTER_SITE_SUBDIR= -#PKGNAMEPREFIX= -#PKGNAMESUFFIX= -#DISTNAME= -#EXTRACT_SUFX= -#DISTFILES= -#DIST_SUBDIR= ${PORTNAME} -#EXTRACT_ONLY= MAINTAINER= trasz@FreeBSD.org COMMENT= A production quality, multilayer virtual switch @@ -30,11 +22,13 @@ USE_AUTOTOOLS= autoconf automake USE_GNOME= pkgconfig USE_PYTHON= yes USE_RC_SUBR= ovs-vswitchd ovsdb-server -MAN1= ovsdb-tool.1 ovsdb-client.1 ovsdb-server.1 +MAN1= ovs-benchmark.1 ovs-pcap.1 ovs-tcpundump.1 ovsdb-client.1 \ + ovsdb-server.1 ovsdb-tool.1 MAN5= ovs-vswitchd.conf.db.5 -MAN8= ovs-appctl.8 ovs-controller.8 ovs-discover.8 ovs-dpctl.8 \ - ovs-kill.8 ovs-ofctl.8 ovs-openflowd.8 ovs-parse-leaks.8 \ - ovs-pki.8 ovs-vsctl.8 ovs-vswitchd.8 ovs-brcompatd.8 +MAN8= ovs-appctl.8 ovs-brcompatd.8 ovs-bugtool.8 ovs-controller.8 \ + ovs-ctl.8 ovs-dpctl.8 ovs-ofctl.8 ovs-parse-leaks.8 ovs-pki.8 \ + ovs-test.8 ovs-vsctl.8 ovs-vswitchd.8 \ + ovs-vlan-bug-workaround.8 ovs-vlan-test.8 .include <bsd.port.pre.mk> @@ -48,6 +42,8 @@ post-patch: @${REINPLACE_CMD} -e 's|1.11.1|%%AUTOMAKE_APIVER%%|g' \ -e 's|2.65|%%AUTOCONF_VERSION%%|g' \ ${WRKSRC}/aclocal.m4 + # Workaround for a makefile bug; if it builds without this line, remove it. + #${TOUCH} ${WRKSRC}/INSTALL post-install: ${INSTALL_DATA} ${WRKSRC}/vswitchd/vswitch.ovsschema ${PREFIX}/share/openvswitch/ Modified: head/net/openvswitch/distinfo ============================================================================== --- head/net/openvswitch/distinfo Thu Aug 9 06:58:03 2012 (r302329) +++ head/net/openvswitch/distinfo Thu Aug 9 08:22:10 2012 (r302330) @@ -1,2 +1,2 @@ -SHA256 (openvswitch-1.1.0pre2.tar.gz) = af9eea41405c8ae10297c393fad54ee0b70d12e737962e2022dddf530573970b -SIZE (openvswitch-1.1.0pre2.tar.gz) = 1456628 +SHA256 (openvswitch-1.7.0.tar.gz) = 8e3942cbce80048fb2ce8077be5d35bbe50bb12a1feba33d7c1db68ce711eb53 +SIZE (openvswitch-1.7.0.tar.gz) = 2154289 Modified: head/net/openvswitch/files/ovsdb-server.in ============================================================================== --- head/net/openvswitch/files/ovsdb-server.in Thu Aug 9 06:58:03 2012 (r302329) +++ head/net/openvswitch/files/ovsdb-server.in Thu Aug 9 08:22:10 2012 (r302330) @@ -31,7 +31,7 @@ ovsdb_server_precmd() { command_args="--detach --pidfile=$pidfile \ --remote=punix:$ovsdb_server_sock \ - --remote=db:Open_vSwitch,managers \ + --remote=db:Open_vSwitch,manager_options \ --private-key=db:SSL,private_key \ --certificate=db:SSL,certificate \ --bootstrap-ca-cert=db:SSL,ca_cert \ Added: head/net/openvswitch/files/patch-bsd-netdev.diff ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/openvswitch/files/patch-bsd-netdev.diff Thu Aug 9 08:22:10 2012 (r302330) @@ -0,0 +1,3188 @@ +diff --git INSTALL INSTALL +new file mode 100644 +index 0000000..671c4a4 +--- /dev/null ++++ INSTALL +@@ -0,0 +1,341 @@ ++ How to Install Open vSwitch on Linux and FreeBSD ++ ================================================ ++ ++This document describes how to build and install Open vSwitch on a ++generic Linux or FreeBSD host. If you want to install Open vSwitch on ++a Citrix XenServer, see INSTALL.XenServer instead. ++ ++This version of Open vSwitch may be built manually with "configure" ++and "make", as described below. You may also build Debian packages by ++running "dpkg-buildpackage". ++ ++Build Requirements ++------------------ ++ ++To compile the userspace programs in the Open vSwitch distribution, ++you will need the following software: ++ ++ - A make program, e.g. GNU make. BSD make should also work. ++ ++ - The GNU C compiler. We generally test with version 4.1, 4.2, or ++ 4.3. ++ ++ - pkg-config. We test with version 0.22. ++ ++ - libssl, from OpenSSL, is optional but recommended if you plan to ++ connect the Open vSwitch to an OpenFlow controller. libssl is ++ required to establish confidentiality and authenticity in the ++ connections from an Open vSwitch to an OpenFlow controller. If ++ libssl is installed, then Open vSwitch will automatically build ++ with support for it. ++ ++To compile the kernel module on Linux, you must also install the ++following. If you cannot build or install the kernel module, you may ++use the userspace-only implementation, at a cost in performance. The ++userspace implementation may also lack some features. Refer to ++INSTALL.userspace for more information. ++ ++ - A supported Linux kernel version. Please refer to README for a ++ list of supported versions. ++ ++ The Open vSwitch datapath requires bridging support ++ (CONFIG_BRIDGE) to be built as a kernel module. (This is common ++ in kernels provided by Linux distributions.) The bridge module ++ must not be loaded or in use. If the bridge module is running ++ (check with "lsmod | grep bridge"), you must remove it ("rmmod ++ bridge") before starting the datapath. ++ ++ For optional support of ingress policing, you must enable kernel ++ configuration options NET_CLS_BASIC, NET_SCH_INGRESS, and ++ NET_ACT_POLICE, either built-in or as modules. (NET_CLS_POLICE is ++ obsolete and not needed.) ++ ++ If GRE tunneling is being used it is recommended that the kernel ++ be compiled with IPv6 support (CONFIG_IPV6). This allows for ++ special handling (such as path MTU discovery) of IPv6 packets. ++ ++ To configure HTB or HFSC quality of service with Open vSwitch, ++ you must enable the respective configuration options. ++ ++ To use Open vSwitch support for TAP devices, you must enable ++ CONFIG_TUN. ++ ++ - To build a kernel module, you need the same version of GCC that ++ was used to build that kernel. ++ ++ - A kernel build directory corresponding to the Linux kernel image ++ the module is to run on. Under Debian and Ubuntu, for example, ++ each linux-image package containing a kernel binary has a ++ corresponding linux-headers package with the required build ++ infrastructure. ++ ++If you are working from a Git tree or snapshot (instead of from a ++distribution tarball), or if you modify the Open vSwitch build system ++or the database schema, you will also need the following software: ++ ++ - Autoconf version 2.64 or later. ++ ++ - Automake version 1.10 or later. ++ ++ - Python 2.x, for x >= 4. ++ ++If you modify the ovsdbmonitor tool, then you will also need the ++following: ++ ++ - pyuic4 from PyQt4 (http://www.riverbankcomputing.co.uk). ++ ++To run the unit tests, you also need: ++ ++ - Perl. Version 5.10.1 is known to work. Earlier versions should ++ also work. ++ ++If you modify the vswitchd database schema, then the E-R diagram in ++the ovs-vswitchd.conf.db(5) manpage will be updated properly only if ++you have the following: ++ ++ - "dot" from graphviz (http://www.graphviz.org/). ++ ++ - Perl. Version 5.10.1 is known to work. Earlier versions should ++ also work. ++ ++ - Python 2.x, for x >= 4. ++ ++If you are going to extensively modify Open vSwitch, please consider ++installing the following to obtain better warnings: ++ ++ - "sparse" version 0.4.4 or later ++ (http://www.kernel.org/pub/software/devel/sparse/dist/). ++ ++ - GNU make. ++ ++Installation Requirements ++------------------------- ++ ++The machine on which Open vSwitch is to be installed must have the ++following software: ++ ++ - libc compatible with the libc used for build. ++ ++ - libssl compatible with the libssl used for build, if OpenSSL was ++ used for the build. ++ ++ - On Linux, the same kernel version configured as part of the build. ++ ++ - For optional support of ingress policing on Linux, the "tc" program ++ from iproute2 (part of all major distributions and available at ++ http://www.linux-foundation.org/en/Net:Iproute2). ++ ++On Linux you should ensure that /dev/urandom exists. To support TAP ++devices, you must also ensure that /dev/net/tun exists. ++ ++To run the ovsdbmonitor tool, the machine must also have the following ++software: ++ ++ - Python 2.x, for x >= 4. ++ ++ - Python Twisted Conch. ++ ++ - Python JSON. ++ ++ - PySide or PyQt4. ++ ++ - Python Zope interface module. ++ ++(On Debian "lenny" the above can be installed with "apt-get install ++python-json python-qt4 python-zopeinterface python-twisted-conch".) ++ ++Building and Installing Open vSwitch for Linux or FreeBSD ++========================================================= ++ ++Once you have installed all the prerequisites listed above in the Base ++Prerequisites section, follow the procedure below to build. ++ ++1. If you pulled the sources directly from an Open vSwitch Git tree, ++ run boot.sh in the top source directory: ++ ++ % ./boot.sh ++ ++2. In the top source directory, configure the package by running the ++ configure script. You can usually invoke configure without any ++ arguments: ++ ++ % ./configure ++ ++ By default all files are installed under /usr/local. If you want ++ to install into, e.g., /usr and /var instead of /usr/local and ++ /usr/local/var, add options as shown here: ++ ++ % ./configure --prefix=/usr --localstatedir=/var ++ ++ To use a specific C compiler for compiling Open vSwitch user ++ programs, also specify it on the configure command line, like so: ++ ++ % ./configure CC=gcc-4.2 ++ ++ To build the Linux kernel module, so that you can run the ++ kernel-based switch, pass the location of the kernel build ++ directory on --with-linux. For example, to build for a running ++ instance of Linux: ++ ++ % ./configure --with-linux=/lib/modules/`uname -r`/build ++ ++ If you wish to build the kernel module for an architecture other ++ than the architecture of the machine used for the build, you may ++ specify the kernel architecture string using the KARCH variable ++ when invoking the configure script. For example, to build for MIPS ++ with Linux: ++ ++ % ./configure --with-linux=/path/to/linux KARCH=mips ++ ++ The configure script accepts a number of other options and honors ++ additional environment variables. For a full list, invoke ++ configure with the --help option. ++ ++3. Run make in the top source directory: ++ ++ % make ++ ++ On FreeBSD you may need to use GNU make (gmake) or NetBSD make ++ (bmake) instead of the native make. ++ ++ For improved warnings if you installed "sparse" (see ++ "Prerequisites"), add C=1 to the "make" command line. ++ ++4. Become root by running "su" or another program. ++ ++5. Run "make install" to install the executables and manpages into the ++ running system, by default under /usr/local. ++ ++6. If you built kernel modules, you may load them with "insmod", e.g.: ++ ++ % insmod datapath/linux/openvswitch.ko ++ ++ You may need to specify a full path to insmod, e.g. /sbin/insmod. ++ To verify that the modules have been loaded, run "/sbin/lsmod" and ++ check that openvswitch is listed. ++ ++ If the "insmod" operation fails, look at the last few kernel log ++ messages (e.g. with "dmesg | tail"): ++ ++ - The message "openvswitch: exports duplicate symbol ++ br_should_route_hook (owned by bridge)" means that the bridge ++ module is loaded. Run "/sbin/rmmod bridge" to remove it. ++ ++ If "/sbin/rmmod bridge" fails with "ERROR: Module bridge does ++ not exist in /proc/modules", then the bridge is compiled into ++ the kernel, rather than as a module. Open vSwitch does not ++ support this configuration (see "Build Requirements", above). ++ ++ - The message "openvswitch: exports duplicate symbol ++ dp_ioctl_hook (owned by ofdatapath)" means that the ofdatapath ++ module from the OpenFlow reference implementation is loaded. ++ Run "/sbin/rmmod ofdatapath" to remove it. (You might have to ++ delete any existing datapaths beforehand, using the "dpctl" ++ program included with the OpenFlow reference implementation. ++ "ovs-dpctl" will not work.) ++ ++ - Otherwise, the most likely problem is that Open vSwitch was ++ built for a kernel different from the one into which you are ++ trying to load it. Run "modinfo" on openvswitch.ko and on ++ a module built for the running kernel, e.g.: ++ ++ % /sbin/modinfo openvswitch.ko ++ % /sbin/modinfo /lib/modules/`uname -r`/kernel/net/bridge/bridge.ko ++ ++ Compare the "vermagic" lines output by the two commands. If ++ they differ, then Open vSwitch was built for the wrong kernel. ++ ++ - If you decide to report a bug or ask a question related to ++ module loading, please include the output from the "dmesg" and ++ "modinfo" commands mentioned above. ++ ++ There is an optional module parameter to openvswitch.ko called ++ vlan_tso that enables TCP segmentation offload over VLANs on NICs ++ that support it. Many drivers do not expose support for TSO on VLANs ++ in a way that Open vSwitch can use but there is no way to detect ++ whether this is the case. If you know that your particular driver can ++ handle it (for example by testing sending large TCP packets over VLANs) ++ then passing in a value of 1 may improve performance. Modules built for ++ Linux kernels 2.6.37 and later, as well as specially patched versions ++ of earlier kernels, do not need this and do not have this parameter. If ++ you do not understand what this means or do not know if your driver ++ will work, do not set this. ++ ++7. Initialize the configuration database using ovsdb-tool, e.g.: ++ ++ % mkdir -p /usr/local/etc/openvswitch ++ % ovsdb-tool create /usr/local/etc/openvswitch/conf.db vswitchd/vswitch.ovsschema ++ ++Startup ++======= ++ ++Before starting ovs-vswitchd itself, you need to start its ++configuration database, ovsdb-server. Each machine on which Open ++vSwitch is installed should run its own copy of ovsdb-server. ++Configure it to use the database you created during step 7 of ++installation, above, to listen on a Unix domain socket, to connect to ++any managers specified in the database itself, and to use the SSL ++configuration in the database: ++ ++ % ovsdb-server --remote=punix:/usr/local/var/run/openvswitch/db.sock \ ++ --remote=db:Open_vSwitch,manager_options \ ++ --private-key=db:SSL,private_key \ ++ --certificate=db:SSL,certificate \ ++ --bootstrap-ca-cert=db:SSL,ca_cert \ ++ --pidfile --detach ++ ++(If you built Open vSwitch without SSL support, then omit ++--private-key, --certificate, and --bootstrap-ca-cert.) ++ ++Then initialize the database using ovs-vsctl. This is only ++necessary the first time after you create the database with ++ovsdb-tool (but running it at any time is harmless): ++ ++ % ovs-vsctl --no-wait init ++ ++Then start the main Open vSwitch daemon, telling it to connect to the ++same Unix domain socket: ++ ++ % ovs-vswitchd --pidfile --detach ++ ++Now you may use ovs-vsctl to set up bridges and other Open vSwitch ++features. For example, to create a bridge named br0 and add ports ++eth0 and vif1.0 to it: ++ ++ % ovs-vsctl add-br br0 ++ % ovs-vsctl add-port br0 eth0 ++ % ovs-vsctl add-port br0 vif1.0 ++ ++Please refer to ovs-vsctl(8) for more details. ++ ++Upgrading ++========= ++ ++When you upgrade Open vSwitch from one version to another, you should ++also upgrade the database schema: ++ ++1. Stop the Open vSwitch daemons, e.g.: ++ ++ % kill `cd /usr/local/var/run/openvswitch && cat ovsdb-server.pid ovs-vswitchd.pid` ++ ++2. Install the new Open vSwitch release. ++ ++3. Upgrade the database, in one of the following two ways: ++ ++ - If there is no important data in your database, then you may ++ delete the database file and recreate it with ovsdb-tool, ++ following the instructions under "Building and Installing Open ++ vSwitch for Linux or FreeBSD". ++ ++ - If you want to preserve the contents of your database, back it ++ up first, then use "ovsdb-tool convert" to upgrade it, e.g.: ++ ++ % ovsdb-tool convert /usr/local/etc/openvswitch/conf.db vswitchd/vswitch.ovsschema ++ ++4. Start the Open vSwitch daemons as described under "Building and ++ Installing Open vSwitch for Linux or FreeBSD" above. ++ ++Bug Reporting ++------------- ++ ++Please report problems to bugs@openvswitch.org. +diff --git INSTALL.KVM INSTALL.KVM +index 61620e5..18a7bd4 100644 +--- INSTALL.KVM ++++ INSTALL.KVM +@@ -3,12 +3,12 @@ + + This document describes how to use Open vSwitch with the Kernel-based + Virtual Machine (KVM). This document assumes that you have read and +-followed INSTALL.Linux to get Open vSwitch setup on your Linux system. ++followed INSTALL to get Open vSwitch setup on your Linux system. + + Setup + ----- + +-First, follow the setup instructions in INSTALL.Linux to get a working ++First, follow the setup instructions in INSTALL to get a working + Open vSwitch installation. + + KVM uses tunctl to handle various bridging modes, which you can +@@ -43,7 +43,7 @@ switch='br0' + ovs-vsctl del-port ${switch} $1 + -------------------------------------------------------------------- + +-At the end of INSTALL.Linux, it describes basic usage of creating ++At the end of INSTALL, it describes basic usage of creating + bridges and ports. If you haven't already, create a bridge named + br0 with the following command: + +diff --git INSTALL.Libvirt INSTALL.Libvirt +index 4f31831..1bc45d5 100644 +--- INSTALL.Libvirt ++++ INSTALL.Libvirt +@@ -4,7 +4,7 @@ + This document describes how to use Open vSwitch with Libvirt 0.9.11 or + later. The Open vSwitch support in Libvirt 0.9.11 eliminates the need to + use OVS Linux Bridge compatibility layer (brcompatd) and interface up/down +-scripts. This document assumes that you followed INSTALL.Linux or installed ++scripts. This document assumes that you followed INSTALL or installed + Open vSwitch from distribution packaging such as a .deb or .rpm. The Open + vSwitch support is included by default in Libvirt 0.9.11. Consult + www.libvirt.org for instructions on how to build the latest Libvirt, if your +diff --git INSTALL.Linux INSTALL.Linux +deleted file mode 100644 +index 78152b6..0000000 +--- INSTALL.Linux ++++ /dev/null +@@ -1,338 +0,0 @@ +- How to Install Open vSwitch on Linux +- ==================================== +- +-This document describes how to build and install Open vSwitch on a +-generic Linux host. If you want to install Open vSwitch on a Citrix +-XenServer, see INSTALL.XenServer instead. +- +-This version of Open vSwitch may be built manually with "configure" +-and "make", as described below. You may also build Debian packages by +-running "dpkg-buildpackage". +- +-Build Requirements +------------------- +- +-To compile the userspace programs in the Open vSwitch distribution, +-you will need the following software: +- +- - A make program, e.g. GNU make. BSD make should also work. +- +- - The GNU C compiler. We generally test with version 4.1, 4.2, or +- 4.3. +- +- - pkg-config. We test with version 0.22. +- +- - libssl, from OpenSSL, is optional but recommended if you plan to +- connect the Open vSwitch to an OpenFlow controller. libssl is +- required to establish confidentiality and authenticity in the +- connections from an Open vSwitch to an OpenFlow controller. If +- libssl is installed, then Open vSwitch will automatically build +- with support for it. +- +-To compile the kernel module, you must also install the following. If +-you cannot build or install the kernel module, you may use the +-userspace-only implementation, at a cost in performance. The +-userspace implementation may also lack some features. Refer to +-INSTALL.userspace for more information. +- +- - A supported Linux kernel version. Please refer to README for a +- list of supported versions. +- +- The Open vSwitch datapath requires bridging support +- (CONFIG_BRIDGE) to be built as a kernel module. (This is common +- in kernels provided by Linux distributions.) The bridge module +- must not be loaded or in use. If the bridge module is running +- (check with "lsmod | grep bridge"), you must remove it ("rmmod +- bridge") before starting the datapath. +- +- For optional support of ingress policing, you must enable kernel +- configuration options NET_CLS_BASIC, NET_SCH_INGRESS, and +- NET_ACT_POLICE, either built-in or as modules. (NET_CLS_POLICE is +- obsolete and not needed.) +- +- If GRE tunneling is being used it is recommended that the kernel +- be compiled with IPv6 support (CONFIG_IPV6). This allows for +- special handling (such as path MTU discovery) of IPv6 packets. +- +- To configure HTB or HFSC quality of service with Open vSwitch, +- you must enable the respective configuration options. +- +- To use Open vSwitch support for TAP devices, you must enable +- CONFIG_TUN. +- +- - To build a kernel module, you need the same version of GCC that +- was used to build that kernel. +- +- - A kernel build directory corresponding to the Linux kernel image +- the module is to run on. Under Debian and Ubuntu, for example, +- each linux-image package containing a kernel binary has a +- corresponding linux-headers package with the required build +- infrastructure. +- +-If you are working from a Git tree or snapshot (instead of from a +-distribution tarball), or if you modify the Open vSwitch build system +-or the database schema, you will also need the following software: +- +- - Autoconf version 2.64 or later. +- +- - Automake version 1.10 or later. +- +- - Python 2.x, for x >= 4. +- +-If you modify the ovsdbmonitor tool, then you will also need the +-following: +- +- - pyuic4 from PyQt4 (http://www.riverbankcomputing.co.uk). +- +-To run the unit tests, you also need: +- +- - Perl. Version 5.10.1 is known to work. Earlier versions should +- also work. +- +-If you modify the vswitchd database schema, then the E-R diagram in +-the ovs-vswitchd.conf.db(5) manpage will be updated properly only if +-you have the following: +- +- - "dot" from graphviz (http://www.graphviz.org/). +- +- - Perl. Version 5.10.1 is known to work. Earlier versions should +- also work. +- +- - Python 2.x, for x >= 4. +- +-If you are going to extensively modify Open vSwitch, please consider +-installing the following to obtain better warnings: +- +- - "sparse" version 0.4.4 or later +- (http://www.kernel.org/pub/software/devel/sparse/dist/). +- +- - GNU make. +- +-Installation Requirements +-------------------------- +- +-The machine on which Open vSwitch is to be installed must have the +-following software: +- +- - libc compatible with the libc used for build. +- +- - libssl compatible with the libssl used for build, if OpenSSL was +- used for the build. +- +- - The Linux kernel version configured as part of the build. +- +- - For optional support of ingress policing, the "tc" program from +- iproute2 (part of all major distributions and available at +- http://www.linux-foundation.org/en/Net:Iproute2). +- +-You should ensure that /dev/urandom exists. To support TAP devices, +-you must also ensure that /dev/net/tun exists. +- +-To run the ovsdbmonitor tool, the machine must also have the following +-software: +- +- - Python 2.x, for x >= 4. +- +- - Python Twisted Conch. +- +- - Python JSON. +- +- - PySide or PyQt4. +- +- - Python Zope interface module. +- +-(On Debian "lenny" the above can be installed with "apt-get install +-python-json python-qt4 python-zopeinterface python-twisted-conch".) +- +-Building and Installing Open vSwitch for Linux +-============================================== +- +-Once you have installed all the prerequisites listed above in the Base +-Prerequisites section, follow the procedure below to build. +- +-1. If you pulled the sources directly from an Open vSwitch Git tree, +- run boot.sh in the top source directory: +- +- % ./boot.sh +- +-2. In the top source directory, configure the package by running the +- configure script. You can usually invoke configure without any +- arguments: +- +- % ./configure +- +- By default all files are installed under /usr/local. If you want +- to install into, e.g., /usr and /var instead of /usr/local and +- /usr/local/var, add options as shown here: +- +- % ./configure --prefix=/usr --localstatedir=/var +- +- To use a specific C compiler for compiling Open vSwitch user +- programs, also specify it on the configure command line, like so: +- +- % ./configure CC=gcc-4.2 +- +- To build the Linux kernel module, so that you can run the +- kernel-based switch, pass the location of the kernel build +- directory on --with-linux. For example, to build for a running +- instance of Linux: +- +- % ./configure --with-linux=/lib/modules/`uname -r`/build +- +- If you wish to build the kernel module for an architecture other +- than the architecture of the machine used for the build, you may +- specify the kernel architecture string using the KARCH variable +- when invoking the configure script. For example, to build for MIPS +- with Linux: +- +- % ./configure --with-linux=/path/to/linux KARCH=mips +- +- The configure script accepts a number of other options and honors +- additional environment variables. For a full list, invoke +- configure with the --help option. +- +-3. Run make in the top source directory: +- +- % make +- +- For improved warnings if you installed "sparse" (see +- "Prerequisites"), add C=1 to the "make" command line. +- +-4. Become root by running "su" or another program. +- +-5. Run "make install" to install the executables and manpages into the +- running system, by default under /usr/local. +- +-6. If you built kernel modules, you may load them with "insmod", e.g.: +- +- % insmod datapath/linux/openvswitch.ko +- +- You may need to specify a full path to insmod, e.g. /sbin/insmod. +- To verify that the modules have been loaded, run "/sbin/lsmod" and +- check that openvswitch is listed. +- +- If the "insmod" operation fails, look at the last few kernel log +- messages (e.g. with "dmesg | tail"): +- +- - The message "openvswitch: exports duplicate symbol +- br_should_route_hook (owned by bridge)" means that the bridge +- module is loaded. Run "/sbin/rmmod bridge" to remove it. +- +- If "/sbin/rmmod bridge" fails with "ERROR: Module bridge does +- not exist in /proc/modules", then the bridge is compiled into +- the kernel, rather than as a module. Open vSwitch does not +- support this configuration (see "Build Requirements", above). +- +- - The message "openvswitch: exports duplicate symbol +- dp_ioctl_hook (owned by ofdatapath)" means that the ofdatapath +- module from the OpenFlow reference implementation is loaded. +- Run "/sbin/rmmod ofdatapath" to remove it. (You might have to +- delete any existing datapaths beforehand, using the "dpctl" +- program included with the OpenFlow reference implementation. +- "ovs-dpctl" will not work.) +- +- - Otherwise, the most likely problem is that Open vSwitch was +- built for a kernel different from the one into which you are +- trying to load it. Run "modinfo" on openvswitch.ko and on +- a module built for the running kernel, e.g.: +- +- % /sbin/modinfo openvswitch.ko +- % /sbin/modinfo /lib/modules/`uname -r`/kernel/net/bridge/bridge.ko +- +- Compare the "vermagic" lines output by the two commands. If +- they differ, then Open vSwitch was built for the wrong kernel. +- +- - If you decide to report a bug or ask a question related to +- module loading, please include the output from the "dmesg" and +- "modinfo" commands mentioned above. +- +- There is an optional module parameter to openvswitch.ko called +- vlan_tso that enables TCP segmentation offload over VLANs on NICs +- that support it. Many drivers do not expose support for TSO on VLANs +- in a way that Open vSwitch can use but there is no way to detect +- whether this is the case. If you know that your particular driver can +- handle it (for example by testing sending large TCP packets over VLANs) +- then passing in a value of 1 may improve performance. Modules built for +- Linux kernels 2.6.37 and later, as well as specially patched versions +- of earlier kernels, do not need this and do not have this parameter. If +- you do not understand what this means or do not know if your driver +- will work, do not set this. +- +-7. Initialize the configuration database using ovsdb-tool, e.g.: +- +- % mkdir -p /usr/local/etc/openvswitch +- % ovsdb-tool create /usr/local/etc/openvswitch/conf.db vswitchd/vswitch.ovsschema +- +-Startup +-======= +- +-Before starting ovs-vswitchd itself, you need to start its +-configuration database, ovsdb-server. Each machine on which Open +-vSwitch is installed should run its own copy of ovsdb-server. +-Configure it to use the database you created during step 7 of +-installation, above, to listen on a Unix domain socket, to connect to +-any managers specified in the database itself, and to use the SSL +-configuration in the database: +- +- % ovsdb-server --remote=punix:/usr/local/var/run/openvswitch/db.sock \ +- --remote=db:Open_vSwitch,manager_options \ +- --private-key=db:SSL,private_key \ +- --certificate=db:SSL,certificate \ +- --bootstrap-ca-cert=db:SSL,ca_cert \ +- --pidfile --detach +- +-(If you built Open vSwitch without SSL support, then omit +---private-key, --certificate, and --bootstrap-ca-cert.) +- +-Then initialize the database using ovs-vsctl. This is only +-necessary the first time after you create the database with +-ovsdb-tool (but running it at any time is harmless): +- +- % ovs-vsctl --no-wait init +- +-Then start the main Open vSwitch daemon, telling it to connect to the +-same Unix domain socket: +- +- % ovs-vswitchd --pidfile --detach +- +-Now you may use ovs-vsctl to set up bridges and other Open vSwitch +-features. For example, to create a bridge named br0 and add ports +-eth0 and vif1.0 to it: +- +- % ovs-vsctl add-br br0 +- % ovs-vsctl add-port br0 eth0 +- % ovs-vsctl add-port br0 vif1.0 +- +-Please refer to ovs-vsctl(8) for more details. +- +-Upgrading +-========= +- +-When you upgrade Open vSwitch from one version to another, you should +-also upgrade the database schema: +- +-1. Stop the Open vSwitch daemons, e.g.: +- +- % kill `cd /usr/local/var/run/openvswitch && cat ovsdb-server.pid ovs-vswitchd.pid` +- +-2. Install the new Open vSwitch release. +- +-3. Upgrade the database, in one of the following two ways: +- +- - If there is no important data in your database, then you may +- delete the database file and recreate it with ovsdb-tool, +- following the instructions under "Building and Installing Open +- vSwitch for Linux". +- +- - If you want to preserve the contents of your database, back it +- up first, then use "ovsdb-tool convert" to upgrade it, e.g.: +- +- % ovsdb-tool convert /usr/local/etc/openvswitch/conf.db vswitchd/vswitch.ovsschema +- +-4. Start the Open vSwitch daemons as described under "Building and +- Installing Open vSwitch for Linux" above. +- +-Bug Reporting +-------------- +- +-Please report problems to bugs@openvswitch.org. +diff --git INSTALL.RHEL INSTALL.RHEL +index 039a857..ff79c89 100644 +--- INSTALL.RHEL ++++ INSTALL.RHEL +@@ -3,7 +3,7 @@ + + This document describes how to build and install Open vSwitch on a Red + Hat Enterprise Linux (RHEL) host. If you want to install Open vSwitch +-on a generic Linux host, see INSTALL.Linux instead. ++on a generic Linux host, see INSTALL instead. + + We have tested these instructions with RHEL 5.6 and RHEL 6.0. + +diff --git INSTALL.SSL INSTALL.SSL +index f322b41..8511b69 100644 +--- INSTALL.SSL ++++ INSTALL.SSL +@@ -7,8 +7,8 @@ with OpenSSL. SSL support ensures integrity and confidentiality of + the OpenFlow connections, increasing network security. + + This file explains how to configure an Open vSwitch to connect to an +-OpenFlow controller over SSL. Refer to INSTALL.Linux for instructions +-on building Open vSwitch with SSL support. ++OpenFlow controller over SSL. Refer to INSTALL for instructions on ++building Open vSwitch with SSL support. + + Open vSwitch uses TLS version 1.0 or later (TLSv1), as specified by + RFC 2246, which is very similar to SSL version 3.0. TLSv1 was +diff --git INSTALL.XenServer INSTALL.XenServer +index e45d5bc..7a4dd76 100644 +--- INSTALL.XenServer ++++ INSTALL.XenServer +@@ -3,7 +3,7 @@ + + This document describes how to build and install Open vSwitch on a + Citrix XenServer host. If you want to install Open vSwitch on a +-generic Linux host, see INSTALL.Linux instead. ++generic Linux or BSD host, see INSTALL instead. + + These instructions have been tested with XenServer 5.6 FP1. + +@@ -19,8 +19,8 @@ RPMs for Citrix XenServer is the DDK VM available from Citrix. + ./configure; make dist" in the Git tree. You cannot run this in + the DDK VM, because it lacks tools that are necessary to bootstrap + the Open vSwitch distribution. Instead, you must run this on a +- machine that has the tools listed in INSTALL.Linux as prerequisites +- for building from a Git tree. ++ machine that has the tools listed in INSTALL as prerequisites for ++ building from a Git tree. + + 2. Copy the distribution tarball into /usr/src/redhat/SOURCES inside + the DDK VM. +diff --git INSTALL.bridge INSTALL.bridge +index dec09d8..af20bff 100644 +--- INSTALL.bridge ++++ INSTALL.bridge +@@ -25,7 +25,7 @@ that the Open vSwitch kernel modules are loaded before the Linux + kernel bridge module. + + 1. Build, install, and start up the Open vSwitch kernel modules and +- userspace programs as described in INSTALL.Linux. ++ userspace programs as described in INSTALL. + + It is important to run "make install", because some Open vSwitch + programs expect to find files in locations selected at installation +diff --git INSTALL.userspace INSTALL.userspace +index 6e6fcd4..feb108c 100644 +--- INSTALL.userspace ++++ INSTALL.userspace +@@ -17,7 +17,7 @@ Building and Installing + ----------------------- + + The requirements and procedure for building, installing, and +-configuring Open vSwitch are the same as those given in INSTALL.Linux. ++configuring Open vSwitch are the same as those given in INSTALL. + You may omit configuring, building, and installing the kernel module, + and the related requirements. + +@@ -31,6 +31,10 @@ The tun device must also exist as /dev/net/tun. If it does not exist, + then create /dev/net (if necessary) with "mkdir /dev/net", then create + /dev/net/tun with "mknod /dev/net/tun c 10 200". + ++On FreeBSD, the userspace switch additionally requires the kernel ++tap(4) driver to be available, either built into the kernel or loaded ++as a module. ++ + Using the Userspace Datapath with ovs-vswitchd + ---------------------------------------------- + +diff --git Makefile.am Makefile.am +index 91adf05..cbe94a6 100644 +--- Makefile.am ++++ Makefile.am +@@ -33,9 +33,9 @@ PYCOV_CLEAN_FILES = build-aux/check-structs,cover + EXTRA_DIST = \ + CodingStyle \ + DESIGN \ ++ INSTALL \ + INSTALL.KVM \ + INSTALL.Libvirt \ +- INSTALL.Linux \ + INSTALL.RHEL \ + INSTALL.SSL \ + INSTALL.XenServer \ +diff --git NOTICE NOTICE +index 912d7b8..dafd25f 100644 +--- NOTICE ++++ NOTICE +@@ -4,6 +4,9 @@ available at http://www.apache.org/licenses/LICENSE-2.0.html + Open vSwitch + Copyright (c) 2007, 2008, 2009, 2010, 2011 Nicira, Inc. + ++Open vSwitch BSD port ++Copyright (c) 2011 Gaetano Catalli ++ + Apache Portable Runtime + Copyright 2008 The Apache Software Foundation. + +diff --git README README +index 251a92e..3ce45b7 100644 +--- README ++++ README +@@ -88,7 +88,7 @@ Open vSwitch also provides some tools: + What other documentation is available? + -------------------------------------- + +-To install Open vSwitch on a regular Linux machine, read INSTALL.Linux. ++To install Open vSwitch on a regular Linux machine, read INSTALL. + + To use Open vSwitch as a drop-in replacement for the Linux bridge, + read INSTALL.bridge. +@@ -99,7 +99,7 @@ or resource pool, read INSTALL.XenServer. + To build RPMs for installing Open vSwitch on a Red Hat Enterprise + Linux host, read INSTALL.RHEL. + +-To use Open vSwitch with KVM on Linux, read INSTALL.Linux, then ++To use Open vSwitch with KVM on Linux, read INSTALL, then + INSTALL.KVM. + + To use Open vSwitch with Libvirt, read INSTALL.Libvirt. +diff --git acinclude.m4 acinclude.m4 +index d33653d..51e784b 100644 +--- acinclude.m4 ++++ acinclude.m4 +@@ -287,6 +287,17 @@ AC_DEFUN([OVS_CHECK_IF_PACKET], + [Define to 1 if net/if_packet.h is available.]) + fi]) + ++dnl Checks for net/if_dl.h. ++AC_DEFUN([OVS_CHECK_IF_DL], ++ [AC_CHECK_HEADER([net/if_dl.h], ++ [HAVE_IF_DL=yes], ++ [HAVE_IF_DL=no]) ++ AM_CONDITIONAL([HAVE_IF_DL], [test "$HAVE_IF_DL" = yes]) ++ if test "$HAVE_IF_DL" = yes; then ++ AC_DEFINE([HAVE_IF_DL], [1], ++ [Define to 1 if net/if_dl.h is available.]) ++ fi]) ++ + dnl Checks for buggy strtok_r. + dnl + dnl Some versions of glibc 2.7 has a bug in strtok_r when compiling +diff --git configure.ac configure.ac +index 1160cdb..5692b86 100644 +--- configure.ac ++++ configure.ac +@@ -41,6 +41,7 @@ AC_SYS_LARGEFILE + AC_SEARCH_LIBS([pow], [m]) + AC_SEARCH_LIBS([clock_gettime], [rt]) + AC_SEARCH_LIBS([timer_create], [rt]) ++AC_SEARCH_LIBS([pcap_open_live], [pcap]) + + OVS_CHECK_COVERAGE + OVS_CHECK_NDEBUG +@@ -52,6 +53,7 @@ OVS_CHECK_PYUIC4 + OVS_CHECK_OVSDBMONITOR + OVS_CHECK_DOT + OVS_CHECK_IF_PACKET ++OVS_CHECK_IF_DL + OVS_CHECK_STRTOK_R + AC_CHECK_MEMBERS([struct stat.st_mtim.tv_nsec, struct stat.st_mtimensec], + [], [], [[#include <sys/stat.h>]]) +diff --git debian/copyright.in debian/copyright.in +index 71aa680..16e5559 100644 +--- debian/copyright.in ++++ debian/copyright.in +@@ -12,6 +12,7 @@ Upstream Copyright Holders: + Copyright (c) 2010 Jean Tourrilhes - HP-Labs. + Copyright (c) 2008,2009,2010 Citrix Systems, Inc. + and authors listed above. ++ Copyright (c) 2011 Gaetano Catalli + + License: + +diff --git lib/automake.mk lib/automake.mk +index 6217526..13622b3 100644 +--- lib/automake.mk ++++ lib/automake.mk +@@ -230,6 +230,14 @@ lib_libopenvswitch_a_SOURCES += \ *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208090822.q798MAJR086284>