[ovs-git] Open vSwitch: dpif-linux: Read flow used time. (master)

dev at openvswitch.org dev at openvswitch.org
Mon Jan 31 22:58:16 UTC 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Open vSwitch".

The branch, master has been updated
       via  9e980142f482f44020f27e5acb7c29e9a8aba9b0 (commit)
       via  ec58547a81246c0f3f7a03ab28ba1a78f1988235 (commit)
      from  3569d18f47f49c115d80033a3661ad31c13d06c9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 9e980142f482f44020f27e5acb7c29e9a8aba9b0
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=9e980142f482f44020f27e5acb7c29e9a8aba9b0
Author: Jesse Gross <jesse at nicira.com>
		
dpif-linux: Read flow used time.
		
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 at nicira.com>


commit ec58547a81246c0f3f7a03ab28ba1a78f1988235
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=ec58547a81246c0f3f7a03ab28ba1a78f1988235
Author: Jesse Gross <jesse at nicira.com>
		
datapath: Fix flow time used computation.
		
The current reporting of flow last used time has two issues that
cause it to incorrectly report the system monotonic time when the
flow was last used.

The first is that it simply converts the stored jiffies value to
milliseconds by scaling with a constant.  This does not work because
jiffies is not zero based and can wrap around on 32-bit platforms.

The second is there is no guarantee that jiffies advances at the
same rate as the RTC based monotonic time that userspace uses.
A variety of factors can cause differences, including system suspend
and clock drift.  These are not too important for relatively short
time periods such as the duration of the flow (nor is the flow timing
precision of extreme importance).  However, when the time being
measured is the duration since system boot (assuming that the above
issues had been addressed) the difference can become significant.

This addresses both issues by restoring behavior similar to the
previous method of computing the flow used time, though in a
slightly different form to reflect the needs of the Netlink code.

Signed-off-by: Jesse Gross <jesse at nicira.com>
Acked-by: Ben Pfaff <blp at nicira.com>


-----------------------------------------------------------------------

Summary of changes:
 datapath/datapath.c |    2 +-
 datapath/flow.c     |   14 ++++++++++++++
 datapath/flow.h     |    1 +
 lib/dpif-linux.c    |    3 +++
 4 files changed, 19 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
Open vSwitch




More information about the git mailing list