[ovs-dev] [PATCH] ofproto: Fix MPLS multiple Push pop action.

Pravin Shelar pshelar at nicira.com
Fri Dec 19 20:28:56 UTC 2014


On Fri, Dec 19, 2014 at 11:17 AM, Joe Stringer <joestringer at nicira.com> wrote:
> On 15 December 2014 at 12:37, Pravin B Shelar <pshelar at nicira.com> wrote:
>> vSwitchd does not generate correct MPLS actions for multiple
>> MPLS push or pop action.
>> Datapath can handle multiple push action for in single action list.
>> But for after first MPLS pop it needs to recirculate packet to
>> refill packet key. Following patch fixes it accordingly.
>>
>> Reported-by: Stefano Salsano <stefano.salsano at uniroma2.it>
>> Signed-off-by: Pravin B Shelar <pshelar at nicira.com>
>> ---
>> <snip>
>
>> diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c
>> index 5a2b883..9b75df3 100644
>> --- a/ofproto/ofproto-dpif-xlate.c
>> +++ b/ofproto/ofproto-dpif-xlate.c
>> @@ -3274,9 +3274,6 @@ compose_mpls_push_action(struct xlate_ctx *ctx, struct ofpact_push_mpls *mpls)
>>          }
>>          ctx->exit = true;
>>          return;
>> -    } else if (n >= ctx->xbridge->max_mpls_depth) {
>> -        COVERAGE_INC(xlate_actions_mpls_overflow);
>> -        ctx->xout->slow |= SLOW_ACTION;
>>      }
>>
>>      flow_push_mpls(flow, n, mpls->ethertype, wc);
>
> Travis and local build report errors on clang:
>
> ../ofproto/ofproto-dpif-xlate.c:64:1: error: unused function
> 'xlate_actions_mpls_overflow_add' [-Werror,-Wunused-function]
> COVERAGE_DEFINE(xlate_actions_mpls_overflow);
> ^
> ../lib/coverage.h:71:28: note: expanded from macro 'COVERAGE_DEFINE'
>         static inline void COUNTER##_add(unsigned int n)                \
>                            ^
> <scratch space>:34:1: note: expanded from here
> xlate_actions_mpls_overflow_add
> ^
> 1 error generated.
>
>
> We could remove the coverage counter, or re-add the COVERAGE_INC()
> call if we think it's worthwhile to track these.

I removed this coverage counter, Thanks for the bug report.



More information about the dev mailing list