Skip to content

Commit

Permalink
revalidator: Re-fix a flow duplication bug.
Browse files Browse the repository at this point in the history
Commit 73a3c47 (revalidator: Prevent handling the same flow twice.)
fixed a bug where duplicated flows could be deleted twice. Commit
7d17009 (ofproto-dpif-upcall: Remove the flow_dumper thread.)
partially re-introduced this bug.

The bug would cause the logs to show messages 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 fixes the issue again.

Signed-off-by: Joe Stringer <[email protected]>
Acked-by: Alex Wang <[email protected]>
  • Loading branch information
joestringer committed May 21, 2014
1 parent fe5c0d6 commit d579d3a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ofproto/ofproto-dpif-upcall.c
Original file line number Diff line number Diff line change
Expand Up @@ -1381,12 +1381,14 @@ revalidate(struct revalidator *revalidator)
hash);
bool mark;

if (!used && ukey) {
if (ukey) {
bool already_dumped;

ovs_mutex_lock(&ukey->mutex);
already_dumped = ukey->mark || !ukey->flow_exists;
used = ukey->created;
if (!used) {
used = ukey->created;
}
ovs_mutex_unlock(&ukey->mutex);

if (already_dumped) {
Expand Down

0 comments on commit d579d3a

Please sign in to comment.