ofproto: Update facet stats when used time increases.
authorEthan Jackson <ethan@nicira.com>
Thu, 3 Mar 2011 23:57:10 +0000 (15:57 -0800)
committerEthan Jackson <ethan@nicira.com>
Fri, 4 Mar 2011 00:21:24 +0000 (16:21 -0800)
ofproto/ofproto.c

index 2efb03afd32a6e4be217c9a51417ad3639471fd7..590b792a1bce25a3a9614275ead739d8f744fd4f 100644 (file)
@@ -3896,7 +3896,7 @@ static void
 facet_update_stats(struct ofproto *ofproto, struct facet *facet,
                    const struct dpif_flow_stats *stats)
 {
-    if (stats->n_packets) {
+    if (stats->n_packets || stats->used > facet->used) {
         facet_update_time(ofproto, facet, stats->used);
         facet->packet_count += stats->n_packets;
         facet->byte_count += stats->n_bytes;