[ovs-dev] [PATCH] Revert "revalidator: Use xcache when revalidation is required."

Joe Stringer joestringer at nicira.com
Mon Jun 23 07:52:03 UTC 2014


This reverts commit a48c85b2d672505b89e488d28066538705b94942. The commit
was causing intermittent testsuite failures and unexpected re-install of
stale mac-learning entries.

VMware-BZ: 1268574

Reported-by: Len Gao <leng at vmware.com>
Signed-off-by: Joe Stringer <joestringer at nicira.com>
---
I'd like to take another stab at getting the referenced patch right, but
it's better to revert it for the moment until we're more sure of a fix.
---
 ofproto/ofproto-dpif-upcall.c |   16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c
index b38f226..4f214f7 100644
--- a/ofproto/ofproto-dpif-upcall.c
+++ b/ofproto/ofproto-dpif-upcall.c
@@ -1147,17 +1147,10 @@ revalidate_ukey(struct udpif *udpif, struct udpif_key *ukey,
     }
 
     may_learn = push.n_packets > 0;
-    if (ukey->xcache) {
+    if (ukey->xcache && !udpif->need_revalidate) {
         xlate_push_stats(ukey->xcache, may_learn, &push);
-        if (udpif->need_revalidate) {
-            xlate_cache_clear(ukey->xcache);
-            push.n_packets = 0;
-            push.n_bytes = 0;
-            may_learn = false;
-        } else {
-            ok = true;
-            goto exit;
-        }
+        ok = true;
+        goto exit;
     }
 
     error = xlate_receive(udpif->backer, NULL, ukey->key, ukey->key_len, &flow,
@@ -1166,6 +1159,9 @@ revalidate_ukey(struct udpif *udpif, struct udpif_key *ukey,
         goto exit;
     }
 
+    if (udpif->need_revalidate) {
+        xlate_cache_clear(ukey->xcache);
+    }
     if (!ukey->xcache) {
         ukey->xcache = xlate_cache_new();
     }
-- 
1.7.10.4




More information about the dev mailing list