[ovs-dev,V2,0/2] fix odp parsing of set masked action

Message ID 1505019607-63461-1-git-send-email-roid@mellanox.com
State Accepted
Headers show

Commit Message

Roi Dayan Sept. 10, 2017, 5 a.m.
Hi,

The first commit is a fix for parsing set masked action
and the second commit is adding a test.

Before the fix the addtion of the tests fails with the following:
# make check TESTSUITEFLAGS=436
# ./tests/ovstest test-odp parse-actions < ./tests/testsuite.dir/0436/actions.txt > outact && diff -up ./tests/testsuite.dir/0436/actions.txt  outact

V1->V2:
    - Small refactor to comments

Thanks,
Roi


Paul Blakey (2):
  lib/odp: Fix handling of set masked action in parse_odp_action
  tests/odp: Add set vlan test to odp testsuite

 lib/odp-util.c | 9 +++++++++
 tests/odp.at   | 5 +++++
 2 files changed, 14 insertions(+)

Comments

Simon Horman Sept. 13, 2017, 1:44 p.m. | #1
On Sun, Sep 10, 2017 at 08:00:05AM +0300, Roi Dayan wrote:
> Hi,
> 
> The first commit is a fix for parsing set masked action
> and the second commit is adding a test.
> 
> Before the fix the addtion of the tests fails with the following:
> # make check TESTSUITEFLAGS=436
> # ./tests/ovstest test-odp parse-actions < ./tests/testsuite.dir/0436/actions.txt > outact && diff -up ./tests/testsuite.dir/0436/actions.txt  outact
> --- ./tests/testsuite.dir/0436/actions.txt      2017-08-27 11:12:05.169261080 +0300
> +++ outact      2017-08-27 11:20:21.175169197 +0300
> @@ -47,11 +47,11 @@ set(ipv6(label=0,proto=10,hlimit=128))
>  set(ipv6(label=0/0xfff,proto=10,tclass=0x70/0x70))
>  set(ipv6(label=0))
>  set(icmpv6(type=1,code=2))
> -set(vlan(vid=5))
> +set(vlan(vid=5/0x0))
>  set(vlan(vid=3,pcp=5))
>  set(vlan(vid=3,pcp=5,cfi=0))
> -set(vlan(vid=5/0x3))
> -set(vlan(vid=5/0x1)),3
> +set(vlan(vid=5/0x0))
> +set(vlan(vid=5/0x0)),***6 leftover bytes*** (010003000000)
>  push_vlan(vid=12,pcp=0)
>  push_vlan(vid=13,pcp=5,cfi=0)
>  push_vlan(tpid=0x9100,vid=13,pcp=5)
> 
> V1->V2:
>     - Small refactor to comments

Thanks, I have applied these to master.

They also seem to be required for branch-2.8.
Let me know if you would like me to apply them there too.
Roi Dayan Sept. 13, 2017, 1:57 p.m. | #2
On 13/09/2017 16:44, Simon Horman wrote:
> On Sun, Sep 10, 2017 at 08:00:05AM +0300, Roi Dayan wrote:
>> Hi,
>>
>> The first commit is a fix for parsing set masked action
>> and the second commit is adding a test.
>>
>> Before the fix the addtion of the tests fails with the following:
>> # make check TESTSUITEFLAGS=436
>> # ./tests/ovstest test-odp parse-actions < ./tests/testsuite.dir/0436/actions.txt > outact && diff -up ./tests/testsuite.dir/0436/actions.txt  outact
>> --- ./tests/testsuite.dir/0436/actions.txt      2017-08-27 11:12:05.169261080 +0300
>> +++ outact      2017-08-27 11:20:21.175169197 +0300
>> @@ -47,11 +47,11 @@ set(ipv6(label=0,proto=10,hlimit=128))
>>   set(ipv6(label=0/0xfff,proto=10,tclass=0x70/0x70))
>>   set(ipv6(label=0))
>>   set(icmpv6(type=1,code=2))
>> -set(vlan(vid=5))
>> +set(vlan(vid=5/0x0))
>>   set(vlan(vid=3,pcp=5))
>>   set(vlan(vid=3,pcp=5,cfi=0))
>> -set(vlan(vid=5/0x3))
>> -set(vlan(vid=5/0x1)),3
>> +set(vlan(vid=5/0x0))
>> +set(vlan(vid=5/0x0)),***6 leftover bytes*** (010003000000)
>>   push_vlan(vid=12,pcp=0)
>>   push_vlan(vid=13,pcp=5,cfi=0)
>>   push_vlan(tpid=0x9100,vid=13,pcp=5)
>>
>> V1->V2:
>>      - Small refactor to comments
> 
> Thanks, I have applied these to master.
> 
> They also seem to be required for branch-2.8.
> Let me know if you would like me to apply them there too.
> 

