From nobody Mon Feb 9 12:25:55 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1623141554; cv=none; d=zohomail.com; s=zohoarc; b=A/SqtdJEvwET/FRcjP0q6+RSM+nsVyk7KeHdYEgu7e7ELv5PSdSvBy2GtBVG8DXf8gQwXxTltisq3cGAklLXaxT6aRbk/VccBHbm34vJQ+cthGRItYDy8SF3cccRoOcphTI5t1asxvB572Gvb6HFrmWLvHna0F0qnmvk3YJkDF8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1623141554; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=6+hR9UFKXs32npw6JCloD57IqciI4l+1Il7tgUfIKIY=; b=PmdUVvIDfxooltljkBynG6pHHvTj9KGZt9ZfKs/Zk7aAARn+pcozRrwpAE6CDgM0T8gTJeJ3vU3qNkyCWVdCl71syfYtqhOK67xLzvosPRZDGvWLUiJ+8Dj++Tjr2EN1OiroNnZZJqbikGl9J+95ePl1tM3abQN0AlQIb6p2rIg= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1623141554973548.9640844466682; Tue, 8 Jun 2021 01:39:14 -0700 (PDT) Received: from localhost ([::1]:47282 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lqXGT-0001zr-SA for importer@patchew.org; Tue, 08 Jun 2021 04:39:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35448) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lqX8Z-00042W-PC for qemu-devel@nongnu.org; Tue, 08 Jun 2021 04:31:11 -0400 Received: from mga14.intel.com ([192.55.52.115]:24324) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lqX8X-0000K7-Ti for qemu-devel@nongnu.org; Tue, 08 Jun 2021 04:31:03 -0400 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2021 01:30:55 -0700 Received: from unknown (HELO localhost.localdomain) ([10.239.13.19]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2021 01:30:52 -0700 IronPort-SDR: fucIQFc80KW4HIp22M+aQo6Fje3395JDbATyRTBIkxx9/Ho4ixAyTHVM8YHO1e+V1tzKVQTmpu JONyiFDdIv4A== X-IronPort-AV: E=McAfee;i="6200,9189,10008"; a="204614549" X-IronPort-AV: E=Sophos;i="5.83,257,1616482800"; d="scan'208";a="204614549" IronPort-SDR: 0WY5fKPPMLUwjepzoqv80+oOuwgL7mzho/uUYxnf4I/Kh+yDBZIklg3Shh8s2ne1+sr8KBmuzO OmF+7TvEy5dw== X-IronPort-AV: E=Sophos;i="5.83,257,1616482800"; d="scan'208";a="481862959" From: Zhang Chen To: Jason Wang , qemu-dev Subject: [PATCH 7/7] Fixed calculation error of pkt->header_size in fill_pkt_tcp_info() Date: Tue, 8 Jun 2021 16:23:31 +0800 Message-Id: <20210608082331.1949117-8-chen.zhang@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210608082331.1949117-1-chen.zhang@intel.com> References: <20210608082331.1949117-1-chen.zhang@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=192.55.52.115; envelope-from=chen.zhang@intel.com; helo=mga14.intel.com X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lukas Straub , Li Zhijian , "Rao, Lei" , Li Zhijian , Zhang Chen , Zhang Chen Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: "Rao, Lei" The data pointer has skipped vnet_hdr_len in the function of parse_packet_early().So, we can not subtract vnet_hdr_len again when calculating pkt->header_size in fill_pkt_tcp_info(). Otherwise, it will cause network packet comparsion errors and greatly increase the frequency of checkpoints. Signed-off-by: Lei Rao Signed-off-by: Zhang Chen Reviewed-by: Li Zhijian Reviewed-by: Zhang Chen Reviewed-by: Lukas Straub Tested-by: Lukas Straub --- net/colo-compare.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/colo-compare.c b/net/colo-compare.c index 5b538f4e0b..b100e7b51f 100644 --- a/net/colo-compare.c +++ b/net/colo-compare.c @@ -211,7 +211,7 @@ static void fill_pkt_tcp_info(void *data, uint32_t *max= _ack) pkt->tcp_ack =3D ntohl(tcphd->th_ack); *max_ack =3D *max_ack > pkt->tcp_ack ? *max_ack : pkt->tcp_ack; pkt->header_size =3D pkt->transport_header - (uint8_t *)pkt->data - + (tcphd->th_off << 2) - pkt->vnet_hdr_len; + + (tcphd->th_off << 2); pkt->payload_size =3D pkt->size - pkt->header_size; pkt->seq_end =3D pkt->tcp_seq + pkt->payload_size; pkt->flags =3D tcphd->th_flags; --=20 2.25.1