[ovs-dev] [PATCH] tunnel-push-pop.at: Make test more deterministic.

Jarno Rajahalme jrajahalme at nicira.com
Fri Nov 21 23:44:48 UTC 2014


On Nov 21, 2014, at 3:22 PM, Pravin Shelar <pshelar at nicira.com> wrote:

> On Thu, Nov 20, 2014 at 2:13 PM, Jarno Rajahalme <jrajahalme at nicira.com> wrote:
>> Using the '-march=native' broke this test in a i7 laptop, most likely
>> due to a different hash implementation, which resulted in different
>> datapath port number assignment accross different compilations.
>> 
>> Break up the ports setup so that the datapath port number assignment
>> is more deterministic.
>> 
>> Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
> I just have following question. Otherwise looks good.
> 
> Acked-by: Pravin B Shelar <pshelar at nicira.com>
> 

Thanks for the review. I have answered your question below

Pushed to master,

  Jarno

>> ---
>> tests/tunnel-push-pop.at |   20 ++++++++++----------
>> 1 file changed, 10 insertions(+), 10 deletions(-)
>> 
>> diff --git a/tests/tunnel-push-pop.at b/tests/tunnel-push-pop.at
>> index c552dd2..f9ea4c0 100644
>> --- a/tests/tunnel-push-pop.at
>> +++ b/tests/tunnel-push-pop.at
>> @@ -6,21 +6,21 @@ dnl ovs router is commands are only supported on Linux for now.
>> AT_SKIP_IF([test "$IS_WIN32" = "yes"])
>> AT_SKIP_IF([test "$IS_BSD" = "yes"])
>> 
>> -OVS_VSWITCHD_START([add-port br0 p0 -- set Interface p0 type=dummy ofport_request=1\
>> -                    -- add-br int-br -- set bridge int-br datapath_type=dummy \
>> -                    -- add-port int-br t2 -- set Interface t2 type=vxlan \
>> +OVS_VSWITCHD_START([add-port br0 p0 -- set Interface p0 type=dummy ofport_request=1])
>> +AT_CHECK([ovs-vsctl add-br int-br -- set bridge int-br datapath_type=dummy], [0])
>> +AT_CHECK([ovs-vsctl add-port int-br t2 -- set Interface t2 type=vxlan \
>>                        options:remote_ip=1.1.2.92 options:key=123 ofport_request=2\
>>                     -- add-port int-br t1 -- set Interface t1 type=gre \
>> -                       options:remote_ip=1.1.2.92 options:key=456 ofport_request=3])
>> +                       options:remote_ip=1.1.2.92 options:key=456 ofport_request=3], [0])
> 
> is there reason for not making this ports addition into separate vsctl commands?
> 

Due to the way vxlan ODP port number is assigned, no.

>> 
>> AT_CHECK([ovs-appctl dpif/show], [0], [dnl
>> dummy at ovs-dummy: hit:0 missed:0
>>        br0:
>>                br0 65534/100: (dummy)
>> -               p0 1/3: (dummy)
>> +               p0 1/1: (dummy)
>>        int-br:
>>                int-br 65534/2: (dummy)
>> -               t1 3/1: (gre: key=456, remote_ip=1.1.2.92)
>> +               t1 3/3: (gre: key=456, remote_ip=1.1.2.92)
>>                t2 2/4789: (vxlan: key=123, remote_ip=1.1.2.92)
>> ])
>> 
>> @@ -41,15 +41,15 @@ IP               MAC                 Bridge
>> ])
>> 
>> dnl Check VXLAN tunnel pop
>> -AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(3),eth(src=f8:bc:12:44:34:b6,dst=f8:bc:12:46:58:e0),eth_type(0x0800),ipv4(src=1.1.2.92,dst=1.1.2.88,proto=17,tos=0,ttl=64,frag=no),udp(src=51283,dst=4789)'], [0], [stdout])
>> +AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=f8:bc:12:44:34:b6,dst=f8:bc:12:46:58:e0),eth_type(0x0800),ipv4(src=1.1.2.92,dst=1.1.2.88,proto=17,tos=0,ttl=64,frag=no),udp(src=51283,dst=4789)'], [0], [stdout])
>> AT_CHECK([tail -1 stdout], [0],
>>   [Datapath actions: tnl_pop(4789)
>> ])
>> 
>> dnl Check GRE tunnel pop
>> -AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(3),eth(src=f8:bc:12:44:34:b6,dst=f8:bc:12:46:58:e0),eth_type(0x0800),ipv4(src=1.1.2.92,dst=1.1.2.88,proto=47,tos=0,ttl=64,frag=no)'], [0], [stdout])
>> +AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=f8:bc:12:44:34:b6,dst=f8:bc:12:46:58:e0),eth_type(0x0800),ipv4(src=1.1.2.92,dst=1.1.2.88,proto=47,tos=0,ttl=64,frag=no)'], [0], [stdout])
>> AT_CHECK([tail -1 stdout], [0],
>> -  [Datapath actions: tnl_pop(1)
>> +  [Datapath actions: tnl_pop(3)
>> ])
>> 
>> dnl Check VXLAN tunnel push
>> @@ -63,7 +63,7 @@ dnl Check GRE tunnel push
>> AT_CHECK([ovs-ofctl add-flow int-br action=3])
>> AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth_type(0x0800),ipv4(src=1.1.3.88,dst=1.1.3.112,proto=47,tos=0,ttl=64,frag=no)'], [0], [stdout])
>> AT_CHECK([tail -1 stdout], [0],
>> -  [Datapath actions: tnl_push(tnl_port(1),header(size=42,type=3,eth(dst=f8:bc:12:44:34:b6,src=aa:55:aa:55:00:00,dl_type=0x0800),ipv4(src=1.1.2.88,dst=1.1.2.92,proto=47,tos=0,ttl=64,frag=0x40),gre((flags=0x20,proto=0x6558),key=0x1c8)),out_port(100))
>> +  [Datapath actions: tnl_push(tnl_port(3),header(size=42,type=3,eth(dst=f8:bc:12:44:34:b6,src=aa:55:aa:55:00:00,dl_type=0x0800),ipv4(src=1.1.2.88,dst=1.1.2.92,proto=47,tos=0,ttl=64,frag=0x40),gre((flags=0x20,proto=0x6558),key=0x1c8)),out_port(100))
>> ])
>> 
>> OVS_VSWITCHD_STOP
>> --
>> 1.7.10.4
>> 
>> _______________________________________________
>> dev mailing list
>> dev at openvswitch.org
>> http://openvswitch.org/mailman/listinfo/dev




More information about the dev mailing list