2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-29 15:28:56 +00:00
Commit Graph

374 Commits

Author SHA1 Message Date
Gurucharan Shetty
ec8f0f0c24 docker: Integrate docker containers with Open vSwitch.
Open vSwitch does not have native integration with Docker.
INSTALL.Docker explains how Open vSwitch can be integrated
with docker non-natively.

ovs-docker is a helper script to add network interfaces to
docker containers and to attach them as ports to OVS bridge.
This script can be further enhanced as we understand different
use cases.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2014-10-16 14:48:54 -07:00
Ben Pfaff
ef44aa5001 Makefiles: Add $(AM_V_GEN) annotations to clean up "make" output.
The Open vSwitch "make" output was still pretty verbose even when
configured with --enable-silent-rules.  This cleans it up.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Joe Stringer <joestringer@nicira.com>
2014-09-29 14:35:16 -07:00
Gurucharan Shetty
81e3044c10 debian: Don't depened on $RUNLEVEL at startup to create bridges.
Commit b2a0daa5bd (debian: Don't recreate bridges during manual restart.)
added a check on $RUNLEVEL to only create bridges and ports when the
system starts up. This fix does not work with systemd.

This commit uses a different approach to solve the same problem.

Reported-at: https://bugs.debian.org/686518
Reported-by: Philipp S. Schmidt <phils@in-panik.de>
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Tested-by: Philipp S. Schmidt <phils@in-panik.de>
2014-09-12 09:18:06 -07:00
Ed Swierk
e3b0e3fcd2 debian: Fix cross build.
Cross-building openvswitch with debuild -aARCH (or equivalent) fails
because the target architecture is not getting passed to configure.
Thus binaries like ovs-appctl get built using the build host
architecture.

Signed-off-by: Ed Swierk <eswierk@skyportsystems.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-08-26 11:43:42 -07:00
Ben Pfaff
0bc1b46a38 test-controller: Rename to ovs-testcontroller, again install.
mininet uses the Open vSwitch controller by default, for testing.

CC: 757761@bugs.debian.org
Reported-at: https://bugs.debian.org/757761
Requested-by: Tomasz Buchert <tomasz.buchert@inria.fr>
Requested-by: Dariusz Dwornikowski <dariusz.dwornikowski@cs.put.poznan.pl>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
2014-08-26 11:03:43 -07:00
Ben Pfaff
83c88c2623 debian: Really fix packaging given new dot-files.
commit a5c1096abb (debian: Fix debian packaging build failures due to
dot-files in tree.) contained an error that I've made before and should
have noticed.  This commit should really fix the problem.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-08-26 08:57:13 -07:00
Ben Pfaff
8201f581ab debian: Ignore openvswitch-vtep directory generated during packaging.
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-08-26 08:34:48 -07:00
Ben Pfaff
a5c1096abb debian: Fix debian packaging build failures due to dot-files in tree.
openvswitch/* no longer matches all the files since commit 826bc7b613
(build: Add travis continuous integration support) added files with names
beginning with ".".

VMware-BZ: #1298353
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
2014-08-26 08:18:57 -07:00
Justin Pettit
e13440fc3c Set release dates for 2.3.0.
Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2014-08-14 12:27:39 -07:00
Pravin B Shelar
7b30b5eeed Packaging: Add useful files for debian and rhel.
CC: Ben Pfaff <blp@nicira.com>
Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2014-08-11 17:16:42 -07:00
Ben Pfaff
837eefc76b Do not seemingly #include Linux-specific headers on other platforms.
Until now, the OVS source tree has had a whole maze of header files that
make "#include <linux/openvswitch.h>" work OK regardless of platform, but
this confuses everyone new to the tree, at first glance, and is difficult
to understand at second glance too.

This commit renames include/linux/openvswitch.h to
datapath/linux/compat/include/linux/openvswitch.h without other change,
then modifies the userspace build to generate a header that makes sense in
portable Open vSwitch userspace from that header.

It then removes all the remaining include/linux/* files since they are now
unused.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
2014-08-04 11:11:40 -07:00
Ben Pfaff
346f5890a4 debian: Avoid -Wformat-zero-length warnings.
Debian puts an extra "-Wformat" in the CFLAGS following OVS's own
"-Wformat -Wno-format-zero-length", which therefore overrides
-Wno-format-zero-length, so this commit adds an extra
-Wno-format-zero-length to avoid those false positives.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
2014-07-22 16:00:41 -07:00
Gurucharan Shetty
9a8b5cc1a3 debian: Automatically start openvswitch before first invocation of ovs-vsctl.
In the 'interfaces' file, if an admin adds the openvswitch interface
in 'auto', ifupdown will try to create OVS interfaces even before
openvswitch has started. In a case like that, assume that the admin
knows what he is doing and try to start openvswitch.

The negatives I see are
1. /usr is NFS mounted, in which case expect the admin
to mount it through initramfs.
2. syslog through network may not be accessible.

This is similar to what rhel does with commit 602453000e
(rhel: Automatically start openvswitch service before bringing an ovs
interface up or down)

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2014-07-15 15:05:54 -07:00
Gurucharan Shetty
5b245e73d6 debian: Option to create patch ports through 'interfaces'
This is a port of commit d7aab661 ( rhel: Add Patch Port support to
initscripts.) from rhel to debian's ifupdown script.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2014-07-15 15:05:38 -07:00
Gurucharan Shetty
90d7383999 debian: Re-run failed unit tests once.
There are always a few unit tests that have some race conditions
that cause them to occasionally fail. It is probably a good idea
to re-run the failed tests once while building deb packages.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Co-authored-by: Keith Amidon <kamidon@nicira.com>
Signed-off-by: Keith Amidon <kamidon@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2014-06-24 11:07:11 -07:00
Justin Pettit
2c7ea58953 Prepare for post-2.3.0 (2.3.90).
Signed-off-by: Justin Pettit <jpettit@nicira.com>
2014-05-15 14:12:06 -07:00
Justin Pettit
012c3a52b8 Prepare for 2.3.0.
Signed-off-by: Justin Pettit <jpettit@nicira.com>
2014-05-15 14:09:39 -07:00
Jesse Gross
73a9f3418e datapath: Fix feature check for HAVE_RXHASH.
The check for HAVE_RXHASH use #if rather than #ifdef, which
provokes a warning when it isn't defined.

Signed-off-by: Jesse Gross <jesse@nicira.com>
2014-05-02 10:33:45 -07:00
Ben Pfaff
c260f4e2e0 ovs-ctl: Install manpage.
It seems that it is useful to admins after all.

Reported-by: Brian Candler <b.candler@pobox.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-05-01 08:11:21 -07:00
Justin Pettit
c5cf10598f Prepare for post-2.2.0 (2.2.90).
Signed-off-by: Justin Pettit <jpettit@nicira.com>
2014-04-28 15:36:49 -07:00
Justin Pettit
a3aabcd26f Prepare for 2.2.0.
Signed-off-by: Justin Pettit <jpettit@nicira.com>
2014-04-28 15:36:48 -07:00
Ben Pfaff
f085ba1e8a debian: Better document how to get a kernel module in README.Debian.
This moves existing text from INSTALL.Debian into the README.Debian
installed as part of the openvswitch-switch package, and adds a reference
from the former to the latter.

Reported-by: Brian Candler <b.candler@pobox.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Gurucharan Shetty <gshetty@nicira.com>
2014-04-11 11:17:03 -07:00
Ben Pfaff
ed8fb4487d debian: Allow kmod or module-init-tools for backward compatibility.
Commit d473844693 (debian: Depend on 'kmod' instead of module-init-tools.)
switched from depending on module-init-tools to depending on kmod, which
is the new name of the appropriate package in Debian.  Unfortunately,
while kmod is the right name for the latest Debian distribution, it doesn't
have that name in old distributions and thus breaks the build on those.
This commit should work OK in either case, since it allows both names.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Gurucharan Shetty <gshetty@nicira.com>
2014-04-02 14:55:44 -07:00
Ben Pfaff
d473844693 debian: Depend on 'kmod' instead of module-init-tools.
CC: 733696@bugs.debian.org
Reported-by: md@Linux.IT (Marco d'Itri)
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
2014-03-31 13:38:50 -07:00
Gurucharan Shetty
f062911fe3 strsep: Copy from netbsd.
Windows does not have a strsep.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2014-03-17 14:20:49 -07:00
Gurucharan Shetty
03f234dcb8 windows/netinet: Copy ip6.h and icmp6.h from netbsd.
There are a few structure definitions that is used from
these headers. So copy them from the netbsd repo.

The following changes have been made on top of it:
* The keyword "__packed" has been removed
from the headers as the corresponding Linux headers don't
do packing.
* #if BYTE_ORDER == 'X' macros have been replaced by CONSTANT_HTONx().
* code inside #ifdef _KERNEL has been deleted.
* code inside #ifdef ICMP6_STRINGS has been deleted.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2014-03-13 14:22:52 -07:00
Gurucharan Shetty
9d0581fdf2 getopt_long: Copy over the implementation from netbsd.
Windows does not have a getopt_long function. This commit
copies over the getopt_long implementation from netbsd with
some minor modifications and is used only on Windows platform.

Modifications on top of the version in NetBSD repo.
* Remove header files not available in Visual Studio.
* Remove some unwanted #defines.
* Add Open vSwitch specific header files like config.h, vlog.h, util.h
* Add the following #define's
define __UNCONST(a)    ((void *)(unsigned long)(const void *)(a))
define _DIAGASSERT(q) ovs_assert(q)
define warnx VLOG_WARN
* Add extern declaration in getopt.h for optarg, optind.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2014-01-27 10:33:45 -08:00
Ansis Atteka
7849d3e4ca ipsec: install iptables rules that set IPsec bit in skb mark
Without these two iptables rules (one for UDP encapsulated IPsec and
another for direct IPsec), ovs-vswitchd would incorrectly conclude
that GRE packet belonged to a plain GRE tunnel instead of IPsec GRE
tunnel.

Reported-by: Aryan TaheriMonfared <aryan.taherimonfared@uis.no>
Reported-by: Daniel Hiltgen <daniel@netkine.com>
Signed-off-by: Ansis Atteka <aatteka@nicira.com>
2014-01-21 17:12:16 -08:00
Ben Pfaff
7868fbc6c9 ovsdbmonitor: Remove.
ovsdbmonitor was poorly maintained and not widely used.

Acked-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-01-10 15:25:40 -08:00
Ben Pfaff
deb64473f6 Update build requirements.
Libtool is now required as of commit 38b7a52b61 (openvswitch: Use libtool
and allow building shared libs).

It seems that a build requirement for Python slipped in a while back, for
generating ovs-vswitchd.conf.db.5, and no one complained, so we might as
well make it official.  (That will let us simplify some bits of the build,
too, since they won't have to be conditional on Python anymore, so I'm all
in favor of this change.)

Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-01-10 10:52:51 -08:00
Justin Pettit
bff46ebb4b Prepare for post-2.1.0 (2.1.90).
Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2013-12-23 17:19:13 -08:00
Justin Pettit
18f0d729e2 Prepare for 2.1.0.
Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2013-12-23 17:19:07 -08:00
Ben Pfaff
ed1be7871b configure: Add macros to check for #include_next and add a workaround.
This will be used for the #include_next in string.h in the following
commit.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-12-13 09:57:40 -08:00
Gurucharan Shetty
b2a0daa5bd debian: Don't recreate bridges during manual restart.
Open vSwitch bridges and ports can be configured through
the /etc/network/interfaces script. During system startup,
Open vSwitch startup script reads the interfaces file
and creates the bridges and ports. During system shutdown,
the bridges and ports are removed.

The same behavior also can occur with a manual 'restart' of
Open vswitch (ex: service openvswitch-switch restart).
This behavior has come across as undesirable in some cases.
ex: When some one manually creates interfaces through ovs-vsctl
and then restarts Open vSwitch, that interface is lost.

This commit changes the startup script such that, interfaces
are created and deleted through the startup script only when
RUNLEVEL environment variable is set. This behavior will be
consistent with the OVS RHEL ifcfg-* scripts too.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2013-11-22 08:07:18 -08:00
Gurucharan Shetty
c9b9442989 cccl: A wrapper that calls visual c++ compiler.
One option to compile Open vSwitch code in windows
is to use Visual c++ compiler.

From http://cccl.sourceforge.net/ :
"cccl is a wrapper around Microsoft Visual C++'s cl.exe
and link.exe.  It converts Unix compiler parameters
into parameters understood by cl and link.  cccl's main
use is for using Unix build processes with Microsoft
compilers. Using cccl in conjunction with ports of Unix
utilities, it is possible to build many Unix packages
using MSVC, without modifying the build process."

There are couple of forks of the project in the internet.
This particular piece is copied from:
https://gitorious.org/swift/swift/source/\
cf9b391b40a9c59a620c8093d438370381949c60:autoconf/cccl

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2013-11-20 07:15:33 -08:00
Alfredo Finelli
11bd0a533c debian: Avoid logrotate error if /var/run/openvswitch does not exist.
Signed-off-by: Alfredo Finelli <alf@computationes.de>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-12 08:04:17 -08:00
Ben Pfaff
1d5aaa61fa ovs-controller: Rename test-controller and do not install or package.
Too many users have incorrectly assumed that ovs-controller is a necessary
or desirable part of an Open vSwitch deployment.  This commit should fix
the problem by renaming it test-controller and removing it from the
default install and from packaging.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-02 21:06:45 -07:00
Gurucharan Shetty
364e03946d debian: Option to create tunnel through 'interfaces'.
This is a port of commit 7b75828bf5 (rhel: Option to create tunnel
through ifcfg scripts.) from rhel to debian's ifupdown script.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2013-10-31 11:25:47 -07:00
Justin Pettit
2d6934b40f vtep: Add Debian packaging.
Co-authored-by: David Yang <davidy@vmware.com>
Signed-off-by: David Yang <davidy@vmware.com>
Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2013-10-17 15:09:14 -07:00
Ansis Atteka
a5ae88ff8a ovsdb-doc: generate vswitch.[pic|gv] files only if dot tool is available
These are auto-generated files, so it would be better not to keep them
inside Open vSwitch repository.

Behaviour before this patch was that if dot tool was not present on
the system, then ovs-vswitchd.conf.db.5 would have used pre-generated
vswitch.pic file that was already checked in the git repository. After
this patch ovs-vswitchd.conf.db.5 will simply not have a dot diagram,
if dot was not present at the time when Open vSwitch was built.

Signed-off-by: Ansis Atteka <aatteka@nicira.com>
2013-10-17 14:33:14 -07:00
Justin Pettit
d27705eaf8 Announce that ovs-vswitchd is now multi-threaded.
Might be worth mentioning the biggest change in 2.0.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2013-10-15 16:35:43 -07:00
Justin Pettit
2fdb187917 Set release date for 2.0.0.
Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2013-10-15 15:15:02 -07:00
Mark Hamilton
14b4c575c2 utilities: a top like tool for ovs-dpctl dump-flows.
This python script summarizes ovs-dpctl dump-flows content by aggregating
the number of packets, total bytes and occurrence of the following fields:
  - Datapath in_port
  - Ethernet type
  - Source and destination MAC addresses
  - IP protocol
  - Source and destination IPv4 addresses
  - Source and destination IPv6 addresses
  - UDP and TCP destination port
  - Tunnel source and destination addresses

Testing included confirming both mega-flows and non-megaflows are
properly parsed. Bit masks are applied in the case of mega-flows
prior to aggregation.  Test --script parameter which runs in
non-interactive mode. Tested syntax against python 2.4.3, 2.6 and 2.7.
Confirmed script passes pep8 and pylint run as:

pylint --disable=I0011 --include-id=y --reports=n

This tool has been added to these distribution:
  - add ovs-dpctl-top to debian distribution
  - add ovs-dpctl-top to rpm distribution.
  - add ovs-dpctl-top to XenServer RPM.

Signed-off-by: Mark Hamilton <mhamilton@nicira.com>
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
2013-09-17 14:56:24 -07:00
Pravin B Shelar
b3dcb73cc5 datapath: Cleanup netlink compat code.
Patch removes genl, netlink, rtnl compat code and dpif-linux
fallback-id compat code.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
2013-09-06 09:51:43 -07:00
Pravin B Shelar
37418c8662 datapath: Drop support for linux pre-2.6.32 kernel.
This makes datapath module much close to upstream datapath and
make code easy to understand.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
2013-09-06 09:51:08 -07:00
Justin Pettit
b366c1f436 Prepare for post-2.0.0 (2.0.90).
Signed-off-by: Justin Pettit <jpettit@nicira.com>
2013-08-28 16:18:05 -07:00
Justin Pettit
fe8a17989a Prepare for 2.0.0.
We decided to call the next release 2.0 instead of 1.12.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
2013-08-28 16:13:41 -07:00
Justin Pettit
03c8f0b756 Set release date for 1.11.0.
Signed-off-by: Justin Pettit <jpettit@nicira.com>
2013-08-28 14:45:58 -07:00
Joe Stringer
97025b23a7 lib: Add CRC32C Implementation
This implementation was derived from FreeBSD:
http://svnweb.freebsd.org/base/head/sys/libkern/crc32.c

Reviewed-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Joe Stringer <joe@wand.net.nz>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-08-22 09:29:39 -07:00
Ben Pfaff
15d0658c69 debian: Fix build with old versions of dpkg-buildflags.
dpkg-buildflags has not always supported --export=configure, but commit
6c2d4c8780 (debian: Apply hardening options to build.) used it
unconditionally, causing the build to fail on old Debian distributions.
This fixes the problem.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-08-13 14:05:13 -07:00