2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-29 13:27:59 +00:00

260 Commits

Author SHA1 Message Date
Justin Pettit
e0eeeca573 Prepare for 1.12.0.
Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2013-07-23 15:08:57 -07:00
Ben Pfaff
9b437f0f74 configure: Remove -Wno-override-init, add -Wextra to compile options.
The build is clean against -Wextra at least with GCC 4.4.

(-Wextra includes -Woverride-init.)

Suggested-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2013-07-22 13:38:25 -07:00
Ben Pfaff
97eba8fc6f async-append: New library to allow asynchronous appending to a log file.
This will be hooked into the vlog library in an upcoming commit.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-07-18 14:58:57 -07:00
Ben Pfaff
5fcbed7479 New function ovs_strerror() as a thread-safe replacement for strerror().
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-06-28 16:09:37 -07:00
Ben Pfaff
31a3fc6e3e ovs-atomic: New library for atomic operations.
This library should prove useful for the threading changes coming up.
The following commit introduces one (very simple) user.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2013-06-28 16:09:36 -07:00
Ben Pfaff
c22095a5fb ovs-thread: Add per-thread data support.
POSIX defines a portable pthread_key_t API for per-thread data.  GCC and
C11 have two different forms of per-thread data that are generally faster
than the POSIX API, where they are available.  This commit adds a
macro-based wrapper, DEFINE_PER_THREAD_DATA, that takes advantage of these
features where they are available and falls back to the POSIX API
otherwise.

The Clang compiler implements C11 thread_local in its <threads.h>.

This commit also adds a convenience wrapper for the POSIX API, via the
DEFINE_PER_THREAD_MALLOCED_DATA macro.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2013-06-25 14:05:01 -07:00
Ben Pfaff
22c4e104f6 signals: Use sys_siglist[] instead of strsignal() for thread-safety.
strsignal() isn't thread-safe but sys_siglist[] is.  Also, according to
the glibc manual, BSD has sys_siglist[] but not strsignal().

Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-06-05 12:46:58 -07:00
Ed Maste
db273f6275 configure: Add if_mib.h prerequisites.
Signed-off-by: Ed Maste <emaste@freebsd.org>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-05-23 08:10:33 -07:00
YAMAMOTO Takashi
666afb55e8 add minimal NetBSD support
mostly ride on the existing FreeBSD support.

Signed-off-by: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-05-22 20:39:14 -07:00
Ben Pfaff
8e85e03749 Allow master to build on Fedora with the recent threading changes
The recent threading changes have broken the build on Fedora,
and presumably other Red Hat based distributions. This adds an explicit
"-lpthread" to the linker command line and allows the latest master to build
on Fedora. I've also tested this on Ubuntu and it builds fine there.

Signed-off-by: Kyle Mestery <kmestery@cisco.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ed Maste <emaste@freebsd.org>
2013-05-06 15:41:29 -07:00
Ben Pfaff
ffb1cfd144 system-stats: Use getmntent_r() for thread-safety.
getmntent_r() is a GNU extension so we test for its existence and just
disable this feature of system stats if it is not present, because this
feature is not very important.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-05-03 12:49:39 -07:00
Justin Pettit
9f31efc731 Prepare for post-1.11.0 (1.11.90).
Signed-off-by: Justin Pettit <jpettit@nicira.com>
2013-04-29 14:56:41 -07:00
Justin Pettit
8fedda413c Prepare for 1.11.0
Signed-off-by: Justin Pettit <jpettit@nicira.com>
2013-04-29 14:56:41 -07:00
Ben Pfaff
93456ec8b0 timeval: Check for HAVE_BACKTRACE instead of HAVE_EXECINFO_H.
Other code in the tree uses HAVE_BACKTRACE and then blindly includes
<execinfo.h> if it is present, so this doesn't make anything worse.

Once we do that, HAVE_EXECINFO_H has no further users, so this commit also
removes the check for <execinfo.h>

Reported-by: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-04-24 08:59:11 -07:00
Jesse Gross
8773132685 datapath: Provide simple version of if_ether.h on non-Linux systems.
Signed-off-by: Jesse Gross <jesse@nicira.com>
2013-03-29 18:47:25 -07:00
Ben Pfaff
d30e714ccb configure: Only link against libpcap on FreeBSD.
On other platforms there is no benefit to linking against libpcap, because
it is not used.

