Re: [Qemu-devel] [PATCH V2 2/3] COLO-compare: Optimize compare_common and compare_tcp

2017-03-02 Thread Jason Wang
On 2017年03月02日 16:15, Zhang Chen wrote: On 03/02/2017 03:51 PM, Jason Wang wrote: On 2017年02月28日 14:11, Zhang Chen wrote: OK, How about this? +/* + * Because of ppkt and spkt are both in the same connection, + * The ppkt's src ip, dst ip, src port, dst port, ip_proto all

Re: [Qemu-devel] [PATCH V2 2/3] COLO-compare: Optimize compare_common and compare_tcp

2017-03-02 Thread Zhang Chen
On 03/02/2017 03:51 PM, Jason Wang wrote: On 2017年02月28日 14:11, Zhang Chen wrote: OK, How about this? +/* + * Because of ppkt and spkt are both in the same connection, + * The ppkt's src ip, dst ip, src port, dst port, ip_proto all are + * same with spkt. In addition, IP

Re: [Qemu-devel] [PATCH V2 2/3] COLO-compare: Optimize compare_common and compare_tcp

2017-03-01 Thread Jason Wang
On 2017年02月28日 14:11, Zhang Chen wrote: OK, How about this? +/* + * Because of ppkt and spkt are both in the same connection, + * The ppkt's src ip, dst ip, src port, dst port, ip_proto all are + * same with spkt. In addition, IP header's Identification is a random +

Re: [Qemu-devel] [PATCH V2 2/3] COLO-compare: Optimize compare_common and compare_tcp

2017-02-27 Thread Zhang Chen
On 02/28/2017 01:47 PM, Jason Wang wrote: On 2017年02月28日 13:18, Zhang Chen wrote: Add offset args for colo_packet_compare_common, optimize colo_packet_compare_icmp() and colo_packet_compare_udp() just compare the IP payload. Before compare all tcp packet, we compare tcp checksum firstly,

Re: [Qemu-devel] [PATCH V2 2/3] COLO-compare: Optimize compare_common and compare_tcp

2017-02-27 Thread Jason Wang
On 2017年02月28日 13:18, Zhang Chen wrote: Add offset args for colo_packet_compare_common, optimize colo_packet_compare_icmp() and colo_packet_compare_udp() just compare the IP payload. Before compare all tcp packet, we compare tcp checksum firstly, this function can get better performance.

[Qemu-devel] [PATCH V2 2/3] COLO-compare: Optimize compare_common and compare_tcp

2017-02-27 Thread Zhang Chen
Add offset args for colo_packet_compare_common, optimize colo_packet_compare_icmp() and colo_packet_compare_udp() just compare the IP payload. Before compare all tcp packet, we compare tcp checksum firstly, this function can get better performance. Signed-off-by: Zhang Chen