nicira-ext: Fix typo in comment.

Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/meta-flow: introduce a macro, CASE_MFF_REGS, to catch "case MFF_REG<N>:"

Introduce a macro instead for
With this macro, the code is a bit reduced.
test: compile-tested and unit tests passed.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
[blp@nicira.com moved the macro declaration, moved trailing colon from
 macro definition to invocation, adjusted style slightly]
Signed-off-by: Ben Pfaff <blp@nicira.com>
xenserver: Improve efficiency of code by using get_all_records_where()

Replace the get_record() for network references which caused as many
slave-to-master calls as there are Network records plus one.
The get_all_records_where() call gets exactly what is needed with a single
call.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Acked-by: Dominic Curran <dominic.curran@citrix.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
tests: Fix MockXenAPI to make the ovs-xapi-sync test case pass again.

Commit 1dc6839d2d (xenserver: Improve efficiency of code by using
get_all_records_where()) updated the ovs-xapi-sync script and caused a unit
test failure.  This fixes it.

Signed-off-by: Ben Pfaff <blp@nicira.com>
ovs-ctl: Add additional options to strace wrapper.

It's useful to know how long each system call took, and at what
time each system call happened.  In addition this patch causes
strace to print strings more fully allowing log messages to be seen
in the output.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
openflow: Add Open Flow 1.2 to ofp_to_string__()

Signed-off-by: Simon Horman <horms@verge.net.au>
[blp@nicira.com fixed testsuite failure.]
Signed-off-by: Ben Pfaff <blp@nicira.com>
ovs-ofctl: Fix handling of unexpected replies in dump_stats_transaction().

dump_stats_transaction() ignored errors and other non-stats replies to
its request and would continue to wait forever.  This fixes the problem.

Signed-off-by: Ben Pfaff <blp@nicira.com>
ofproto: Report nonexistent ports and queues as errors in queue stats.

Until now, Open vSwitch has ignored missing ports and queues in most cases
in queue stats requests, simply returning an empty set of statistics.
It seems that it is better to report an error, so this commit does this.

Reported-by: Prabina Pattnaik <Prabina.Pattnaik@nechclst.in>
Signed-off-by: Ben Pfaff <blp@nicira.com>
openflow: Move enums for "packet_out" and "flow_mod" to common header.

Reviewed-by: Joe Stringer <joe@wand.net.nz>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Debian packaging to remove system-id.conf

Debian packaging, "--purge" to remove /etc/openvswitch/system-id.conf

Signed-off-by: Arun Sharma <arun.sharma@calsoftinc.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
vlandev: Move Linux #include under #ifdef __linux__

Signed-off-by: Ed Maste <emaste@freebsd.org>
Signed-off-by: Ben Pfaff <blp@nicira.com>
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>
ovs-vswitchd: Call mlockall() from the daemon, not the parent or monitor.

mlockall(2) says:

       Memory  locks  are not inherited by a child created via fork(2) and are
       automatically removed  (unlocked)  during  an  execve(2)  or  when  the
       process terminates.

which means that --mlockall was ineffective in combination with --detach
or --monitor or both.  Both are used in the most common production
configuration of Open vSwitch, so this means that --mlockall has never been
effective in production.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Use UTC consistently instead of local timezone.

Signed-off-by: Arun Sharma <arun.sharma@calsoftinc.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Python daemons: Changed log date time format.

Changed the python daemons log date and time format to keep similar
as C binaries logging format. The date time is in UTC.

Signed-off-by: Arun Sharma <arun.sharma@calsoftinc.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ovs-l3ping: A new test utility that allows to detect L3 tunneling issues

ovs-l3ping is similar to ovs-test, but the main difference
is that it does not require administrator to open firewall
holes for the XML/RPC control connection. This is achieved
by encapsulating the Control Connection over the L3 tunnel
itself.

This tool is not intended as a replacement for ovs-test,
because ovs-test covers much broader set of test cases.

Sample usage:
Node1: ovs-l3ping -s 192.168.122.236,10.1.1.1 -t gre
Node2: ovs-l3ping -c 192.168.122.220,10.1.1.2,10.1.1.1 -t gre

Issue#11791
Signed-off-by: Ansis Atteka <aatteka@nicira.com>
Fix build error on XenServer

A missing backslash broke the build.

Signed-off-by: Ansis Atteka <aatteka@nicira.com>
python: Call 'wait' methods correctly in jsonrpc and stream code.

Bug #12301.
Reported-by: Mike Kruze <mkruze@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ipsec gre: Do not reread ovs monitor ipsec pidfile in netdev vport so much

Instead of rereading ovs-monitor-ipsec pidfile in netdev-vport so much.  It's
probably only necessary to check once if ovs-monitor-ipsec is running,
and then cache the result.  If the result is negative, then it may be
worthwhile to try again the next time someone tries to configure an ipsec
tunnel.

Signed-off-by: Arun Sharma <arun.sharma@calsoftinc.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ofp-util: Add OFPUTIL_ACTION_INVALID to enum ofputil_action_code.

Possibly the ofputil_decode_action() interface should be rethought now
that ofputil_action_code has an invalid value.

Reviewed-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>