From 8017806940cfeaba963d6a6f51ae7573cbea6792 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Fri, 13 Apr 2012 14:15:15 -0700 Subject: [PATCH] ofproto-dpif: Keep subfacet "used" times more up-to-date. handle_flow_miss() didn't update subfacet "used" times for packets processed by userspace. This commit fixes the problem. Found by inspection. I didn't verify the bug in testing. Signed-off-by: Ben Pfaff --- lib/dpif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dpif.c b/lib/dpif.c index febe8b022..73696e4d8 100644 --- a/lib/dpif.c +++ b/lib/dpif.c @@ -678,10 +678,10 @@ void dpif_flow_stats_extract(const struct flow *flow, const struct ofpbuf *packet, struct dpif_flow_stats *stats) { - memset(stats, 0, sizeof(*stats)); stats->tcp_flags = packet_get_tcp_flags(packet, flow); stats->n_bytes = packet->size; stats->n_packets = 1; + stats->used = time_msec(); } /* Appends a human-readable representation of 'stats' to 's'. */ -- 2.43.0