Changes

Jump to navigation Jump to search
52 bytes added ,  06:38, 5 December 2016
Line 42: Line 42:  
== Timestamp ==
 
== Timestamp ==
 
"The sender's timestamp clock is used as a source of monotonic non-decreasing values to stamp the segments"(rfc7323). The Linux kernel uses the jiffies counter as the tcp timestamp.
 
"The sender's timestamp clock is used as a source of monotonic non-decreasing values to stamp the segments"(rfc7323). The Linux kernel uses the jiffies counter as the tcp timestamp.
#define tcp_time_stamp          ((__u32)(jiffies))
     −
We add the TCP_TIMESTAMP options to be able to compensate a difference between jiffies counters, when a connection is migrated on another host. When a connection is dumped, criu calls getsockopt(TCP_TIMESTAMP) to get a current timestamp, then on restore it calls setsockopt(TCP_TIMESTAMP) to set this timestamp as a starting point.
+
<code>#define tcp_time_stamp          ((__u32)(jiffies))</code>
 +
 
 +
We add the <code>TCP_TIMESTAMP</code> options to be able to compensate a difference between jiffies counters, when a connection is migrated on another host. When a connection is dumped, criu calls <code>getsockopt(TCP_TIMESTAMP)</code> to get a current timestamp, then on restore it calls <code>setsockopt(TCP_TIMESTAMP)</code> to set this timestamp as a starting point.
    
== Checkpoint and restore TCP connection ==
 
== Checkpoint and restore TCP connection ==

Navigation menu