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 c35ad62e6c2f8afef5732667f38364dac3adf542..9b84145e2417097ec624d1a99e2494485ad48e8c 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;
 }