Correct set_ethertype() to take into account MPLS label stack

Signed-off-by: Simon Horman <horms@verge.net.au>
local: Update MFF_VLAN_VID check

This updates the check to make it consistent with upstream,
but it may break compatibility with OpenFlow 1.0.
In upstream there are two different MFF VLAN values,
they may both be needed here.

Signed-off-by: Simon Horman <horms@verge.net.au>
Terminate action commital on 0 MPLS TTL

Signed-off-by: Simon Horman <horms@verge.net.au>
Actually use supplied dl_type argument of push_vlan when adding a vlan tag

Signed-off-by: Simon Horman <horms@verge.net.au>
Do not update packet->l3 pop_mpls

pop_mpls() modifies packet->data before packet->l3 and thus
packet->l3 should not be modified as it is already correct.

Without this change subsequent l3 changes packet, for example
updating the IP TTL, would result in a corrupted packet as
an incorrect packet-l3 is used as the basis for such changes.

Signed-off-by: Simon Horman <horms@verge.net.au>
ofproto-dpif: track changes in MPLS stack depth for controller action

Track changes in MPLS stack depth to allow one level of push and pop to be
correctly executed on packets when executing a controller action

Signed-off-by: Simon Horman <horms@verge.net.au>
ofproto-dpif: Set flow's vlan_tci to only VLAN_CFI when translating VLAN push

This causes a VLAN tag to be pushed regardless of weather or not
a VID is subsequently set.

Signed-off-by: Simon Horman <horms@verge.net.au>