diff mbox series

[ovs-dev] ofp_actions: fix typo in set_mpls_tc formatting

Message ID 20210427110022.1057969-1-amorenoz@redhat.com
State Changes Requested
Headers show
Series [ovs-dev] ofp_actions: fix typo in set_mpls_tc formatting | expand

Commit Message

Adrian Moreno April 27, 2021, 11 a.m. UTC
I guess this was a cut-and-paste error from set_mpls_ttl

Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
---
 lib/ofp-actions.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ilya Maximets April 27, 2021, 11:33 a.m. UTC | #1
On 4/27/21 1:00 PM, Adrian Moreno wrote:
> I guess this was a cut-and-paste error from set_mpls_ttl
> 
> Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
> ---
>  lib/ofp-actions.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/ofp-actions.c b/lib/ofp-actions.c
> index 0342a228b..91d810860 100644
> --- a/lib/ofp-actions.c
> +++ b/lib/ofp-actions.c
> @@ -3850,7 +3850,7 @@ static void
>  format_SET_MPLS_TC(const struct ofpact_mpls_tc *a,
>                     const struct ofpact_format_params *fp)
>  {
> -    ds_put_format(fp->s, "%sset_mpls_ttl(%s%"PRIu8"%s)%s",
> +    ds_put_format(fp->s, "%sset_mpls_tc(%s%"PRIu8"%s)%s",
>                    colors.paren, colors.end, a->tc,
>                    colors.paren, colors.end);
>  }
> 

Hi.  Thanks for the fix!

Could you, please, add a unit test for this issue?
You can use following commit as a reference:

  0062a04d8701 ("tests: Add parse-flow tests for MPLS fields.")

Best regards, Ilya Maximets.
Adrian Moreno May 7, 2021, 3:28 p.m. UTC | #2
On 4/27/21 1:33 PM, Ilya Maximets wrote:
> On 4/27/21 1:00 PM, Adrian Moreno wrote:
>> I guess this was a cut-and-paste error from set_mpls_ttl
>>
>> Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
>> ---
>>  lib/ofp-actions.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/lib/ofp-actions.c b/lib/ofp-actions.c
>> index 0342a228b..91d810860 100644
>> --- a/lib/ofp-actions.c
>> +++ b/lib/ofp-actions.c
>> @@ -3850,7 +3850,7 @@ static void
>>  format_SET_MPLS_TC(const struct ofpact_mpls_tc *a,
>>                     const struct ofpact_format_params *fp)
>>  {
>> -    ds_put_format(fp->s, "%sset_mpls_ttl(%s%"PRIu8"%s)%s",
>> +    ds_put_format(fp->s, "%sset_mpls_tc(%s%"PRIu8"%s)%s",
>>                    colors.paren, colors.end, a->tc,
>>                    colors.paren, colors.end);
>>  }
>>
> 
> Hi.  Thanks for the fix!
> 
> Could you, please, add a unit test for this issue?
> You can use following commit as a reference:
> 
>   0062a04d8701 ("tests: Add parse-flow tests for MPLS fields.")
> 

Hi Ilya, sorry I did not answer before.

I've posted v2 including unit test.

> Best regards, Ilya Maximets.
>
diff mbox series

Patch

diff --git a/lib/ofp-actions.c b/lib/ofp-actions.c
index 0342a228b..91d810860 100644
--- a/lib/ofp-actions.c
+++ b/lib/ofp-actions.c
@@ -3850,7 +3850,7 @@  static void
 format_SET_MPLS_TC(const struct ofpact_mpls_tc *a,
                    const struct ofpact_format_params *fp)
 {
-    ds_put_format(fp->s, "%sset_mpls_ttl(%s%"PRIu8"%s)%s",
+    ds_put_format(fp->s, "%sset_mpls_tc(%s%"PRIu8"%s)%s",
                   colors.paren, colors.end, a->tc,
                   colors.paren, colors.end);
 }