Thanks for feedback, it's been a useful exercise in learning the ropes of 
submitting patches.

Given the fine work by Jarno however, I don't think this patch is required any 
more and am happy enough to let it be abandoned.

Thanks
Tony
________________________________________
From: Ben Pfaff <[email protected]>
Sent: Saturday, 3 December 2016 6:04 a.m.
To: Tony van der Peet
Cc: [email protected]
Subject: Re: [ovs-dev] [PATCH] tests: Test reset_counts in flow_mod message

Thanks for the patch!  One comment below.

On Tue, Nov 29, 2016 at 12:47:57AM +0000, Tony van der Peet wrote:
> diff --git a/tests/ofproto.at b/tests/ofproto.at
> index d360b7a..1723e77 100644
> --- a/tests/ofproto.at
> +++ b/tests/ofproto.at
> @@ -1648,6 +1648,19 @@ OFPST_FLOW reply (OF1.2):
>  OVS_VSWITCHD_STOP
>  AT_CLEANUP
>
> +AT_SETUP([ofproto - mod flow with reset_counts flag - OF1.3])
> +OVS_VSWITCHD_START
> +add_of_ports br0 1 2 3
> +AT_CHECK([ovs-ofctl -O OpenFlow13 add-flow br0 in_port=1,actions=2])
> +ovs-appctl netdev-dummy/receive p1 
> 'in_port(1),eth(src=50:54:00:00:00:07,dst=50:54:00:00:00:05),eth_type(0x0800),ipv4(src=192.168.0.2,dst=192.168.0.1,proto=6,tos=0,ttl=64,frag=no)'
> +AT_CHECK([ovs-ofctl -O openflow13 mod-flows br0 
> reset_counts,in_port=1,actions=3])

There's a race condition above because it's possible that processing the
packet could be delayed past the ovs-ofctl call, so that the reset
happens before the packet is processed.  This kind of race triggers
rarely, but occasionally we do see similar problems when tests are run
on heavily loaded systems.  It's hard to fix this completely, but I'd
recommend putting a 1-second sleep after the netdev-dummy/receive.

> +AT_CHECK([ovs-ofctl -O openflow13 dump-flows br0 | ofctl_strip | sort], [0], 
> [dnl
> + in_port=1 actions=output:3
> +OFPST_FLOW reply (OF1.3):
> +])
> +OVS_VSWITCHD_STOP
> +AT_CLEANUP
> +
>  AT_SETUP([ofproto - del flows with cookies])
>  OVS_VSWITCHD_START
>  AT_CHECK([ovs-ofctl add-flow br0 cookie=0x1,in_port=1,actions=1])
>
> _______________________________________________
> dev mailing list
> [email protected]
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to