vswitchd: Log details of unexpected flows, to aid debugging.
authorBen Pfaff <blp@nicira.com>
Thu, 5 Mar 2009 01:30:59 +0000 (17:30 -0800)
committerBen Pfaff <blp@nicira.com>
Thu, 5 Mar 2009 01:34:50 +0000 (17:34 -0800)
vswitchd/bridge.c

index cf4dc45a2d4dc7ce998c506f2fdd1ed9c916f2e7..226832865cd541f629f615a74e17e417b0127ed1 100644 (file)
@@ -2290,7 +2290,12 @@ flowstats_process(struct bridge *br)
                 static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5);
                 f = ft_lookup(new_ft, &flow, hash);
                 if (!f) {
-                    VLOG_WARN_RL(&rl, "unexpected flow in flow table");
+                    if (!VLOG_DROP_WARN(&rl)) {
+                        char *flow_string = flow_to_string(&flow);
+                        VLOG_WARN("unexpected flow in flow table: %s",
+                                  flow_string);
+                        free(flow_string);
+                    }
                     f = ftf_create(&flow, &invalid_dst, 1, flowstats_tag);
                     hmap_insert_fast(&new_ft->flows, &f->node, f->node.hash);
                     f->tags |= flowstats_tag;