aboutsummaryrefslogtreecommitdiff
path: root/net/colo.c
diff options
context:
space:
mode:
authorZhang Chen <zhangchen.fnst@cn.fujitsu.com>2017-07-04 14:53:50 +0800
committerJason Wang <jasowang@redhat.com>2017-07-17 20:13:48 +0800
commitada1a33f9a690b95d32115b38b88a33cb66c83bd (patch)
tree791f16e563bca412faabee8dea8151d1eb25aacd /net/colo.c
parent00d5c2406bceb2eb5b77b47948311bf3ef8653a7 (diff)
downloadqemu-ada1a33f9a690b95d32115b38b88a33cb66c83bd.zip
qemu-ada1a33f9a690b95d32115b38b88a33cb66c83bd.tar.gz
qemu-ada1a33f9a690b95d32115b38b88a33cb66c83bd.tar.bz2
net/colo.c: Make vnet_hdr_len as packet property
We can use this property flush and send packet with vnet_hdr_len. Signed-off-by: Zhang Chen <zhangchen.fnst@cn.fujitsu.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'net/colo.c')
-rw-r--r--net/colo.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/colo.c b/net/colo.c
index 8cc166b..180eaed 100644
--- a/net/colo.c
+++ b/net/colo.c
@@ -153,13 +153,14 @@ void connection_destroy(void *opaque)
g_slice_free(Connection, conn);
}
-Packet *packet_new(const void *data, int size)
+Packet *packet_new(const void *data, int size, int vnet_hdr_len)
{
Packet *pkt = g_slice_new(Packet);
pkt->data = g_memdup(data, size);
pkt->size = size;
pkt->creation_ms = qemu_clock_get_ms(QEMU_CLOCK_HOST);
+ pkt->vnet_hdr_len = vnet_hdr_len;
return pkt;
}