aboutsummaryrefslogtreecommitdiff
path: root/net/colo.c
diff options
context:
space:
mode:
authorZhang Chen <zhangchen.fnst@cn.fujitsu.com>2016-09-27 10:22:30 +0800
committerJason Wang <jasowang@redhat.com>2016-09-27 17:54:22 +0800
commit0682e15b19b2f41c0568142b42518b9471168597 (patch)
treeb3777775b2a4d24bf338317bcd5c39231a004245 /net/colo.c
parentb6540d403d28d9ecbbf0ab76b82fb0fa92dc75ce (diff)
downloadqemu-0682e15b19b2f41c0568142b42518b9471168597.zip
qemu-0682e15b19b2f41c0568142b42518b9471168597.tar.gz
qemu-0682e15b19b2f41c0568142b42518b9471168597.tar.bz2
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.c')
-rw-r--r--net/colo.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/colo.c b/net/colo.c
index 40b3b5e..94f5992 100644
--- a/net/colo.c
+++ b/net/colo.c
@@ -143,6 +143,7 @@ Packet *packet_new(const void *data, int size)
pkt->data = g_memdup(data, size);
pkt->size = size;
+ pkt->creation_ms = qemu_clock_get_ms(QEMU_CLOCK_HOST);
return pkt;
}