[ovs-dev] [PATCHv5 11/12] revalidator: Distinguish new and duplicate flows.

Joe Stringer joestringer at nicira.com
Mon Sep 15 02:25:17 UTC 2014


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 at nicira.com>
---
v5: No change.
v4: Initial post.
---
 ofproto/ofproto-dpif-upcall.c |   13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c
index 1333d41..dea3304 100644
--- a/ofproto/ofproto-dpif-upcall.c
+++ b/ofproto/ofproto-dpif-upcall.c
@@ -48,7 +48,8 @@ VLOG_DEFINE_THIS_MODULE(ofproto_dpif_upcall);
 
 COVERAGE_DEFINE(handler_install_conflict);
 COVERAGE_DEFINE(upcall_ukey_contention);
-COVERAGE_DEFINE(revalidate_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,
@@ -1763,9 +1764,13 @@ revalidate(struct revalidator *revalidator)
 
             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(revalidate_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;
             }
-- 
1.7.10.4




More information about the dev mailing list