sure. thanks.
Simon Horman Sept. 13, 2017, 2:23 p.m. | #3
On Wed, Sep 13, 2017 at 04:57:23PM +0300, Roi Dayan wrote:
> 
> 
> On 13/09/2017 16:44, Simon Horman wrote:
> >On Sun, Sep 10, 2017 at 08:00:05AM +0300, Roi Dayan wrote:
> >>Hi,
> >>
> >>The first commit is a fix for parsing set masked action
> >>and the second commit is adding a test.
> >>
> >>Before the fix the addtion of the tests fails with the following:
> >># make check TESTSUITEFLAGS=436
> >># ./tests/ovstest test-odp parse-actions < ./tests/testsuite.dir/0436/actions.txt > outact && diff -up ./tests/testsuite.dir/0436/actions.txt  outact
> >>--- ./tests/testsuite.dir/0436/actions.txt      2017-08-27 11:12:05.169261080 +0300
> >>+++ outact      2017-08-27 11:20:21.175169197 +0300
> >>@@ -47,11 +47,11 @@ set(ipv6(label=0,proto=10,hlimit=128))
> >>  set(ipv6(label=0/0xfff,proto=10,tclass=0x70/0x70))
> >>  set(ipv6(label=0))
> >>  set(icmpv6(type=1,code=2))
> >>-set(vlan(vid=5))
> >>+set(vlan(vid=5/0x0))
> >>  set(vlan(vid=3,pcp=5))
> >>  set(vlan(vid=3,pcp=5,cfi=0))
> >>-set(vlan(vid=5/0x3))
> >>-set(vlan(vid=5/0x1)),3
> >>+set(vlan(vid=5/0x0))
> >>+set(vlan(vid=5/0x0)),***6 leftover bytes*** (010003000000)
> >>  push_vlan(vid=12,pcp=0)
> >>  push_vlan(vid=13,pcp=5,cfi=0)
> >>  push_vlan(tpid=0x9100,vid=13,pcp=5)
> >>
> >>V1->V2:
> >>     - Small refactor to comments
> >
> >Thanks, I have applied these to master.
> >
> >They also seem to be required for branch-2.8.
> >Let me know if you would like me to apply them there too.
> >
> 
> sure. thanks.

Thanks, pushed to branch-2.8.

Patch

--- ./tests/testsuite.dir/0436/actions.txt      2017-08-27 11:12:05.169261080 +0300
+++ outact      2017-08-27 11:20:21.175169197 +0300
@@ -47,11 +47,11 @@  set(ipv6(label=0,proto=10,hlimit=128))
 set(ipv6(label=0/0xfff,proto=10,tclass=0x70/0x70))
 set(ipv6(label=0))
 set(icmpv6(type=1,code=2))
-set(vlan(vid=5))
+set(vlan(vid=5/0x0))
 set(vlan(vid=3,pcp=5))
 set(vlan(vid=3,pcp=5,cfi=0))
-set(vlan(vid=5/0x3))
-set(vlan(vid=5/0x1)),3
+set(vlan(vid=5/0x0))
+set(vlan(vid=5/0x0)),***6 leftover bytes*** (010003000000)
 push_vlan(vid=12,pcp=0)
 push_vlan(vid=13,pcp=5,cfi=0)
 push_vlan(tpid=0x9100,vid=13,pcp=5)