From patchwork Mon Jan 14 14:05:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Zhang Chen X-Patchwork-Id: 10762859 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3D4A71390 for ; Mon, 14 Jan 2019 14:39:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2E7C028C9A for ; Mon, 14 Jan 2019 14:39:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2245628CD5; Mon, 14 Jan 2019 14:39:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=0.1 required=2.0 tests=BAYES_00,FROM_ADDR_WS, MAILING_LIST_MULTI autolearn=no version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CB02C28C9A for ; Mon, 14 Jan 2019 14:39:18 +0000 (UTC) Received: from localhost ([127.0.0.1]:42017 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gj3OX-00046q-JK for patchwork-qemu-devel@patchwork.kernel.org; Mon, 14 Jan 2019 09:39:17 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50105) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gj2uU-0005O9-QQ for qemu-devel@nongnu.org; Mon, 14 Jan 2019 09:08:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gj2uU-0001Jy-0l for qemu-devel@nongnu.org; Mon, 14 Jan 2019 09:08:14 -0500 Received: from mga01.intel.com ([192.55.52.88]:60570) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gj2uT-0001HH-Lv for qemu-devel@nongnu.org; Mon, 14 Jan 2019 09:08:13 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Jan 2019 06:08:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,477,1539673200"; d="scan'208";a="127576723" Received: from unknown (HELO localhost.localdomain) ([10.239.13.19]) by orsmga001.jf.intel.com with ESMTP; 14 Jan 2019 06:08:03 -0800 From: Zhang Chen To: Li Zhijian , Zhang Chen , Thomas Huth , Jason Wang , qemu-dev Date: Mon, 14 Jan 2019 22:05:10 +0800 Message-Id: <20190114140510.7161-1-chen.zhang@intel.com> X-Mailer: git-send-email 2.17.GIT X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 192.55.52.88 Subject: [Qemu-devel] [PATCH] net/colo-compare.c: Remove duplicated code X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Zhang Chen Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Zhang Chen Fix duplicated code: https://bugs.launchpad.net/qemu/+bug/1811499 Signed-off-by: Zhang Chen Reviewed-by: Philippe Mathieu-Daudé --- net/colo-compare.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/net/colo-compare.c b/net/colo-compare.c index 9156ab3349..fa3fd0632d 100644 --- a/net/colo-compare.c +++ b/net/colo-compare.c @@ -285,14 +285,6 @@ static bool colo_mark_tcp_pkt(Packet *ppkt, Packet *spkt, { *mark = 0; - if (ppkt->tcp_seq == spkt->tcp_seq && ppkt->seq_end == spkt->seq_end) { - if (colo_compare_packet_payload(ppkt, spkt, - ppkt->header_size, spkt->header_size, - ppkt->payload_size)) { - *mark = COLO_COMPARE_FREE_SECONDARY | COLO_COMPARE_FREE_PRIMARY; - return true; - } - } if (ppkt->tcp_seq == spkt->tcp_seq && ppkt->seq_end == spkt->seq_end) { if (colo_compare_packet_payload(ppkt, spkt, ppkt->header_size, spkt->header_size,