Allow processing of RARP packets.

With this commit, the datapath will process the ARP header for
RARP packets.  It also fixes a bug whereby if the ARP opcode is
something other than ARP request or reply, the key_len is not
adjusted to include ARP info.

Signed-off-by: Mehak Mahajan <mmahajan@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
datapath: Fix zero key tunnels.

Datapath tunneling check for flag OVS_FLOW_TNL_F_KEY is failing,
causing it to drop packet. This only happens on tunnels with
zero key as vswitchd does not generate set-tunnel action. Set
tunnel action sets this flags for given action. To fix this issue
the check is dropped.

Bug #13666

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Kyle Mestery <kmestery@cisco.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Prepare for 1.9.0.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Prepare for post-1.9.0 (1.9.90).

Signed-off-by: Ben Pfaff <blp@nicira.com>
ovs-ctl.in: Don't save flows if the daemons are not running.

When a 'ovs-ctl restart' is executed and the userspace daemons
like ovsdb-server and ovs-vswitchd are not running, attempt to
save flows can wait forever. This also results in the daemons
from not getting started.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
xenserver, rhel, debian: Use ovs-ctl restart.

ovs-ctl has a new command called "restart" which
saves and restores the openflow flows on bridges.
Use that command from the init scripts when doing
a "restart --save-flows=yes".

Also, the debian package postinst script can
set the variable OVS_RESTART_SAVE_FLOWS to "yes"
to ask for save and restore of flows.

Feature #13555.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
debian: Save openflow flows during package upgrade.

When debian package for openvswitch-switch is upgraded,
export a variable, OVS_RESTART_SAVE_FLOWS=yes.
This will save the openflow flows in vswitchd and
re-apply it after the upgrade.

Feature #13555.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
timeval: Take a backtrace on each SIGALRM.

With this patch, timeval will take a backtrace with each SIGALRM
allowing it to retrieve a profiling snapshot instantly.  This will
be useful in future patches when backtraces are logged.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
timeval: Coalesce backtraces with counts.

With this patch, `ovs-appctl backtrace` will return a unique list
of backtraces and a count of how many times it has been recorded.
This work had previously been done by ovs-parse-backtrace. However,
in future patches poll-loop will begin logging backtraces as a
matter of course.  At this point, coalescing the backtraces will
help keep these log messages brief.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
poll-loop: Log backtraces when CPU usage is high.

Often when debugging Open vSwitch, one will see in the logs that
CPU usage has been high for some period of time, but it's totally
unclear why.  In an attempt to remedy the situation, this patch
logs backtraces taken at regular intervals as a poor man's
profiling alternative.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
OF11: push_vlan support

This implementes push_vlan with 802.1Q.
NOTE: 802.1AD (QinQ) is not supported. It requires another effort.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
netdev-vport: Disable Path MTU Discovery by default

In near future we will switch to the flow-based tunneling and drop path
MTU discovery support. This patch prepares for that by changing the default
PMTUD value from 'enabled' to 'disabled'.

Signed-off-by: Ansis Atteka <aatteka@nicira.com>
ovs-save: Use timeout option for ovs-vsctl

Running ovs-save directly to save datapath configuration can
wait forever if ovsdb-server is not running. Use a timeout.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
timeval: Fix occasional backtrace() related deadlock.

Occasionally, backtrace() will deadlock in the signal handler
because it does some non signal safe initialization.  Specifically,
it opens a shared object.  As a work around, this patch forces
backtrace() to run outside of a signal handler, so that future
calls will perform as expected.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
debian: Automatically up the slave interfaces of a bond.

When physical interfaces are added to a bond through the
/etc/network/interfaces script, administratively 'up' the
slave interfaces.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
flow: Set ttl in flow_compose().

Thanks to Ben Pfaff for immediately pinpointing the likely location of
the issue.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ovs-ctl.in: Do not fail 'restart'.

ovs-ctl restart is called by the debian package upgrade.
We do not want to fail the package upgrade just because
restoring of flows failed.

The error message will still be printed on the console.

Bug #13730.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
ofproto-dpif: Fix "ofproto/trace" of flow for local port.

The 'in_port' variable is an OpenFlow port, not an ODP port, so we should
not translate it to ODP.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
netdev-vport: Warn users that pmtud is deprecated

This is a complementary patch to the other one I sent out previously.
The purpose of it is to make it more obvious that tunnel pmtud is
deprecated and will be removed soon.

Requested-by: Jesse Gross <jesse@nicira.com>
Signed-off-by: Ansis Atteka <aatteka@nicira.com>
Merge branch 'master' of git://openvswitch.org/openvswitch into vxlan

Conflicts:
	lib/netdev-vport.c