sliver-openvswitch.git
10 years agoovs-rcu: New library.
Ben Pfaff [Tue, 18 Mar 2014 23:34:28 +0000 (16:34 -0700)]
ovs-rcu: New library.

RCU allows multiple threads to read objects in parallel without any
performance penalty.  The following commit will introduce the first use.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
10 years agotests: Fix small typo in "OpenFlow" in ofproto tests.
Justin Pettit [Tue, 18 Mar 2014 21:29:17 +0000 (14:29 -0700)]
tests: Fix small typo in "OpenFlow" in ofproto tests.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
10 years agostream: Call WSAStartup() before calling any winsock functions.
Gurucharan Shetty [Mon, 17 Mar 2014 16:28:07 +0000 (09:28 -0700)]
stream: Call WSAStartup() before calling any winsock functions.

The WSAStartup function initiates use of the Winsock DLL by a process.
The function should be called before any winsock related functions
are called.

Since, we use stream-fd-windows through pstream_open or stream_open
add the WSAStartup() call there.

The current version of the Windows Sockets specification is version 2.2

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agosocket-util: Fix dscp error check for Windows.
Gurucharan Shetty [Mon, 17 Mar 2014 16:19:24 +0000 (09:19 -0700)]
socket-util: Fix dscp error check for Windows.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agoMan ovs-ofctl: Typo in arp_spa & arp_tpa
Arun Sharma [Tue, 18 Mar 2014 12:14:42 +0000 (17:44 +0530)]
Man ovs-ofctl: Typo in arp_spa & arp_tpa

It seems there is a typo in definition of arp_spa & arp_tpa

Signed-off-by: Arun Sharma <arun.sharma@calsoftinc.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agodatapath: compat: Downstream the reciprocal_div.{c,h}.
Alex Wang [Fri, 14 Mar 2014 18:47:30 +0000 (11:47 -0700)]
datapath: compat: Downstream the reciprocal_div.{c,h}.

The reciprocal division code used in datapath is flawed.  The bug
has been fixed in the linux kernel repo in commit 809fa972fd(
reciprocal_divide: update/correction of the algorithm).

This commit downstreams the reciprocal_div.{c,h} from the linux
kernel repo.

Signed-off-by: Alex Wang <alexw@nicira.com>
Reviewed-by: Thomas Graf <tgraf@redhat.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
10 years agodpif-netdev: init atomic flag dp->destroyed
Andy Zhou [Tue, 18 Mar 2014 05:10:53 +0000 (22:10 -0700)]
dpif-netdev: init atomic flag dp->destroyed

It is better to explicitly initialize the dp->destroy than to rely
on xzalloc().

Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agoFix typos in documentation.
Ben Pfaff [Mon, 17 Mar 2014 22:28:43 +0000 (15:28 -0700)]
Fix typos in documentation.

Reported-by: Anshuman Manral <anshuman.manral@outlook.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoBUILD.Windows: Update compilable utilities.
Gurucharan Shetty [Thu, 13 Mar 2014 22:02:58 +0000 (15:02 -0700)]
BUILD.Windows: Update compilable utilities.

We can now compile a few OVS userspace components on Windows.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agosystem-stats: Port for Windows.
Gurucharan Shetty [Fri, 14 Mar 2014 14:38:52 +0000 (07:38 -0700)]
system-stats: Port for Windows.

This does not provide us all the functionality that
is available in Linux. But should be a start.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agowindefs: srandom() and random() for windows.
Gurucharan Shetty [Fri, 14 Mar 2014 14:32:08 +0000 (07:32 -0700)]
windefs: srandom() and random() for windows.

Windows does not have a srandom() and random(). But it does
have a srand() and rand(). We use these functions in sflow code.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agostrsep: Copy from netbsd.
Gurucharan Shetty [Thu, 13 Mar 2014 22:20:15 +0000 (15:20 -0700)]
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>
10 years agosflow: Include the windefs.h header for windows.
Gurucharan Shetty [Wed, 12 Mar 2014 21:59:02 +0000 (14:59 -0700)]
sflow: Include the windefs.h header for windows.

sflow.h uses u_int32_t that needs windefs.h for compilation
in visual studio.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agoofproto: Don't use DELETE inside enumerator list.
Gurucharan Shetty [Wed, 12 Mar 2014 21:37:05 +0000 (14:37 -0700)]
ofproto: Don't use DELETE inside enumerator list.

Visual studio does not like it. It is mostly a keyword.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agoovs-ofctl: Use fcntl instead of sys/fcntl.
Gurucharan Shetty [Wed, 12 Mar 2014 21:35:10 +0000 (14:35 -0700)]
ovs-ofctl: Use fcntl instead of sys/fcntl.

