[ovs-dev] [PATCH] revalidator: Fetch stats on revalidation failure.

Joe Stringer joestringer at nicira.com
Wed Feb 26 01:02:02 UTC 2014


A flow's statistics could be partially lost in the following situation:
* A flow is dumped from the datapath
* Some traffic hits that flow
* Revalidation fails for that flow

Previously, we would delete such a flow without fetching the latest
statistics for it, causing the intermediate statistics to be lost. This
patch fixes the bug by queueing the flow up for deletion and cleanup
along with the other flows that will be deleted.

Signed-off-by: Joe Stringer <joestringer at nicira.com>
---
 ofproto/ofproto-dpif-upcall.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c
index e4f81a1..3478444 100644
--- a/ofproto/ofproto-dpif-upcall.c
+++ b/ofproto/ofproto-dpif-upcall.c
@@ -1534,8 +1534,9 @@ revalidate_udumps(struct revalidator *revalidator, struct list *udumps)
         ukey->mark = true;
 
         if (!revalidate_ukey(udpif, udump, ukey)) {
-            dpif_flow_del(udpif->dpif, udump->key, udump->key_len, NULL);
-            ukey_delete(revalidator, ukey);
+            struct dump_op *dop = &ops[n_ops++];
+
+            dump_op_init(dop, udump->key, udump->key_len, ukey, udump);
         }
 
         list_remove(&udump->list_node);
-- 
1.7.9.5




More information about the dev mailing list