ofproto: Avoid abandoning an ofopgroup without committing it.

Commit e3b5693319c (Fix table checking for goto table instruction.) moved
action checking into modify_flows__(), for good reason, but as a side
effect made modify_flows__() abandon and never commit the ofopgroup that it
started, if action checking failed.  This commit fixes the problem.

The following commands, run under "make sandbox", illustrate the problem.
Without this change, the final command hangs because the barrier request
that ovs-ofctl sends never gets a response (because barriers wait for all
ofopgroups to complete, which never happens).  With this commit, the
commands complete quickly:

ovs-vsctl add-br br0
ovs-vsctl set bridge br0 protocols=OpenFlow10,OpenFlow11,OpenFlow12,OpenFlow13
ovs-ofctl add-flow -O OpenFlow11 br0 table=1,action=goto_table:2
ovs-ofctl add-flow -O OpenFlow11 br0 table=1,action=goto_table:1

Reported-by: Jarno Rajahalme <jrajahalme@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ofproto: Use ofproto_check_ofpacts() from modify_flows__().

Until now this code has called ofpacts_check() directly, but that omits
the additional check that the ofproto_check_ofpacts() wrapper includes.

Reported-by: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
datapath: Enable all GSO features on internal port.

OVS already can handle all types of segmentation offloads that
are supported by the kernel.
Following patch specifically enables UDP and IPV6 segmentation
offloads.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Widen TCP flags handling.

Widen TCP flags handling from 7 bits (uint8_t) to 12 bits (uint16_t).
The kernel interface remains at 8 bits, which makes no functional
difference now, as none of the higher bits is currently of interest
to the userspace.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
TCP flags matching support.

    tcp_flags=flags/mask
        Bitwise  match on TCP flags.  The flags and mask are 16-bit num‐
        bers written in decimal or in hexadecimal prefixed by 0x.   Each
        1-bit  in  mask requires that the corresponding bit in port must
        match.  Each 0-bit in mask causes the corresponding  bit  to  be
        ignored.

        TCP  protocol  currently  defines  9 flag bits, and additional 3
        bits are reserved (must be transmitted as zero), see  RFCs  793,
        3168, and 3540.  The flag bits are, numbering from the least
	significant bit:

        0: FIN No more data from sender.

        1: SYN Synchronize sequence numbers.

        2: RST Reset the connection.

        3: PSH Push function.

        4: ACK Acknowledgement field significant.

        5: URG Urgent pointer field significant.

        6: ECE ECN Echo.

        7: CWR Congestion Windows Reduced.

        8: NS  Nonce Sum.

        9-11:  Reserved.

        12-15: Not matchable, must be zero.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
vswitch.xml: Improve documentation for BFD.

This update improves the BFD documentation in a few ways:

   - Demand mode is now supported.

   - Wordsmithing, spelling, etc.

   - Attempt to better explain decay_min_rx, forwarding_if_rx, and
     cpath_down.

   - Break into subgroups for configuration and status, to better explain
     which party sets which fields.

   - Reindents to match the rest of vswitch.xml.

Because of the reindentation, this patch may be easier to view with spacing
changes suppressed.

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