2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-27 15:18:06 +00:00

revalidator: Distinguish new and duplicate flows.

We previously counted flows that have been installed during the current
dump as duplicates, rather than recognising them as new flows. This
patch separates the counters out for these two cases.

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
Joe Stringer
2014-09-26 17:28:05 +00:00
parent 447b65822d
commit ec47af519b

View File

@@ -45,7 +45,8 @@
VLOG_DEFINE_THIS_MODULE(ofproto_dpif_upcall);
COVERAGE_DEFINE(upcall_duplicate_flow);
COVERAGE_DEFINE(dumped_duplicate_flow);
COVERAGE_DEFINE(dumped_new_flow);
COVERAGE_DEFINE(revalidate_missed_dp_flow);
/* A thread that reads upcalls from dpif, forwards each upcall's packet,
@@ -1548,15 +1549,19 @@ revalidate(struct revalidator *revalidator)
/* We couldn't acquire the ukey. This means that
* another revalidator is processing this flow
* concurrently, so don't bother processing it. */
COVERAGE_INC(upcall_duplicate_flow);
COVERAGE_INC(dumped_duplicate_flow);
continue;
}
already_dumped = ukey->dump_seq == dump_seq;
if (already_dumped) {
/* The flow has already been dumped and handled by another
* revalidator during this flow dump operation. Skip it. */
COVERAGE_INC(upcall_duplicate_flow);
/* The flow has already been handled during this flow dump
* operation. Skip it. */
if (ukey->xcache) {
COVERAGE_INC(dumped_duplicate_flow);
} else {
COVERAGE_INC(dumped_new_flow);
}
ovs_mutex_unlock(&ukey->mutex);
continue;
}