> On Mar 17, 2015, at 2:08 PM, Ben Pfaff <[email protected]> wrote:
>
> 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 <[email protected]>
>
> 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:
Agreed, _IF is a better suffix here.
>> +#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.
>
Wrapped CHECK_MPLS_RECIRCULATION() with an “if” statement.
> Acked-by: Ben Pfaff <[email protected] <mailto:[email protected]>>
Thanks for the review!
Jarno
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev