From patchwork Fri May 22 06:47:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lukas Straub X-Patchwork-Id: 11564777 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4C72A913 for ; Fri, 22 May 2020 06:50:48 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 22E122073B for ; Fri, 22 May 2020 06:50:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=web.de header.i=@web.de header.b="H+VKf/Ad" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 22E122073B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=web.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:56930 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jc1W3-0002Sh-6E for patchwork-qemu-devel@patchwork.kernel.org; Fri, 22 May 2020 02:50:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38262) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jc1TJ-0007TD-TS for qemu-devel@nongnu.org; Fri, 22 May 2020 02:47:57 -0400 Received: from mout.web.de ([212.227.15.4]:38849) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jc1TI-000167-PS for qemu-devel@nongnu.org; Fri, 22 May 2020 02:47:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1590130063; bh=ccn6+rX95KPnZc453AzARCcdDXrnJE3FRVs3VRcf8r8=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:In-Reply-To:References; b=H+VKf/AdfUmmR5GSJpzr3xM6laegk3q1EgUm3PepEXVnHvCEwkhp+TVg+1RyheJy/ 9vYp02NA/2Duee8UaQpB+dRC933Daa8EYLQlV9elSxcy6eUo9IjeLsEvyr8Ei2sC/k GPX1VipTGAknv4LBmHKXHAfQIzBZ6co0vYIFJt1Y= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from luklap ([89.247.255.67]) by smtp.web.de (mrweb005 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MHEXc-1jpAdD2DT6-00DKkS; Fri, 22 May 2020 08:47:43 +0200 Date: Fri, 22 May 2020 08:47:42 +0200 From: Lukas Straub To: qemu-devel Subject: [PATCH v6 4/6] net/colo-compare.c: Only hexdump packets if tracing is enabled Message-ID: <8a4db9598051334ae3fa97b73556cdbaac5bbe43.1590129793.git.lukasstraub2@web.de> In-Reply-To: References: MIME-Version: 1.0 X-Provags-ID: V03:K1:kRqQK+J+UXSe/5J61Czr8joRBqKJwVkRhvNs85XNF3cQQMCew0M wJllyPnCDe9qsnbvdry1Q/yLkkQJ30V8aqRxPxOPnKFIEjljhaZE/Bflv3HAmZFluFxbxpp MPpc51in6IJ0Y2Eg0Bz75n4YUWmqruAzATww30i7WbQN/Sz75xa381GPYlXLZFKjdLFRTaU Lu/RR39FhDiPShC+Cm0qw== X-UI-Out-Filterresults: notjunk:1;V03:K0:tJW2wBz5+UU=:nGtIWeJ/W8oQ0qwWnyDl08 gzNY/rqiS/VwAUMDYygXbf0qcXG1eLf0Nmn4xw2+b37ctjGj3ZVi5kSfeQr0HFWHfwzj/8xof byTrydJJKtlZLsKAWzWvx8FX2cmef+U1/nKE4YHKZ9YPsXnVAV0CBqN/gurGkAPfSLj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I3EUs5EGAB4KEFAitvyffEXTx1UTwLk5SS MEmiX/b2domU85OOz Received-SPF: pass client-ip=212.227.15.4; envelope-from=lukasstraub2@web.de; helo=mout.web.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/22 02:47:49 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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: Zhang Chen , Jason Wang , Li Zhijian , =?utf-8?q?Marc-Andr=C3=A9?= Lureau Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Else the log will be flooded if there is a lot of network traffic. Signed-off-by: Lukas Straub Reviewed-by: Zhang Chen Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- net/colo-compare.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) -- 2.20.1 diff --git a/net/colo-compare.c b/net/colo-compare.c index e47c8c6049..7886444cdf 100644 --- a/net/colo-compare.c +++ b/net/colo-compare.c @@ -483,10 +483,12 @@ sec: g_queue_push_head(&conn->primary_list, ppkt); g_queue_push_head(&conn->secondary_list, spkt); - qemu_hexdump((char *)ppkt->data, stderr, - "colo-compare ppkt", ppkt->size); - qemu_hexdump((char *)spkt->data, stderr, - "colo-compare spkt", spkt->size); + if (trace_event_get_state_backends(TRACE_COLO_COMPARE_MISCOMPARE)) { + qemu_hexdump((char *)ppkt->data, stderr, + "colo-compare ppkt", ppkt->size); + qemu_hexdump((char *)spkt->data, stderr, + "colo-compare spkt", spkt->size); + } colo_compare_inconsistency_notify(s); }