Skip to content

Commit

Permalink
ofproto-dpif-upcall: Increment dump_seq before instead of after dump.
Browse files Browse the repository at this point in the history
When process_upcall() passes a miss upcall to upcall_xlate(), the new
ukey's dump_seq member is initialized from the current dump_seq.  Later,
when udpif_revalidator() calls revalidate(), any dumped flow for which
ukey->dump_seq equals the current dump_seq is skipped.  However, until now
the current dump_seq was only incremented *after* a revalidation run is
completed.  That means that, if a ukey added is added between revalidation
runs, it will be skipped on the subsequent revalidation run.  This commit
fixes the problem by incrementing dump_seq just before a revalidation run
instead of just after.

Found with OFTest pktact.SingleWildcardMatchPriority test for OpenFlow 1.0.

CC: Joe Stringer <joe@ovn.org>
Signed-off-by: Ben Pfaff <blp@ovn.org>
  • Loading branch information
blp committed Oct 29, 2018
1 parent 51643ee commit 40dff9e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions ofproto/ofproto-dpif-upcall.c
Expand Up @@ -929,10 +929,9 @@ udpif_revalidator(void *arg)

start_time = time_msec();
if (!udpif->reval_exit) {
bool terse_dump;

terse_dump = udpif_use_ufid(udpif);
udpif->dump = dpif_flow_dump_create(udpif->dpif, terse_dump,
seq_change(udpif->dump_seq);
udpif->dump = dpif_flow_dump_create(udpif->dpif,
udpif_use_ufid(udpif),
NULL);
}
}
Expand Down Expand Up @@ -962,7 +961,6 @@ udpif_revalidator(void *arg)
atomic_read_relaxed(&udpif->flow_limit, &flow_limit);

dpif_flow_dump_destroy(udpif->dump);
seq_change(udpif->dump_seq);
if (netdev_is_offload_rebalance_policy_enabled()) {
udpif_run_flow_rebalance(udpif);
}
Expand Down

0 comments on commit 40dff9e

Please sign in to comment.