On Thu, Jan 16, 2014 at 04:10:43PM -0800, Ben Pfaff wrote: > On Wed, Jan 15, 2014 at 04:13:23PM +0900, Simon Horman wrote: > > This is an proposed enhancement to > > "Implement OpenFlow support for MPLS, for up to 3 labels." > > > > This makes the conservative assumption that the datapath should > > not be asked to apply MPLS push actions such that the resulting > > packet will have an MPLS label stack depth greater than the > > datapath can accept in a match. > > > > In future it may be possible to use recirculation to handle > > such cases. > > > > Signed-off-by: Simon Horman <ho...@verge.net.au> > > I think that we can handle these in userspace with SLOW_ACTION, so I > changed this patch to just the following:
Does this approach work in the case where n < ctx->xbridge->max_mpls_depth && n >= ARRAY_SIZE(flow->mpls_lse) ? > > diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c > index 28079be..017074e 100644 > --- a/ofproto/ofproto-dpif-xlate.c > +++ b/ofproto/ofproto-dpif-xlate.c > @@ -51,6 +51,7 @@ > > COVERAGE_DEFINE(xlate_actions); > COVERAGE_DEFINE(xlate_actions_oversize); > +COVERAGE_DEFINE(xlate_actions_mpls_overflow); > > VLOG_DEFINE_THIS_MODULE(ofproto_dpif_xlate); > > @@ -2127,17 +2128,9 @@ compose_mpls_push_action(struct xlate_ctx *ctx, struct > ofpact_push_mpls *mpls) > ctx->xout->slow |= commit_odp_actions(flow, &ctx->base_flow, > &ctx->xout->odp_actions, > &ctx->xout->wc); > - } else if (n >= ARRAY_SIZE(flow->mpls_lse)) { > - if (ctx->xin->packet != NULL) { > - static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5); > - VLOG_WARN_RL(&rl, "bridge %s: dropping packet which after an " > - "MPLS push action will have more MPLS LSEs than " > - "the %"PRIuSIZE" that can be handled.", > - ctx->xbridge->name, ARRAY_SIZE(flow->mpls_lse)); > - } > - ctx->exit = true; > - ofpbuf_clear(&ctx->xout->odp_actions); > - return; > + } else if (n >= ctx->xbridge->max_mpls_depth) { > + COVERAGE_INC(xlate_actions_mpls_overflow); > + ctx->xout->slow |= SLOW_ACTION; > } > > flow_push_mpls(flow, mpls->ethertype, wc); > _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev