ofproto-dpif-xlate: Remove obsolete comment.

Nothing about the existing code in this function cares whether Goto-Table
is the last action.

Signed-off-by: Ben Pfaff <blp@nicira.com>
OF 1.1 pop vlan compatibility.

Store the original action code with the strip vlan action,
so that it can be printed back properly.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
meta-flow: Inline mf_from_id().

mf_from_id accesses a static table, so the compiler should be able to
completely optimize it away.

Also use OVS_PACKED_ENUM to waste less space.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
OXM inspired match field names.

Adds OXM inspired aliases for match fields that don't have them
already ("ip_proto", "ip_ecn", "ip_dscp", and "tunnel_id").

"ip_dscp" replaces the earlier undocumented "nw_tos_shifted",
and takes the DSCP value (0-63), which is then shifted
appropriately when applied to an IP packet.
The number of bits for this field is fixed from 8 to 6.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ovsdb-tool: replace tabs with spaces

Signed-off-by: Alexandru Copot <alex.mihai.c@gmail.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Native Set-Field action.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ofp-actions: Set-Field OF 1.0/1.1 compatibility.

Output set field actions as standard OF1.0/1.1 set actions or to
reg_load instructions, when a compatible set action(s) do not exist.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ofp-actions: Simplify interface and internal structure.

This makes later changes simpler.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ofp-actions: Send deprecated actions as set fields.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ofp-util: Move ofputil_check_output_port() to ofp-actions, rename.

This function is related to actions to ofp-actions seems like a logical
place for it.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
ofp-util: Enforce OpenFlow 1.1+ table_id requirements in flow_mod messages.

Signed-off-by: Ben Pfaff <blp@nicira.com>
ofproto: Centralize action checking, doing it at decode time.

Jarno pointed out that modify_flows__() didn't really need to check every
instance of the flow separately.  After some further investigation I
decided that this was even more of an improvement.

CC: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
lib/ofp-actions: Warn on deprecated actions.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Add OF11 SET MPLS LABEL and SET MPLS TC actions.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Reviewed-by: Simon Horman <horms@verge.net.au>
ofproto-dpif: Implement group callbacks

This is a first step towards implementing the dpif side of groups.

In order to be useful the action translation code needs
to be taught about groups.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ofproto: Verify compatibility of liveness of groups with their type

Require liveness for fast-failover groups as it is mandated by OpenFlow1.3.
Allow livness for select groups which is in keeping with OpenFlow1.3.
Disallow liveness it for other group types.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ofproto-provider: Fix typo in comment.

Reported-by: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
util: Allow set_subprogram_name() to take a printf() format string.

This will be convenient in an upcoming commit.

I had to add -Wno-format-zero-length to suppress a GCC warning about a
zero-length format string in this monitor_daemon() call:
    set_subprogram_name("");
I don't know what that warning is good for anyway, and I guess the Clang
developers don't either because Clang didn't warn.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
ofproto-dpif-upcall: Give each miss_handler thread a unique name.

This may occasionally make debugging easier.

Suggested-by: Keith Amidon <keith@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
flow: Fill in ->l7 in flow_compose().

flow_extract() fills in ->l7 but flow_compose() wasn't doing it, which
confused bfd_process_packet() when invoked via the ofproto/trace appctl
command.

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