Windows does not have a sys/fcntl.h

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agowindows/unistd: Add definitions for STD*_FILENO.
Gurucharan Shetty [Wed, 12 Mar 2014 20:57:42 +0000 (13:57 -0700)]
windows/unistd: Add definitions for STD*_FILENO.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
10 years agowindefs: Include the library advapi32.
Gurucharan Shetty [Wed, 12 Mar 2014 20:43:52 +0000 (13:43 -0700)]
windefs: Include the library advapi32.

advapi32 is needed by multiple functions
So include it in a common place.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agobacktrace: Add log_backtrace()
Andy Zhou [Thu, 13 Mar 2014 22:28:54 +0000 (15:28 -0700)]
backtrace: Add log_backtrace()

log_backtrace() and log_backtrace_msg() logs the back trace into
the log file. It may be most useful when debugging unit tests.
"backtrace.h" documents the usage. It is not being called directly
in the code, but rather as a handy tool available when needed.

Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agoofproto-dpif: Revalidate flows when the group table changes.
Ben Pfaff [Mon, 17 Mar 2014 20:25:19 +0000 (13:25 -0700)]
ofproto-dpif: Revalidate flows when the group table changes.

Otherwise group table modifications won't be immediately reflected in the
treatment of flows already passing through the switch.

Reported-by: Hyojoon Kim <joonk@gatech.edu>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Tested-by: Hyojoon Kim <joonk@gatech.edu>
10 years agoFAQ: Add question about meter support.
Ben Pfaff [Mon, 17 Mar 2014 20:06:07 +0000 (13:06 -0700)]
FAQ: Add question about meter support.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Pritesh Kothari <pritesh.kothari@cisco.com>
10 years agosocket-util: Fix definition of LINUX.
Ben Pfaff [Mon, 17 Mar 2014 20:00:30 +0000 (13:00 -0700)]
socket-util: Fix definition of LINUX.

Reported-by: Mukesh Hira <mhira@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Pritesh Kothari <pritesh.kothari@cisco.com>
10 years agoudpif: Bug fix updif_flush
Andy Zhou [Fri, 14 Mar 2014 04:48:55 +0000 (21:48 -0700)]
udpif:  Bug fix updif_flush

Before this commit, all datapath flows are cleared with dpif_flush(),
but the revalidator thread still holds ukeys, which are caches of the
datapath flows in the revalidaor.  Flushing ukeys causes flow_del
messages to be sent to the datapath again on flows that have been
deleted by the dpif_flush() already.

Double deletion by itself is not problem, per se, may an efficiency
issue. However, for ever flow_del message sent to the datapath, a log
message, at the warning level, will be generated in case datapath
failed to execute the command. In addition to cause spurious log
messages, Double deletion causes unit tests to report erroneous
failures as all warning messages are considered test failures.

The fix is to simply shut down the revalidator threads to flush all
ukeys, then flush the datapth before restarting the revalidator threads.

dpif_flush() was implemented as flush flows of all datapaths while
most of its invocation should only flush its local datapath.
Only megaflow on/off commands should flush all dapapaths. This bug is
also fixed.

Found during development.

Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
10 years agostp: Fix bpdu tx problem in listening state
kmindg [Sun, 9 Mar 2014 09:48:52 +0000 (17:48 +0800)]
stp: Fix bpdu tx problem in listening state

The restriction only allows to send bpdu in forwarding state in
compose_output_action__. But a port could send bpdu in listening
and learning state according to comments in lib/stp.h(State of
an STP port).

Until this commit, OVS did not send out BPDUs in listening and learning
states.  But those two states are temporary, the stp port will be in
forwarding state and send out BPDUs eventually (In the default
configuration listening and learning states last 15+15 second).  Therefore,
this bug increased convergence time but did not entirely break STP.

Signed-off-by: kmindg <kmindg@gmail.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoopenflow-1.4.h: Add bundle structure definitions
Alexandru Copot [Thu, 13 Mar 2014 20:08:48 +0000 (22:08 +0200)]
openflow-1.4.h: Add bundle structure definitions

Signed-off-by: Alexandru Copot <alex.mihai.c@gmail.com>
Cc: Daniel Baluta <dbaluta@ixiacom.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agowindows/sys: Define sa_family_t for easy compilation.
Gurucharan Shetty [Wed, 12 Mar 2014 16:47:57 +0000 (09:47 -0700)]
windows/sys: Define sa_family_t for easy compilation.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
10 years agowindefs: Add definition for pid_t.
Gurucharan Shetty [Wed, 12 Mar 2014 17:00:41 +0000 (10:00 -0700)]
windefs: Add definition for pid_t.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
10 years agoovs-thread: We don't use fork in Windows.
Gurucharan Shetty [Wed, 12 Mar 2014 17:32:59 +0000 (10:32 -0700)]
ovs-thread: We don't use fork in Windows.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agowindows/net: Definition for IFNAMSIZ.
Gurucharan Shetty [Wed, 12 Mar 2014 16:51:13 +0000 (09:51 -0700)]
windows/net: Definition for IFNAMSIZ.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agowindows/netinet: Copy ip6.h and icmp6.h from netbsd.
Gurucharan Shetty [Wed, 12 Mar 2014 16:16:09 +0000 (09:16 -0700)]
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>
10 years agoovs-atomic: Delete atomic, atomic_flag, ovs_refcount destroy functions.
Ben Pfaff [Tue, 11 Mar 2014 20:16:54 +0000 (13:16 -0700)]
ovs-atomic: Delete atomic, atomic_flag, ovs_refcount destroy functions.

