qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH V5 6/9] net/colo-compare.c: Make colo-compare su


From: Zhang Chen
Subject: Re: [Qemu-devel] [PATCH V5 6/9] net/colo-compare.c: Make colo-compare support vnet_hdr_len
Date: Thu, 1 Jun 2017 22:11:17 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0


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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]