From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59155) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfMbv-0005HU-EX for qemu-devel@nongnu.org; Thu, 01 Sep 2016 03:40:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bfMbr-0007Vy-8A for qemu-devel@nongnu.org; Thu, 01 Sep 2016 03:40:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53306) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfMbr-0007Vt-2O for qemu-devel@nongnu.org; Thu, 01 Sep 2016 03:40:27 -0400 References: <1471421428-26379-1-git-send-email-zhangchen.fnst@cn.fujitsu.com> <1471421428-26379-8-git-send-email-zhangchen.fnst@cn.fujitsu.com> <0157f0bc-ffce-ed18-1c03-d9d706235609@redhat.com> From: Jason Wang Message-ID: <716023b0-30de-4ed4-b6d5-b2d3ad76c8a9@redhat.com> Date: Thu, 1 Sep 2016 15:40:21 +0800 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH V12 07/10] colo-compare: add TCP, UDP, ICMP packet comparison List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Zhang Chen , qemu devel Cc: Li Zhijian , "eddie . dong" , "Dr . David Alan Gilbert" , zhanghailiang On 2016=E5=B9=B409=E6=9C=8801=E6=97=A5 13:00, Zhang Chen wrote: >>> + /* >>> + * The 'identification' field in the IP header is *very* random >>> + * it almost never matches. Fudge this by ignoring differences = in >>> + * unfragmented packets; they'll normally sort themselves out=20 >>> if different >>> + * anyway, and it should recover at the TCP level. >>> + * An alternative would be to get both the primary and=20 >>> secondary to rewrite >>> + * somehow; but that would need some sync traffic to sync the=20 >>> state >>> + */ >>> + if (ntohs(ppkt->ip->ip_off) & IP_DF) { >>> + spkt->ip->ip_id =3D ppkt->ip->ip_id; >>> + /* and the sum will be different if the IDs were different *= / >>> + spkt->ip->ip_sum =3D ppkt->ip->ip_sum; >>> + } >>> + >>> + res =3D memcmp(ppkt->data + ETH_HLEN, spkt->data + ETH_HLEN, >>> + (spkt->size - ETH_HLEN)); >> >> This may work but I worry about whether or not tagged packet can work=20 >> here. Looks like parse_packet_early() can recognize vlan tag, but=20 >> fill_connection_key() can not. This looks can result queuing wrong=20 >> packets into wrong connection. > > Currently COLO proxy can't support vlan, we will add this feature in=20 > the future. Looks like current code can still queue vlan packets, please make sure=20 it can't. Thanks