None of the atomic implementations need a destroy function anymore, so it's
"more standard" and more convenient for users to get rid of them.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
10 years agoovs-atomic-types: Move into ovs-atomic.h.
Ben Pfaff [Tue, 11 Mar 2014 20:11:22 +0000 (13:11 -0700)]
ovs-atomic-types: Move into ovs-atomic.h.

Every implementation used this same code, so it makes sense to centralize
it.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
10 years agoovs-atomic-pthreads: Use global shared locks for atomic_flag also.
Ben Pfaff [Tue, 11 Mar 2014 19:57:02 +0000 (12:57 -0700)]
ovs-atomic-pthreads: Use global shared locks for atomic_flag also.

This will eliminate the need for atomic_flag_destroy().

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
10 years agoovs-atomic: Use raw types, not structs, when locks are required.
Ben Pfaff [Tue, 11 Mar 2014 19:46:29 +0000 (12:46 -0700)]
ovs-atomic: Use raw types, not structs, when locks are required.

Until now, the GCC 4+ and pthreads implementations of atomics have used
struct wrappers for their atomic types.  This had the advantage of allowing
a mutex to be wrapped in, in some cases, and of better type-checking by
preventing stray uses of atomic variables other than through one of the
atomic_*() functions or macros.  However, the mutex meant that an
atomic_destroy() function-like macro needed to be used.  The struct wrapper
also made it impossible to define new atomic types that were compatible
with each other without using a typedef.  For example, one could not simply
define a macro like
    #define ATOMIC(TYPE) struct { TYPE value; }
and then have two declarations like:
    ATOMIC(void *) x;
    ATOMIC(void *) y;
and do anything with these objects that require type-compatibility, even
"&x == &y", because the two structs are not compatible.  One can do it
through a typedef:
    typedef ATOMIC(void *) atomic_voidp;
    atomic_voidp x, y;
but that is inconvenient, especially because of the need to invent a name
for the type.

This commit aims to ease the problem by getting rid of the wrapper structs
in the cases where the atomic library used them.  It gets rid of the
mutexes, in the cases where they are still needed, by using a global
array of mutexes instead.

This commit also defines the ATOMIC macro described above and documents
its use in ovs-atomic.h.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
10 years agoovs-atomic: Factor type declarations out of most implementations.
Ben Pfaff [Tue, 11 Mar 2014 20:37:27 +0000 (13:37 -0700)]
ovs-atomic: Factor type declarations out of most implementations.

This reduces duplicate code.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
10 years agoutil: Move CACHE_LINE_SIZE here.
Ben Pfaff [Tue, 11 Mar 2014 07:10:20 +0000 (00:10 -0700)]
util: Move CACHE_LINE_SIZE here.

It will come in handy elsewhere in upcoming commits.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
10 years agoutil: New macro PAD_SIZE.
Ben Pfaff [Tue, 11 Mar 2014 06:50:54 +0000 (23:50 -0700)]
util: New macro PAD_SIZE.

PAD_SIZE(x,y) is a little shorter and may have a more obvious meaning
than ROUND_UP(x,y) - x.

I intend to add more users in an upcoming comment.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
10 years agocompiler: New macro for defining aligned structs.
Ben Pfaff [Tue, 11 Mar 2014 06:49:29 +0000 (23:49 -0700)]
compiler: New macro for defining aligned structs.

This is broken out into a separate commit because it adds new MSVC
specific code and I don't have MSVC around to test whether it's correct.

CC: Gurucharan Shetty <gshetty@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoovs-atomic-gcc4+: Fix parenthesization in atomic_read_explicit().
Ben Pfaff [Mon, 10 Mar 2014 21:14:06 +0000 (14:14 -0700)]
ovs-atomic-gcc4+: Fix parenthesization in atomic_read_explicit().

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
10 years agonetdev-vport: Don't look for ovs-monitor-ipsec's pid file.
Gurucharan Shetty [Wed, 12 Mar 2014 17:50:42 +0000 (10:50 -0700)]
netdev-vport: Don't look for ovs-monitor-ipsec's pid file.

