openflow-1.2: correct action number

The number 13, 14 aren't used.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ovs-brcompatd: Fix sending replies to kernel requests.

Commit 7d7447 (netlink: Postpone choosing sequence numbers until send
time.) broke ovs-brcompatd because it prevented userspace replies to
kernel requests from using the correct sequence numbers.  This commit fixes
it.

Atzm Watanabe found the root cause and provided an alternative patch to
avoid the problem.

Reported-by: André Ruß <andre.russ@hybris.com>
Reported-by: Atzm Watanabe <atzm@stratosphere.co.jp>
Tested-by: Atzm Watanabe <atzm@stratosphere.co.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
openflow: Rename OFP_VLAN_NONE as OFP10_VLAN_NONE

* Remove duplicate definition of OFP_VLAN_NONE
* Rename OFP_VLAN_NONE as OFP10_VLAN_NONE as it appears to be
  only used by OpenFlow 1.0.

As suggested by Ben Pfaff.

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

It isn't used anymore and keeping it up-to-date is error-prone.

Signed-off-by: Ben Pfaff <blp@nicira.com>
ofp-util: Add comment to ofputil_postappend_stats_reply().

It seemed like it could use one.

Signed-off-by: Ben Pfaff <blp@nicira.com>
ovs-check-dead-ifs: Tolerate processes that disappear during run.

os.listdir("/proc/%d/fd" % pid) throws OSError if 'pid' died since the
list of pids was obtained.

Bug #12375.
Reported-by: Amey Bhide <abhide@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
bond: Don't send learning packets on STABLE bonds.

Stable bonds require upstream switch support to avoid confusing
learning tables.  Therefore, sending learning packets on these
bonds doesn't make a lot of sense.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
bond: Sending learning packets on active-backup.

Suppose we have an active bond with two ports, eth1 and eth2,
attached to a standard L2 learning switch which does not know it's
participating in a bond (i.e. isn't running LACP).  Suppose eth1 is
active and therefore the L2 learning switch is forwarding traffic
to eth1 as instructed by its learning table.  Now suppose, for some
reason, OVS fails over from eth1 to eth2.  For each destination
MAC, the L2 learning switch will continue sending traffic to eth1,
which will be dropped, until either traffic from that MAC appears
on eth2, or the learning table entries expire.

To alleviate this issue, this patch sends learning packets on newly
active interfaces in active-backup bonds in order to educate the
upstream network of the change.

Requested-by: Frido Roose <fr.roose@gmail.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
ofproto: Always include ofproto name in log messages.

Otherwise the log messages can be confusing when there's more than one
bridge.

Reported-by: Jacob Cherkas <jcherkas@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ovs-vswitchd: Log datapath ID in a more user-friendly way.

The layering between ofproto and ovs-vswitchd caused the datapath ID to be
logged in a needlessly confusing way.  First, ofproto would log its
default datapath ID:

     using datapath ID 0000505400000004

then the bridge code would immediately determine the datapath ID that it
wanted and call ofproto_set_datapath_id(), which would log the change

     datapath ID changed to 0000111122223333

This commit stops logging the default datapath ID, which is never actually
visible in OpenFlow.  This should make the log files easier to understand.

Bug #12164.
Reported-by: Jacob Cherkas <jcherkas@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ovs-lib: Support old versions of strace.

The ovs-lib strace wrapper requires the -D (run tracer process as a
detached grandchild, not as parent) option which does not exist in
older versions.  This patch falls back to attaching to the running
process when the -D option does not exists.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
ofproto: Fix typos in comments.

This corrects the spelling of the OFOPERATION_* constants.

Signed-off-by: Ben Pfaff <blp@nicira.com>
ovs-ofctl: Fix typos in manpage.

Signed-off-by: Ben Pfaff <blp@nicira.com>
nicira-ext: Fix wrong information in comment.

The priority of exact-match flows is ignored only for the OF1.0 flow match
format, never for NXM.

Signed-off-by: Ben Pfaff <blp@nicira.com>
ofproto: Make ofoperation_create() return the new operation.

This seems like sensible return value semantics to me, even though the new
operation is also available through rule->pending.

This is a code cleanup only that should not affect behavior.

Signed-off-by: Ben Pfaff <blp@nicira.com>
ipsec gre: Don't cache bad ovs-monitor-ipsec pid values.

Commit 2a586a5 (ipsec gre: Do not reread ovs monitor ipsec pidfile in
netdev vport so much) attempts to cache the pid of ovs-monitor-ipsec so
that it's not re-checked so often.  Unfortunately, it also cached error
returns, so errors never recover.  This commit continues to check for
the process's existence after an error.

Issue #12399

Reported-by: Paul Ingram <paul@nicira.com>
Signed-off-by: Justin Pettit <jpettit@nicira.com>
debian: Add "netbase" dependency for /etc/protocols.

ovs-ctl.in uses /etc/protocols, which is in the "netbase" package, so a
dependency is required.

Debian bug #680537.
CC: 680537@bugs.debian.org
Reported-by: Bastian Blank <waldi@debian.org>
Signed-off-by: Ben Pfaff <blp@nicira.com>
debian: Remove obsolete advice to edit /etc/default/openvswitch-switch.

This hasn't been necessary for a long time.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Rename static functions to increase uniqueness.

Rename do_* in ovs-dpctl and ovs-ofctl command with "dpctl_" or "ofctl_"
prefix.

Rename add_flow with dp_netdev_flow_add in lib/dpif-netdev.c.

Signed-off-by: Arun Sharma <arun.sharma@calsoftinc.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
cfm: Remove sequence fault reason.

Commit 2b540ecb (Added handling of previously ignored cfm faults.)
made the CFM code trigger a fault when a packet is received with an
out of order sequence number.  This means that if even one CFM
probe is dropped, a fault will be triggered because the next
received probe's sequence would be two greater than the last.  This
is in conflict with the 802.1ag requirement that 3.5 dropped probes
triggers fault.

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