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

222 Commits

Author SHA1 Message Date
Gurucharan Shetty
db6964bbd2 configure.ac: Identify when compiling on windows.
Presence of windows.h will set the WIN32 variable.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2013-11-18 12:54:49 -08:00
Gurucharan Shetty
954d706e76 configure.ac: Make autoconf in Mingw happy.
Autoconf version 2.68 in Mingw environment does not
like the new lines in AC_CONFIG_FILES macro.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2013-11-18 12:54:49 -08:00
Ben Pfaff
d710edc4c2 util: Allow set_subprogram_name() to take a printf() format string.
This will be convenient in an upcoming commit.

I had to add -Wno-format-zero-length to suppress a GCC warning about a
zero-length format string in this monitor_daemon() call:
    set_subprogram_name("");
I don't know what that warning is good for anyway, and I guess the Clang
developers don't either because Clang didn't warn.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2013-11-02 06:59:07 -07:00
Ansis Atteka
9b4a53923a configure: check for uuid python module
After introducing commit a5ae88ff8a276e86c842ac102145432662bf711a
"ovsdb-doc: generate vswitch.[pic|gv] files only if dot tool is
available" Open vSwitch did not build anymore on hosts that did not
have uuid python module installed (for example, we still support
XenServer that still uses old python 2.4 and hence does not have uuid).

After this commit ./configure will check whether uuid module is present
and, if it isn't, then it will add python/compat to the PYTHONPATH.

Acked-By: Ben Pfaff <blp@nicira.com>
Signed-Off-By: Ansis Atteka <aatteka@nicira.com>
Issue: 20476
2013-10-18 12:33:44 -07:00
Ben Pfaff
57b9b4505c configure: Remove call to OVS_CHECK_CACHE_TIME that does not exist.
Commit 31ef9f5178 (timeval: Remove CACHE_TIME scheme.) removed the
OVS_CHECK_CACHE_TIME macro but not the call to it, which leads to an error
message when one runs configure.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-09-05 09:38:28 -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
Ben Pfaff
8a8cd0acd0 configure: Distinguish glibc and NetBSD pthread_setname_np() variants.
Reported-by: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
Tested-by: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-08-01 09:47:20 -07:00
Ben Pfaff
15248032ea configure: Add configure-time check for GCC 4.0+ atomic built-ins.
We found out earlier that GCC sometimes produces an error only at link time
for atomic built-ins that are not supported on a platform.  This actually
tries the link at configure time and should thus reliably detect whether
the atomic built-ins are really supported.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2013-07-31 08:56:36 -07:00
Ethan Jackson
97be153858 clang: Add annotations for thread safety check.
This commit adds annotations for thread safety check. And the
check can be conducted by using -Wthread-safety flag in clang.

Co-authored-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-07-30 21:30:45 -07:00
Ben Pfaff
0f13e65061 util: Set thread name via pthreads in set_subprogram_name().
This makes "top" and "ps" output more readable on FreeBSD at least, and
the names are also visible in debuggers.

Suggested-by: Ed Maste <emaste@freebsd.org>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
Tested-by: Andy Zhou <azhou@nicira.com>
2013-07-25 09:45:43 -07:00
Justin Pettit
2aa31ea37e Prepare for post-1.12.0 (1.12.90).
Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2013-07-23 15:09:04 -07:00
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