We do not have pidfiles in Windows. And we do not yet have support
for ipsec tunnels. This lets us move forward with compilation.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agostream-fd-windows: Fix compilation error.
Gurucharan Shetty [Wed, 12 Mar 2014 17:48:04 +0000 (10:48 -0700)]
stream-fd-windows: Fix compilation error.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agoautomake: Use route-table-stub for Windows.
Gurucharan Shetty [Wed, 12 Mar 2014 17:44:51 +0000 (10:44 -0700)]
automake: Use route-table-stub for Windows.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agotimeval: Sleep instead of poll().
Gurucharan Shetty [Wed, 12 Mar 2014 17:21:05 +0000 (10:21 -0700)]
timeval: Sleep instead of poll().

The WSAPoll() function, which is similar to poll() doesnot
simply sleep when the fd array is NULL. So use Sleep() instead.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agoBUILD.Windows: Build idl headers separately.
Gurucharan Shetty [Wed, 12 Mar 2014 17:04:27 +0000 (10:04 -0700)]
BUILD.Windows: Build idl headers separately.

idl headers won't be built, if we build individual executables
e..g., "make ovsbd/ovsdb-server.exe". According to
http://www.gnu.org/software/automake/manual/html_node/Built-Sources-Example.html
we may have to add the headers as dependecies for every executables.

Currently the lack of a ovs-appctl port to Windows prevents us from
running just a "make". We plan to get ovs-appctl port done soon. Till
then, call out that the idl headers need to be built separately.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agoofp-actions: Relax build assertion condition for ofpact_nest struct.
Gurucharan Shetty [Wed, 12 Mar 2014 16:40:36 +0000 (09:40 -0700)]
ofp-actions: Relax build assertion condition for ofpact_nest struct.

struct ofpact has enums that are packed in case of __GNUC__.
This packing does not occur for visual studio. For 'struct ofpact_nest',
we are currently expecting that "struct ofpact actions[]" has an offset of
8 bytes.  This condition won't be true in compilers where enums are
not packed.

It is good enough if struct ofpact actions[] starts at an offset which is
a multiple of OFPACT_ALIGNTO.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years ago.gitignore: Ignore visual studio created files.
Gurucharan Shetty [Wed, 12 Mar 2014 16:33:00 +0000 (09:33 -0700)]
.gitignore: Ignore visual studio created files.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agobfd: Remove unnecessary include of netlink header.
Gurucharan Shetty [Wed, 12 Mar 2014 16:29:19 +0000 (09:29 -0700)]
bfd: Remove unnecessary include of netlink header.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agowindows/netinet: Add some #defines needed for Windows.
Gurucharan Shetty [Wed, 12 Mar 2014 15:47:27 +0000 (08:47 -0700)]
windows/netinet: Add some #defines needed for Windows.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agoovsdb: fsync() for Windows.
Gurucharan Shetty [Wed, 12 Mar 2014 15:22:39 +0000 (08:22 -0700)]
ovsdb: fsync() for Windows.

There is no fsync() in Windows. But there is a _commit()
which does the same thing.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agostdio: fseeko for Windows.
Gurucharan Shetty [Tue, 11 Mar 2014 17:07:18 +0000 (10:07 -0700)]
stdio: fseeko for Windows.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agoovsdb: Do not look for symbolic links for db creation in Windows.
Gurucharan Shetty [Mon, 10 Mar 2014 22:47:30 +0000 (15:47 -0700)]
ovsdb: Do not look for symbolic links for db creation in Windows.

We start with not supporting symbolic links for database
creation in Windows.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agoconfigure: Include pthread-win32 libraries for Windows build.
Gurucharan Shetty [Tue, 4 Mar 2014 22:07:55 +0000 (14:07 -0800)]
configure: Include pthread-win32 libraries for Windows build.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Signed-off-by: Saurabh Shah <ssaurabh@vmware.com>
Co-authored-by: Saurabh Shah <ssaurabh@vmware.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agolearn.at: fix a race in "self-modifying flow with hard_timeout" test
YAMAMOTO Takashi [Wed, 12 Mar 2014 10:06:20 +0000 (19:06 +0900)]
learn.at: fix a race in "self-modifying flow with hard_timeout" test

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agolearn.at: fix a comment
YAMAMOTO Takashi [Wed, 12 Mar 2014 10:06:19 +0000 (19:06 +0900)]
learn.at: fix a comment

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agolearn.at: wrap long comments
YAMAMOTO Takashi [Wed, 12 Mar 2014 10:06:18 +0000 (19:06 +0900)]
learn.at: wrap long comments

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoofp-print: __attribute__ format in visual studio.
Gurucharan Shetty [Wed, 12 Mar 2014 15:03:24 +0000 (08:03 -0700)]
ofp-print: __attribute__ format in visual studio.

Visual studio does not understand __attribute__ format.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agouuid: Use current time to compute sha.
Gurucharan Shetty [Mon, 10 Mar 2014 16:18:50 +0000 (09:18 -0700)]
uuid: Use current time to compute sha.

