dpif-linux: Read flow used time.
authorJesse Gross <jesse@nicira.com>
Sat, 29 Jan 2011 17:41:59 +0000 (09:41 -0800)
committerJesse Gross <jesse@nicira.com>
Mon, 31 Jan 2011 22:57:04 +0000 (14:57 -0800)
We were never storing the flow used time from the Netlink message
into our local struct, which caused flows to timeout prematurely.

Acked-by: Ben Pfaff <blp@nicira.com>
lib/dpif-linux.c

index c35ad62..9b84145 100644 (file)
@@ -1437,6 +1437,9 @@ dpif_linux_flow_from_ofpbuf(struct dpif_linux_flow *flow,
     if (a[ODP_FLOW_ATTR_TCP_FLAGS]) {
         flow->tcp_flags = nl_attr_get(a[ODP_FLOW_ATTR_TCP_FLAGS]);
     }
+    if (a[ODP_FLOW_ATTR_USED]) {
+        flow->used = nl_attr_get(a[ODP_FLOW_ATTR_USED]);
+    }
     return 0;
 }