diff options
author | Zhang Chen <zhangchen.fnst@cn.fujitsu.com> | 2016-09-27 10:22:30 +0800 |
---|---|---|
committer | Jason Wang <jasowang@redhat.com> | 2016-09-27 17:54:22 +0800 |
commit | 0682e15b19b2f41c0568142b42518b9471168597 (patch) | |
tree | b3777775b2a4d24bf338317bcd5c39231a004245 /net/colo.h | |
parent | b6540d403d28d9ecbbf0ab76b82fb0fa92dc75ce (diff) |
colo-compare: introduce packet comparison thread
If primary packet is same with secondary packet,
we will send primary packet and drop secondary
packet, otherwise notify COLO frame to do checkpoint.
If primary packet comes but secondary packet does not,
after REGULAR_PACKET_CHECK_MS milliseconds we set
the primary packet as old_packet,then do a checkpoint.
Signed-off-by: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>
Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'net/colo.h')
-rw-r--r-- | net/colo.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/colo.h b/net/colo.h index c511bcdeb9..9a7d5e027a 100644 --- a/net/colo.h +++ b/net/colo.h @@ -17,6 +17,7 @@ #include "slirp/slirp.h" #include "qemu/jhash.h" +#include "qemu/timer.h" #define HASHTABLE_MAX_SIZE 16384 @@ -40,6 +41,8 @@ typedef struct Packet { }; uint8_t *transport_header; int size; + /* Time of packet creation, in wall clock ms */ + int64_t creation_ms; } Packet; typedef struct ConnectionKey { |