Windows does not have the getppid(), getuid(), getgid() functions.
We do get a random seed from CryptGenRandom(). That seed along with
process id and current time hopefully is good enough.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agoovsdb-server: Truncate file for Windows.
Gurucharan Shetty [Mon, 10 Mar 2014 15:37:21 +0000 (08:37 -0700)]
ovsdb-server: Truncate file for Windows.

There is no ftruncate() in visual studio. There is a _chsize_s()
which has a similar functionality.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agoofproto: Update rule's priority in eviction group.
kmindg [Sun, 9 Mar 2014 09:48:04 +0000 (17:48 +0800)]
ofproto: Update rule's priority in eviction group.

We do call heap_rebuild in ofproto_run, but we do not update rule's
priority with latest hard_timeout and idle_timeout before heap_rebuild.

This patch ensures that rule's priority has been updated before
heap_rebuild, and adds two test cases to check eviction with modified
hard_timeout and idle_timwout.

Signed-off-by: kmindg <kmindg@gmail.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoofp-util: Use enum ofp_table_config in struct ofputil_table_mod
Simon Horman [Wed, 12 Mar 2014 02:22:37 +0000 (11:22 +0900)]
ofp-util: Use enum ofp_table_config in struct ofputil_table_mod

Use enum ofp_table_config as the type of the 'config' field
of struct ofputil_table_mod. This reflects the usage
of the field.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoovs-thread: count the number of cpu cores.
Gurucharan Shetty [Mon, 10 Mar 2014 16:59:56 +0000 (09:59 -0700)]
ovs-thread: count the number of cpu cores.

We use the number of cpu cores to determine the number
of threads that we spawn. We are not yet sure what is
the ideal number of OVS userspace threads that can run
on Hyper-V. Till we figure that out, use the same logic
of counting CPU cores in Windows too.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agowindows: Add stub headers for windows.
Gurucharan Shetty [Mon, 10 Mar 2014 17:06:52 +0000 (10:06 -0700)]
windows: Add stub headers for windows.

Windows does not have a bunch of headers that
are available in Linux. Instead of littering the code
with #ifndef _WIN32, add stub headers.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agobyte-order: htonll() and ntohll() for Windows.
Gurucharan Shetty [Mon, 10 Mar 2014 16:53:58 +0000 (09:53 -0700)]
byte-order: htonll() and ntohll() for Windows.

These functions exist, so don't provide them.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agoutil: Maximum path length for Windows.
Gurucharan Shetty [Mon, 10 Mar 2014 16:16:08 +0000 (09:16 -0700)]
util: Maximum path length for Windows.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agovlog: Array intialization for Windows.
Gurucharan Shetty [Mon, 10 Mar 2014 15:39:44 +0000 (08:39 -0700)]
vlog: Array intialization for Windows.

Visual studio does not understand array initialization
done this way:
[first ... last] = value

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agotests: Test learned flow idle timeouts.
Joe Stringer [Fri, 7 Mar 2014 01:20:27 +0000 (17:20 -0800)]
tests: Test learned flow idle timeouts.

The previous tests would check that a single learned flow had its stats
correctly attributed to the right interfaces and flows. These new tests
take it a step further by causing two different learned flows to be
created, and checking the stats are correct. This is done for rules that
are learned with idle and hard timeouts.

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoofproto-dpif: Use 'struct dpif_stats' for stats.
Joe Stringer [Fri, 7 Mar 2014 01:20:26 +0000 (17:20 -0800)]
ofproto-dpif: Use 'struct dpif_stats' for stats.

This tidies up the code to be more consistent by using the stats
structure more widely.

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agomirror: Use 'struct ref_count' for refcounting.
Joe Stringer [Fri, 7 Mar 2014 01:20:25 +0000 (17:20 -0800)]
mirror: Use 'struct ref_count' for refcounting.

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agonetflow: Make netflow_flow_update() parameter const.
Joe Stringer [Fri, 7 Mar 2014 01:20:24 +0000 (17:20 -0800)]
netflow: Make netflow_flow_update() parameter const.

The 'flow' parameter is not modified, so mark it const.

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoREADME-lisp: improve LISP documentation
Lorand Jakab [Tue, 11 Mar 2014 17:02:28 +0000 (19:02 +0200)]
README-lisp: improve LISP documentation

People familiar with LISP are used to the concept of a mapping cache in
a LISP Tunnel Router.  Explain how that concept maps to OVS flow rules.
Additionally, mention that eth0 need not be added in all example
scenarios.

Signed-off-by: Lorand Jakab <lojakab@cisco.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agonetdev-linux: Remove unnecessary header.
Pravin Shelar [Thu, 6 Feb 2014 20:31:13 +0000 (12:31 -0800)]
netdev-linux: Remove unnecessary header.

netdev-linux does not depend on linux kernel version. So
remove header file include.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agodatapath: Add support for Linux 3.12
Pravin Shelar [Fri, 7 Feb 2014 18:46:53 +0000 (10:46 -0800)]
datapath: Add support for Linux 3.12