Signed-off-by: Ben Pfaff <blp@nicira.com>
CC: Ed Maste <emaste@freebsd.org>
2013-03-20 11:35:55 -07:00
Justin Pettit
d224e35014 Prepare for post-1.10.0 (1.10.90).
Signed-off-by: Justin Pettit <jpettit@nicira.com>
2013-02-04 23:51:57 -08:00
Justin Pettit
4191f4350b Prepare for 1.10.0.
Signed-off-by: Justin Pettit <jpettit@nicira.com>
2013-02-04 23:51:57 -08:00
Ben Pfaff
4958e3ee12 Makefile.am: add check that <assert.h> is not used from unexpected files.
In general, with a few specific exceptions, ovs_assert is now preferred
over assert, so this commit adds a check for that in the top-level
Makefile.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2013-01-16 16:04:11 -08:00
Pravin B Shelar
5ca1ba484b openvswitch: Remove Linux bridge compatibility.
Currently brcompat does not work on master due to recent
datapath changes. We have decided to remove it as it is
not used very widely.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
2012-12-27 13:48:51 -08:00
Ben Pfaff
e5f77cc3e3 Prepare for post-1.9.0 (1.9.90).
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-10-24 16:25:33 -07:00
Ben Pfaff
dc074beb57 Prepare for 1.9.0.
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-10-24 16:25:33 -07:00
Ethan Jackson
3d7cab5fe0 timeval: Optionally enable cached timing at configure time.
Often when developing, it would be convenient to force OVS to
either enable or disable cached timing so that a feature can be
tested under both strategies.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-10-17 13:10:02 -07:00
Ethan Jackson
9d232a6d57 timeval: Add new "backtrace" appctl command.
Often, it can be quite difficult to debug performance issues in
Open vSwitch.  Typically one needs to run something like gprof, but
that requires rebuilding and installing on the affected system
which is often problematic.  This patch adds a light weight
profiling solution which can be used in these situations.  The
ovs-appctl backtrace command prints out backtraces taken at 100
millisecond intervals over a 5 second period of time.  It is
currently only supported on systems which have the execinfo library
and enable time caching.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-10-14 19:36:39 -07:00
Ethan Jackson
361906b1e2 config: Add explicit support for building on ESX.
The ESX userspace looks quite a bit like linux, but has some key
differences which need to be specially handled in the build.  To
distinguish between ESX and systems which use the linux datapath
module, this patch adds two new macros "ESX" and "LINUX_DATAPATH".
It uses these macros to disable building code on ESX which only
applies to a true Linux environment.  In addition, it adds a new
route-table-stub implementation which is required for the build to
complete successfully on ESX.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-10-09 15:23:47 -07:00
Ben Pfaff
4210c33bdb Avoid requiring autom4te when it won't necessarily be needed.
Commit 7fd3e43db07 (tests: Allow environment specified autom4te.) added a
requirement for Autom4te without anyone noticing it in advance.  This
caused a build failure in the XenServer DDK, which doesn't have Autom4te.
Since Autom4te is only needed if the testsuite is modified, this commit
makes it optional.

(Autom4te is part of Autoconf.)

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2012-10-04 16:28:10 -07:00
Ethan Jackson
7fd3e43db0 tests: Allow environment specified autom4te.
In the ESX build system, autom4te is in a funny location specified
by an environment variable.  Before this patch, this environment
variable was overridden by the tests automake file.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-10-04 13:42:46 -07:00
Ben Pfaff
f973f2af2f Make the location of the database separately configurable.
The default is unchanged, /etc/openvswitch/conf.db.

This makes it possible to transition each Open vSwitch packaging from
/etc/openvswitch/conf.db to /var/lib/openvswitch/conf.db independently.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-08-01 10:55:57 -07:00
Giuseppe Lettieri
f6eb6b2025 netdev implementation for FreeBSD
This patch adds new netdev classes that implement
"system" and "tap" devices on FreeBSD using the
libpcap library. This enables the use of the
"netdev" datapath_type of Open vSwitch on FreeBSD.

Signed-off-by: Gaetano Catalli <gaetano.catalli@gmail.com>
Signed-off-by: Ed Maste <emaste@adaranet.com>
Signed-off-by: Giuseppe Lettieri <g.lettieri@iet.unipi.it>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-07-26 16:21:48 -07:00
Ben Pfaff
b4e1bf8b7e Makefiles: Enable "dist-hook-git" check only when GNU make is in use.
Otherwise, it will always fail because the Makefile in datapath/linux
requires GNU make to generate the list of distributed files.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Reported-by: Ed Maste <emaste@freebsd.org>
2012-07-25 12:39:41 -07:00
Justin Pettit
945cad7fb1 Prepare for post-1.8.0 (1.8.90).
Signed-off-by: Justin Pettit <jpettit@nicira.com>
2012-07-16 16:49:00 -07:00
Justin Pettit
f3608bf129 Prepare for 1.8.
Signed-off-by: Justin Pettit <jpettit@nicira.com>
2012-07-16 16:47:08 -07:00
Ed Maste
9360d9b7b5 Route-table implementation for (Free)BSD
This is a trivial implementation of the route-table functionality for
FreeBSD, as needed by ofproto/ofproto-dpif-sflow.c.  It has not yet
been extensively tested.

