From: Joe Stringer Date: Wed, 23 Apr 2014 03:31:17 +0000 (+1200) Subject: revalidator: Prevent handling the same flow twice. X-Git-Tag: sliver-openvswitch-2.2.90-1~3^2~87 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=73a3c4757e596ff156d40f41496a0264373e5bc4;hp=73a3c4757e596ff156d40f41496a0264373e5bc4;p=sliver-openvswitch.git revalidator: Prevent handling the same flow twice. When the datapath flow table is modified while a flow dump operation is in progress, it is possible for the same flow to be dumped twice. In such cases, revalidators may perform redundant work, or attempt to delete the same flow twice. This was causing intermittent testsuite failures for test #670 - "ofproto-dpif, active-backup bonding" where a flow (that had not previously been dumped) was dumped, revalidated and deleted twice. The logs show errors such as: "failed to flow_get (No such file or directory) skb_priority(0),..." "failed to flow_del (No such file or directory) skb_priority(0),..." This patch adds a 'flow_exists' field to 'struct udpif_key' to track whether the flow is (in progress) to be deleted. After doing a ukey lookup, we check whether ukey->mark or ukey->flow indicates that the flow has already been handled. If it has already been handled, we skip handling the flow again. We also defer ukey cleanup for flows that fail revalidation, so that the ukey will still exist if the same flow is dumped twice. This allows the above logic to work in this case. Signed-off-by: Joe Stringer Acked-by: Alex Wang ---