Bump kernel support for datapath module to include 3.12.
Make use of native ip-tunnel API for Kernel >= 3.12.

Based on patch from James Page.

Signed-off-by: James Page <james.page@ubuntu.com>
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Reviewed-by: Kyle Mestery <mestery@noironetworks.com>
10 years agoupcall: Configure datapath max-idle through ovs-vsctl.
Joe Stringer [Thu, 6 Mar 2014 00:56:05 +0000 (16:56 -0800)]
upcall: Configure datapath max-idle through ovs-vsctl.

This patch adds a new configuration option, "max-idle" to the
Open_vSwitch "other-config" column. This sets how long datapath flows
are cached in the datapath before revalidators expire them.

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Justin Pettit <jpettit@nicira.com>
10 years agogetrusage-windows: getrusage() for Windows.
Gurucharan Shetty [Thu, 6 Mar 2014 20:55:53 +0000 (12:55 -0800)]
getrusage-windows: getrusage() for Windows.

We use getrusage mainly to get user CPU time and system CPU time.
Windows has a GetProcessTimes and GetThreadTimes that does the
same job. So use them.

We also use getrusage to get page faults. Use GetProcessMemoryInfo()
for that.

We also get number of context switches, block i/o times and use it for
debug information when we wake up from poll_block late. I haven't found
functions for that in Windows. We only use it for debug information, so
it should be okay not implementing it.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Co-authored-by: Linda Sun <lsun@vmware.com>
Signed-off-by: Linda Sun <lsun@vmware.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agotimeval: gettimeofday() for Windows.
Gurucharan Shetty [Mon, 3 Mar 2014 22:13:03 +0000 (14:13 -0800)]
timeval: gettimeofday() for Windows.

Use GetSystemTimePreciseAsFileTime() for gettimeofday().
GetSystemTimePreciseAsFileTime() provides the result that is more
high resolution than just the microsecond that gittimeofday() in
Linux provides. So we need to remove some additional precision.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agotimeval: clock_gettime() for Windows.
Gurucharan Shetty [Mon, 3 Mar 2014 21:27:35 +0000 (13:27 -0800)]
timeval: clock_gettime() for Windows.

QueryPerformanceCounter() retrieves the current value of the performance
counter, which is a high resolution (<1us) time stamp that can be used for
time-interval measurements. So, use it for MONOTONIC clock.

The GetSystemTimePreciseAsFileTime() function retrieves the current system date
and time with the highest possible level of precision (<1us). Use it for
real time clock. This function returns a counter representing the number of
100-nanosecond intervals since January 1, 1601. To make it compatible with
Linux CLOCK_REALTIME, we need to calculate the 100-nanoseconds counter value
till 01/01/1970.

An upcoming commit implements gettimeofday() using the same clock, so,
carve out a function.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agoMakefile: Compile Linux-specific files based on __linux__ macro.
Ben Pfaff [Thu, 23 Jan 2014 23:35:22 +0000 (15:35 -0800)]
Makefile: Compile Linux-specific files based on __linux__ macro.

