From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59040) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkIZG-000608-OM for qemu-devel@nongnu.org; Thu, 08 Oct 2015 17:17:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZkIZF-0007HG-Qt for qemu-devel@nongnu.org; Thu, 08 Oct 2015 17:17:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35491) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkIZF-0007HC-LW for qemu-devel@nongnu.org; Thu, 08 Oct 2015 17:17:37 -0400 Date: Fri, 9 Oct 2015 00:17:32 +0300 From: "Michael S. Tsirkin" Message-ID: <1444338957-15293-15-git-send-email-mst@redhat.com> References: <1444338957-15293-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <1444338957-15293-1-git-send-email-mst@redhat.com> Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 14/25] net: add trace_vhost_user_event List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Jason Wang , =?us-ascii?B?PT9VVEYtOD9xP01hcmMtQW5kcj1DMz1BOT0yMEx1cmVhdT89?= From: Marc-Andr=E9 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=E9 Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- 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" =20 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 =3D 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; } =20 diff --git a/trace-events b/trace-events index 6790292..678f6f0 100644 --- a/trace-events +++ b/trace-events @@ -1699,3 +1699,6 @@ qcrypto_tls_creds_x509_load_cert_list(void *creds, = const char *file) "TLS creds =20 # crypto/tlssession.c qcrypto_tls_session_new(void *session, void *creds, const char *hostname= , const char *aclname, int endpoint) "TLS session new session=3D%p creds=3D= %p hostname=3D%s aclname=3D%s endpoint=3D%d" + +# net/vhost-user.c +vhost_user_event(const char *chr, int event) "chr: %s got event: %d" --=20 MST