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>
datapath: Check gso_type for correct sk_buff in queue_gso_packets().

At the point where it was used, skb_shinfo(skb)->gso_type referred to a
post-GSO sk_buff.  Thus, it would always be 0.  We want to know the pre-GSO
gso_type, so we need to obtain it before segmenting.

Before this change, the kernel would pass inconsistent data to userspace:
packets for UDP fragments with nonzero offset would be passed along with
flow keys that indicate a zero offset (that is, the flow key for "later"
fragments claimed to be "first" fragments).  This inconsistency tended
to confuse Open vSwitch userspace, causing it to log messages about
"failed to flow_del" the flows with "later" fragments.

Bug #12394.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
FAQ: Add FAQ entry about flow normalization.

Signed-off-by: Ben Pfaff <blp@nicira.com>
ofp-actions: Add hex dump of bad actions to log message on error.

This should make debugging easier in such cases.

Bug #12460.
Reported-by: Natasha Gude <natasha@nicira.com>
Reported-by: James Schmidt <jschmidt@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
FAQ: Add FAQ entry for determining OpenFlow port numbers.

I don't understand why, but I've had this question from multiple people
recently.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Add forgotten header

Signed-off-by: Ed Maste <emaste@freebsd.org>
Signed-off-by: Ben Pfaff <blp@nicira.com>
NXM, OXM: Add Flow Label Tests

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
tests: Improve test coverage of OXM metadata field

Signed-off-by: Joe Stringer <joe@wand.net.nz>
Signed-off-by: Ben Pfaff <blp@nicira.com>
cfm: Always initialize CCM "internal_ms_x" extension field.

Found by valgrind:

Syscall param socketcall.sendmsg(msg.msg_iov[i]) points to uninitialised
byte(s)
   at 0x42D3021: sendmsg (in /lib/libc-2.5.so)
   by 0x80E4D23: nl_sock_transact (netlink-socket.c:670)
   by 0x80D9086: dpif_linux_execute__ (dpif-linux.c:872)
   by 0x807D6AE: dpif_execute__ (dpif.c:957)
   by 0x807D6FE: dpif_execute (dpif.c:987)
   by 0x805DED9: send_packet (ofproto-dpif.c:4727)
   by 0x805F8E1: port_run_fast (ofproto-dpif.c:2441)
   by 0x8065CF6: run_fast (ofproto-dpif.c:926)
   by 0x805674F: ofproto_run_fast (ofproto.c:1148)
   by 0x804C957: bridge_run_fast (bridge.c:1980)
   by 0x8053F49: main (ovs-vswitchd.c:123)
  Address 0xbea0895c is on thread 1's stack

Bug #11797.
Signed-off-by: Ben Pfaff <blp@nicira.com>
meta-flow: Reduce redundant transport set/get code

Signed-off-by: Joe Stringer <joe@wand.net.nz>
Signed-off-by: Ben Pfaff <blp@nicira.com>
FAQ: Patch ports are not targeted for upstream.

The previous text was ambiguous.

Reported-by: Konstantin Khorenko <khorenko@openvz.org>
CC: Jesse Gross <jesse@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ovs-vsctl: Correct example for removing a mirror.

Reported-by: Kris zhang <zhang.kris@gmail.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>