diff options
author | Simon Horman <horms@verge.net.au> | 2013-09-27 06:55:19 +0900 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2013-09-27 09:18:06 -0700 |
commit | b0a17866c3145fd35e844e1b66c499c55ecf6f1d (patch) | |
tree | 3446a17bda4a9a0194f9d1ead184d3b4e297d9f2 /utilities | |
parent | e15653c927a9aed6bf0e88b0ea49a665c7131e5d (diff) |
Remove mpls_depth field from flow
Rather than tracking the MPLS depth as a field in the
flow, which is an entirely poor place for it, just track
the delta to the MPLS depth during translation.
This logic was developed while implementing recirculation
and intended to be used to detect when recirculation should
occur. This variant of the patch uses the logic to determine
if processing of actions should stop due to an MPLS
action which cannot be translated (without recirculation).
A side-effect of this patch is that it resolves a bug
whereby ovs-vswitchd will abort due to to an assertion
on eth_type_mpls(ctx->xin->flow.dl_type) in compose_mpls_pop_action(()
if the actions of a flow include pop_mpls twice without
a push_mpls in between.
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'utilities')
-rw-r--r-- | utilities/ovs-dpctl.c | 2 | ||||
-rw-r--r-- | utilities/ovs-ofctl.8.in | 16 |
2 files changed, 7 insertions, 11 deletions
diff --git a/utilities/ovs-dpctl.c b/utilities/ovs-dpctl.c index 98b47b8d..9c98cdae 100644 --- a/utilities/ovs-dpctl.c +++ b/utilities/ovs-dpctl.c @@ -1112,7 +1112,7 @@ dpctl_normalize_actions(int argc, char *argv[]) printf("no vlan: "); } - if (af->flow.mpls_depth) { + if (eth_type_mpls(af->flow.dl_type)) { printf("mpls(label=%"PRIu32",tc=%d,ttl=%d): ", mpls_lse_to_label(af->flow.mpls_lse), mpls_lse_to_tc(af->flow.mpls_lse), diff --git a/utilities/ovs-ofctl.8.in b/utilities/ovs-ofctl.8.in index 55547f1b..c43b48c7 100644 --- a/utilities/ovs-ofctl.8.in +++ b/utilities/ovs-ofctl.8.in @@ -1068,21 +1068,17 @@ from the IP TTL (64 if the packet is not IP). If the packet does already contain an MPLS label, pushes a new outermost label as a copy of the existing outermost label. .IP -There are some limitations in the implementation. \fBpush_mpls\fR -followed by another \fBpush_mpls\fR will result in the first -\fBpush_mpls\fR being discarded. +A limitation of the implementation is that processing of actions will stop +if \fBpush_mpls\fR follows another \fBpush_mpls\fR unless there is a +\fBpop_mpls\fR in between. . .IP \fBpop_mpls\fR:\fIethertype\fR Strips the outermost MPLS label stack entry. Currently the implementation restricts \fIethertype\fR to a non-MPLS Ethertype and thus \fBpop_mpls\fR should only be applied to packets with -an MPLS label stack depth of one. -. -.IP -There are some limitations in the implementation. \fBpop_mpls\fR -followed by another \fBpush_mpls\fR without an intermediate -\fBpush_mpls\fR will result in the first \fBpush_mpls\fR being -discarded. +an MPLS label stack depth of one. A further limitation is that processing of +actions will stop if \fBpop_mpls\fR follows another \fBpop_mpls\fR unless +there is a \fBpush_mpls\fR in between. . .IP \fBmod_dl_src\fB:\fImac\fR Sets the source Ethernet address to \fImac\fR. |