> I've been looking at some races in the megaflow testcases recently as well,
> with a slightly different approach, could you a look at my patch below?
> 
> http://openvswitch.org/pipermail/dev/2014-April/038536.html

my patch inserts sleeps between two netdev-dummy/receive calls,
where it's expected that the former packet inserts flow and the
latter one hits it.  i don't think your patch helps this case.

in general, your patch doesn't eliminate the need of "sleep 1"
because it still have a race with dispatcher and upcall handler
threads, does it?

YAMAMOTO Takashi

> 
> 
> On 6 April 2014 14:30, YAMAMOTO Takashi <yamam...@valinux.co.jp> wrote:
> 
>> Signed-off-by: YAMAMOTO Takashi <yamam...@valinux.co.jp>
>> ---
>>  tests/ofproto-dpif.at | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at
>> index 89f2e35..cbb63b4 100644
>> --- a/tests/ofproto-dpif.at
>> +++ b/tests/ofproto-dpif.at
>> @@ -3943,6 +3943,7 @@ in_port=1 actions=output:2
>>  ])
>>  AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
>>  AT_CHECK([ovs-appctl netdev-dummy/receive p1
>> 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
>> +sleep 1  # wait for the datapath flow installed
>>  AT_CHECK([ovs-appctl netdev-dummy/receive p1
>> 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
>>  sleep 1
>>  AT_CHECK([ovs-appctl dpif/dump-flows br0 | STRIP_XOUT], [0], [dnl
>> @@ -4053,6 +4054,7 @@ AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
>>  dnl ECN bits are always copied out, but don't use 0x3 (CE), since that
>>  dnl will cause the packet to be dropped.
>>  AT_CHECK([ovs-appctl netdev-dummy/receive p1
>> 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0xfd,ttl=128,frag=no),icmp(type=8,code=0)'])
>> +sleep 1  # wait for the datapath flow installed
>>  AT_CHECK([ovs-appctl netdev-dummy/receive p1
>> 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0x1,ttl=64,frag=no),icmp(type=8,code=0)'])
>>  AT_CHECK([ovs-appctl netdev-dummy/receive p3
>> 'in_port(3),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0xfd,ttl=128,frag=no),icmp(type=8,code=0)'])
>>  AT_CHECK([ovs-appctl netdev-dummy/receive p3
>> 'in_port(3),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0x1,ttl=64,frag=no),icmp(type=8,code=0)'])
>> --
>> 1.8.3.1
>>
>> _______________________________________________
>> dev mailing list
>> dev@openvswitch.org
>> http://openvswitch.org/mailman/listinfo/dev
>>
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to