Signed-off-by: Ed Maste <emaste@freebsd.org>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-06-29 14:42:38 -07:00
Justin Pettit
c8d5d22c6a Prepare for post-1.7.0 (1.7.90).
Signed-off-by: Justin Pettit <jpettit@nicira.com>
2012-05-08 11:22:15 -07:00
Justin Pettit
d8b11fb9fa Prepare for 1.7.
Signed-off-by: Justin Pettit <jpettit@nicira.com>
2012-05-08 11:22:12 -07:00
Raju Subramanian
e0edde6fee Global replace of Nicira Networks.
Replaced all instances of Nicira Networks(, Inc) to Nicira, Inc.

Feature #10593
Signed-off-by: Raju Subramanian <rsubramanian@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-05-02 17:08:02 -07:00
Ben Pfaff
8a07709cb8 configure: Remove --with-build-number.
From early days, Nicira used the --with-build-number option to configure to
stamp our internal builds.  We've since switched to another scheme, so
this option is obsolete.

Good riddance.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-03-19 10:07:09 -07:00
Chris Wright
d8965755e7 configure: add configure option to disable building brcompat
This adds ability to do:

  ./configure --disable-brcompat

to disable building userspace and kernel module associated with
providing linux bridge compatibility.  Sources should still be
distributed w/ make dist.

While there, update comment referring to long removed veth driver
which is now relevant for brcompat module.

Cc: Jesse Gross <jesse@nicira.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Acked-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
2012-03-13 16:50:42 -07:00
Justin Pettit
dd1ba5b3f4 Prepare for post-1.6.0 (1.6.90).
Signed-off-by: Justin Pettit <jpettit@nicira.com>
2012-02-24 10:32:36 -08:00
Justin Pettit
d0a8c2e057 Prepare for post-1.5.0 (1.5.90).
Signed-off-by: Justin Pettit <jpettit@nicira.com>
2012-01-12 17:35:21 -08:00
Justin Pettit
e68bfcfc31 Prepare for post-1.4.0 (1.4.90). 2011-12-01 09:06:19 -08:00
Justin Pettit
a206a8c625 Declare the version as "1.4.0". 2011-11-30 22:20:09 -08:00
Edward Tomasz Napierała
6ca00f6f17 Fix build on FreeBSD.
Patch below fixes build on FreeBSD; tested on 10.0-CURRENT.

Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2011-11-01 09:11:52 -07:00
Justin Pettit
b6a9a95b54 Prepare for post-1.3.0 (1.3.90). 2011-10-25 15:30:26 -07:00
Justin Pettit
079a862535 Declare the version as "1.3.0". 2011-10-25 15:30:26 -07:00
Ben Pfaff
9ea0bccc83 datapath-protocol: Use Linux kernel types directly.
We want datapath-protocol.h to be acceptable as a Linux kernel header, so
it must use Linux kernel types and must not have references to Open vSwitch
symbols or header files.  This commit primarily makes that change to
datapath-protocol.h.

At the same time, at least for now we also want datapath-protocol.h to be
usable on non-Linux platforms, so we need some kind of compatiblity.  Thus,
this commit also introduces a <linux/types.h> header file that defines the
necessary Linux kernel types on non-Linux platforms.

In turn, this requires openvswitch/types.h to use the Linux types directly
for ovs_be<N>; otherwise, sparse complains because now __be<N> and
ovs_be<N> are incompatible from its perspective, so this commit makes that
change too.

I don't have a non-Linux kernel platform readily available, so I only
tested the non-Linux part of the linux/types.h substitute by forcing that
case to be triggered with #if 0.  It worked, except for errors in actual
Linux kernel headers included explicitly from OVS source files, so I think
it's likely to work in practice.

Bug #7559.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
2011-10-12 16:27:09 -07:00
Pravin Shelar
f613a0d72c datapath: Always use generic stats for devices (vports)
Currently ovs is using device stats for Linux devices and count them
itself in other situations. This leads to overlap with hardware stats,
inconsistencies, etc. It's much better to just always count the packets
flowing through the switch and let userspace do any merging that it wants.

Following patch removes vport->get_stats() interface. vport-stat is changed
to use new `struct ovs_vport_stat` rather than rtnl_link_stats64.
Definitions of rtnl_link_stats64 is removed from OVS.  dipf_port->stat is also
removed as aggregate stats are only available at netdev layer.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
2011-09-15 19:36:17 -07:00
Ben Pfaff
0027492dee docs: Add Makefile rule to check syntax of manpages.
This should catch future nroff syntax errors immediately, instead of much
later.
2011-08-24 12:42:52 -07:00
Justin Pettit
3e60856b54 Prepare for a post-1.2.0 world (1.2.90). 2011-08-03 15:10:58 -07:00
Justin Pettit
5e9c5b61d3 Prepare Open vSwitch 1.2.0 release. 2011-08-03 15:09:45 -07:00