On 05/26/2017 01:36 PM, Jason Wang wrote:
On 2017年05月26日 13:35, Jason Wang wrote:
On 2017年05月25日 21:18, Zhang Chen wrote:
@@ -472,7 +474,10 @@ static void colo_compare_connection(void
*opaque, void *user_data)
}
if (result) {
- ret = compare_chr_send(&s->chr_out, pkt->data,
pkt->size);
+ ret = compare_chr_send(s,
+ pkt->data,
+ pkt->size,
+ pkt->vnet_hdr_len);
Why not check vnet_hdr support here? And don't we need strip
vnet_hdr here? (Since the redirector on destination does not do this)
If we create a normal qemu guest that use virtio-net-pci driver, the
guest's send packet have the vnet_hdr,
qemu virtio-net-pci driver will strip vnet_hdr then send to external
network. In COLO we just redirect
or mirror the packet, finally the packet will back to primary qemu
virtio-net-pci driver, So we just send
the packet.
Thanks
Zhang Chen
But you send vnet_hdr_len unconditionally, which mean colo-compare
can not work for redirector with vnet_hdr off now?
No, we input vnet_hdr_len unconditionally but in compare_chr_send() use
s->vnet_hdr to
decide whether send the vnet_hdr_len field. so colo-compare can work for
all redirector.
Thanks
Btw, you may consider to update the COLO example in docs for the case
that needs vnet hdr.
Yes, thanks to remind me.
I will add it in next version.
Thanks
Zhang Chen
Thanks
.
--
Thanks
Zhang Chen