On Fri, Mar 13, 2015 at 04:52:01PM -0700, Jarno Rajahalme wrote: > Prior to this patch MPLS recirculation was not performed on a table > lookup following an MPLS_POP action. This patch refactors MPLS > recirculation triggering so that a table action can be re-done after > recirculation if that table action follows an MPLS_POP action. > > Recirculation for a patch port traversal (which also does a table > lookup) after an MPLS_POP action does not need to store the output > action, as recirculation without any post-recirculation actions causes > the table lookup to happen anyway. > > Furthermore, the stack actions now have the same post-MPLS_POP > optimization as the SET_FIELD and MOVE actions had already: > recirculation is triggered only if the register in the action is L3 or > higher. > > Signed-off-by: Jarno Rajahalme <jrajaha...@nicira.com>
This could be implemented as just CHECK_MPLS_RECIRCULATION_COND(true): > +#define CHECK_MPLS_RECIRCULATION() \ > + if (ctx->was_mpls) { \ > + ctx_trigger_recirculation(ctx); \ > + break; \ > + } I might consider naming this CHECK_MPLS_RECIRCULATION_IF instead: > +#define CHECK_MPLS_RECIRCULATION_COND(COND) \ > + if (ctx->was_mpls && (COND)) { \ > + ctx_trigger_recirculation(ctx); \ > + break; \ > + } or even wrap CHECK_MPLS_RECIRCULATION() with an "if" statement. Acked-by: Ben Pfaff <b...@nicira.com> _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev