From patchwork Thu Oct 1 17:23:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= X-Patchwork-Id: 525242 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 33D7A140D6E for ; Fri, 2 Oct 2015 04:27:11 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=WRxvNL7D; dkim-atps=neutral Received: from localhost ([::1]:55079 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZhiZ8-0005JY-09 for incoming@patchwork.ozlabs.org; Thu, 01 Oct 2015 14:26:50 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38639) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZhhbD-0008HT-Qz for qemu-devel@nongnu.org; Thu, 01 Oct 2015 13:24:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZhhbD-0000Qm-12 for qemu-devel@nongnu.org; Thu, 01 Oct 2015 13:24:55 -0400 Received: from mail-qg0-x22e.google.com ([2607:f8b0:400d:c04::22e]:36290) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZhhbC-0000Qa-Sv for qemu-devel@nongnu.org; Thu, 01 Oct 2015 13:24:54 -0400 Received: by qgx61 with SMTP id 61so73468303qgx.3 for ; Thu, 01 Oct 2015 10:24:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=V2APlXYtuDXLS84NHm+3VQsmyLG03oQEstRxkyllPuM=; b=WRxvNL7Dlx6XU0stuc/2J3nGAS0qiH7nQ9N+ORLAIet+9ibZY2Ykb1OT+z6kALwsor SuCzL6G/aADr7LAXMbWEeV8W3wfd1KejXWel3PswITSilrcRfybHtDmK89tr+RHWHTxZ HCCjK8qha43skoszbYwOzORg+DP+ZyoCFyzgrUiJfh5vdjczoEiqaD4mLlNZnf913F9Q TLsOazAOYb6EuM81sGXVEaRcePH/Ibsr6fqcm9ZiZIJcWhmjnKiRM/Uv1AYikboAbwBL jz47/og1GyM3R4HnfVoYpj5f9bf95/+fSUPZX5YdteGIQupI8anQregMUVAzqjg6IaHh LQJA== X-Received: by 10.140.87.97 with SMTP id q88mr13625793qgd.86.1443720294572; Thu, 01 Oct 2015 10:24:54 -0700 (PDT) Received: from localhost (bne75-h02-31-39-163-232.dsl.sta.abo.bbox.fr. [31.39.163.232]) by smtp.gmail.com with ESMTPSA id y12sm2801496qgd.20.2015.10.01.10.24.53 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Oct 2015 10:24:53 -0700 (PDT) From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Date: Thu, 1 Oct 2015 19:23:58 +0200 Message-Id: <1443720248-15482-15-git-send-email-marcandre.lureau@redhat.com> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1443720248-15482-1-git-send-email-marcandre.lureau@redhat.com> References: <1443720248-15482-1-git-send-email-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400d:c04::22e Cc: haifeng.lin@huawei.com, mst@redhat.com, thibaut.collet@6wind.com, jasowang@redhat.com, pbonzini@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [Qemu-devel] [PATCH v7 14/24] net: add trace_vhost_user_event X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Marc-André Lureau Replace error_report() and use tracing instead. It's not an error to get a connection or a disconnection, so silence this and trace it instead. Signed-off-by: Marc-André Lureau --- net/vhost-user.c | 4 ++-- trace-events | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/net/vhost-user.c b/net/vhost-user.c index 8f354eb..9b38431 100644 --- a/net/vhost-user.c +++ b/net/vhost-user.c @@ -15,6 +15,7 @@ #include "qemu/config-file.h" #include "qemu/error-report.h" #include "qmp-commands.h" +#include "trace.h" typedef struct VhostUserState { NetClientState nc; @@ -148,18 +149,17 @@ static void net_vhost_user_event(void *opaque, int event) NET_CLIENT_OPTIONS_KIND_NIC, MAX_QUEUE_NUM); s = DO_UPCAST(VhostUserState, nc, ncs[0]); + trace_vhost_user_event(s->chr->label, event); switch (event) { case CHR_EVENT_OPENED: if (vhost_user_start(queues, ncs) < 0) { exit(1); } qmp_set_link(name, true, &err); - error_report("chardev \"%s\" went up", s->chr->label); break; case CHR_EVENT_CLOSED: qmp_set_link(name, true, &err); vhost_user_stop(queues, ncs); - error_report("chardev \"%s\" went down", s->chr->label); break; } diff --git a/trace-events b/trace-events index 36db793..6ca9868 100644 --- a/trace-events +++ b/trace-events @@ -1697,3 +1697,6 @@ qcrypto_tls_creds_x509_load_cert_list(void *creds, const char *file) "TLS creds # crypto/tlssession.c qcrypto_tls_session_new(void *session, void *creds, const char *hostname, const char *aclname, int endpoint) "TLS session new session=%p creds=%p hostname=%s aclname=%s endpoint=%d" + +# net/vhost-user.c +vhost_user_event(const char *chr, int event) "chr: %s got event: %d"