We want to conditionally compile several files based on whether we're
building for a Linux host, so we need some Automake conditional for that.
Previously this was based on whether Netlink is available and we're not
on ESX (since ESX has Netlink but isn't Linux), but it's more
straightforward to just test for Linux directly.

CC: Luigi Rizzo <rizzo@iet.unipi.it>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoUse __linux__ instead of LINUX_DATAPATH in C code.
Ben Pfaff [Thu, 23 Jan 2014 23:33:25 +0000 (15:33 -0800)]
Use __linux__ instead of LINUX_DATAPATH in C code.

The LINUX_DATAPATH C preprocessor symbol was originally meant to be used as
a signal for whether the Linux datapath module could be used, but it was
used as a proxy for a lot of other stuff that is really just Linux
specific.  This commit switches all of these users to just test for
__linux__, which is more straightforward and should have the same result.

CC: Luigi Rizzo <rizzo@iet.unipi.it>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoMakefile: Remove unnecessary includes of SSL_LIBS.
Gurucharan Shetty [Tue, 4 Mar 2014 21:23:53 +0000 (13:23 -0800)]
Makefile: Remove unnecessary includes of SSL_LIBS.

SSL_LIBS are needed for libopenvswitch and we include that
in lib/automake.mk. It is not necessary to include it
for every executable.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agotimeval: localtime_r, gmtime_r for Windows.
Gurucharan Shetty [Tue, 4 Mar 2014 00:13:46 +0000 (16:13 -0800)]
timeval: localtime_r, gmtime_r for Windows.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agoovs-thread: Add xpthread_barrier_*() wrappers.
Joe Stringer [Tue, 4 Mar 2014 21:15:41 +0000 (13:15 -0800)]
ovs-thread: Add xpthread_barrier_*() wrappers.

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agotunnel: Do not set padding bits in tunnel mask.
Ben Pfaff [Sun, 2 Mar 2014 01:15:00 +0000 (17:15 -0800)]
tunnel: Do not set padding bits in tunnel mask.

On most architectures other than 32-bit x86, struct flow_tnl ends with 4
padding bytes.  Until now, tnl_xlate_init() set those bytes to nonzero
values in the wildcard mask.  When the wildcard mask passed through Netlink
attributes and back to userspace, the padding bytes of course became zero
again, which caused a wildcard mask mismatch and premature deletion of the
flow in revalidation.  This commit fixes the problem.

Bug #1192516.
Reported-by: Krishna Miriyala <miriyalak@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
10 years agoodp-util: Include tun_id when nonzero even if "key" flag not set.
Ben Pfaff [Sun, 2 Mar 2014 01:11:02 +0000 (17:11 -0800)]
odp-util: Include tun_id when nonzero even if "key" flag not set.

When a flow_tnl is being translated to Netlink attributes, the tun_id field
was included only if the FLOW_TNL_F_KEY flag was set.  This meant that for
a mask, where one would not necessarily expect that flag to be set even if
there were a key, the tun_id could be omitted even if it were nonzero.
This led to kernel flows that did not match on a field that was required
to be matched (possibly causing incorrect treatment of packets) and
premature deletion of kernel flows due to mask mismatch.  This commit
fixes the problem.

Bug #1192516.
Reported-by: Krishna Miriyala <miriyalak@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
10 years agovconn: Fix vconn_get_status() return value when connection in progress.
Ben Pfaff [Sat, 1 Mar 2014 00:20:17 +0000 (16:20 -0800)]
vconn: Fix vconn_get_status() return value when connection in progress.

When a connection takes a few rounds of the state machine to complete,
'error' gets filled with EAGAIN until that completes.  This didn't match
the vconn_get_status() documentation, which says that it only returns a
positive errno value if there was an error.  One could fix the problem
by updating the documentation (and the callers) or by updating the
implementation.  I decided that the latter was the way to go because
the distinction between the TCP connection being in progress or complete
isn't visible to the client; what is visible to the client is the OpenFlow
negotiation being complete.

This problem is difficult to find in the unit tests because TCP connections
to localhost complete immediately.

Bug introduced by commit accaecc419cc57d (rconn: Discover errors in
rconn_run() even if rconn_recv() is never called.)

Reported-by: Anuprem Chalvadi <achalvadi@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agosparse: add defintions to include/sparse/netinet/in.h
Andy Zhou [Thu, 27 Feb 2014 02:51:54 +0000 (18:51 -0800)]
sparse: add defintions to include/sparse/netinet/in.h

Fixed sparse undefined symbol warnings.

Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agolib: make wevent static
Andy Zhou [Thu, 27 Feb 2014 02:51:04 +0000 (18:51 -0800)]
lib: make wevent static

Fixed sparse non static symbol warning.

Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Acked-by: Gurucharan Shetty <gshetty@nicira.com>
10 years agolib: simplify flow_extract() API
Andy Zhou [Thu, 27 Feb 2014 02:08:04 +0000 (18:08 -0800)]
lib: simplify flow_extract() API

Change the flow_extract() API to accept struct pkt_metadata,
instead of individual metadata fields. It will make the API more
logical and easier to maintain when we need to expand metadata
down the road.

Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>¬
10 years agodatapath: Correctly report flow used times for first 5 minutes after boot.
Ben Pfaff [Fri, 28 Feb 2014 21:12:04 +0000 (13:12 -0800)]
datapath: Correctly report flow used times for first 5 minutes after boot.

The kernel starts out its "jiffies" timer as 5 minutes below zero, as
shown in include/linux/jiffies.h:

  /*
   * Have the 32 bit jiffies value wrap 5 minutes after boot
   * so jiffies wrap bugs show up earlier.
   */
  #define INITIAL_JIFFIES ((unsigned long)(unsigned int) (-300*HZ))

The loop in ovs_flow_stats_get() starts out with 'used' set to 0, then
takes any "later" time.  This means that for the first five minutes after
boot, flows will always be reported as never used, since 0 is greater than
any time already seen.

Bug #1192516.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
10 years agoman: Document common options in ovs-vsctl and vtep-ctl.
Justin Pettit [Thu, 27 Feb 2014 00:30:29 +0000 (16:30 -0800)]
man: Document common options in ovs-vsctl and vtep-ctl.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agovtep-ctl: Print schema version when called with "--version".
Justin Pettit [Thu, 27 Feb 2014 00:29:49 +0000 (16:29 -0800)]
vtep-ctl: Print schema version when called with "--version".

Issue #16648

Suggested-by: Anupam Chanda <achanda@nicira.com>
Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agoovs-vsctl: Print schema version when called with "--version".
Justin Pettit [Thu, 27 Feb 2014 00:29:00 +0000 (16:29 -0800)]
ovs-vsctl: Print schema version when called with "--version".

Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agoovsdb-idlc: Make schema version available.
Justin Pettit [Thu, 27 Feb 2014 00:18:33 +0000 (16:18 -0800)]
ovsdb-idlc: Make schema version available.

Future patches will make use of the ability to retrieve the schema
version against which they were compiled.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agoovsdb-doc: Include schema version in generated man pages.
Justin Pettit [Wed, 26 Feb 2014 21:50:47 +0000 (13:50 -0800)]
ovsdb-doc: Include schema version in generated man pages.

Suggested-by: Bruce Davie <bdavie@vmware.com>
Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agovtep: Include OVS version number in VTEP man page.
Justin Pettit [Wed, 26 Feb 2014 21:49:39 +0000 (13:49 -0800)]
vtep: Include OVS version number in VTEP man page.

Suggested-by: Bruce Davie <bdavie@vmware.com>
Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agodpif: New function flow_dump_next_may_destroy_keys().
Joe Stringer [Thu, 27 Feb 2014 22:13:10 +0000 (14:13 -0800)]
dpif: New function flow_dump_next_may_destroy_keys().

This new function allows callers to determine whether previously
returned keys will be modified or reallocated on the next call to
dpif_flow_dump_next(). This will be used in a future commit to allow
batched flow deletion by revalidator threads.

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agodpif: Don't synchronize flow_dump_next() status.
Joe Stringer [Thu, 27 Feb 2014 22:13:09 +0000 (14:13 -0800)]
dpif: Don't synchronize flow_dump_next() status.

Recent changes to the flow_dump_next() interface have made it the
responsibility of the dpif implementation to track error status over a
flow dump operation.

This patch removes status tracking from 'struct dpif_flow_dump', allowing
multiple threads to call dpif_flow_dump_next() and track their status
independently. Even if one thread finishes processing flows for a given
iterator and state, it will not prevent other callers from processing
the remaining flows in their buffers.

After this patch, the error code that dpif_flow_dump_next() returns is
only significant for the current state and buffer. As before, the status
of the entire flow dump operation can be obtained by calling
dpif_flow_dump_done().

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agodpif: Make dpif_flow_dump_next() thread-safe.
Joe Stringer [Thu, 27 Feb 2014 22:13:08 +0000 (14:13 -0800)]
dpif: Make dpif_flow_dump_next() thread-safe.

This patch makes it the caller's responsibility to initialize a
per-thread 'state' object and pass it down to the dpif_flow_dump_next()
implementation. The implementation can expect to be called from multiple
threads with the same 'iter' and different 'state' objects.

When flow_dump_next() returns non-zero, the implementation must ensure
that subsequent calls with the same arguments also return non-zero.
Subsequent calls with the same 'iter' and different 'state' may return
zero, but should make progress towards returning non-zero.

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agodpif: Separate local and shared flow dump state.
Joe Stringer [Thu, 27 Feb 2014 22:13:07 +0000 (14:13 -0800)]
dpif: Separate local and shared flow dump state.

This patch separates the structures for thread-local flow dump state
("state") from the shared flow dump state ("iter") in dpif-linux and
dpif-netdev. Future patches will make use of this to allow multiple
threads to dump flows from the same flow dump operation.

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agonetlink: Make nl_dump_next() thread-safe.
Joe Stringer [Thu, 27 Feb 2014 22:13:06 +0000 (14:13 -0800)]
netlink: Make nl_dump_next() thread-safe.

This patch modifies 'struct nl_dump' and nl_dump_next() to allow
multiple threads to share the same nl_dump. These changes are targeted
around synchronizing dump status between multiple callers, and
allowing callers to fully process their existing buffers before
determining whether to stop fetching flows.

The 'status' field of 'struct nl_dump' becomes atomic, so that multiple
threads may check and/or update it to communicate when there is an error
or the netlink dump is finished. The low bit holds whether the final
message was seen, while the higher bits hold an errno value.

nl_dump_next() will now read all messages from the given buffer before
checking the shared error status and attempting to fetch more. Multiple
threads may call this with the same nl_dump, but must provide
independent buffers. As previously, the final dump status can be
determined by calling nl_dump_done() from a single thread.

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agonetlink: Remove buffer from 'struct nl_dump'.
Joe Stringer [Thu, 27 Feb 2014 22:13:05 +0000 (14:13 -0800)]
netlink: Remove buffer from 'struct nl_dump'.

This patch makes all of the users of 'struct nl_dump' allocate their own
buffers to pass down to nl_dump_next(). This paves the way for allowing
multithreaded flow dumping.

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoofproto-dpif.at: Avoid races in MPLS tests
YAMAMOTO Takashi [Thu, 27 Feb 2014 06:36:59 +0000 (15:36 +0900)]
ofproto-dpif.at: Avoid races in MPLS tests

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>