[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v8 16/27] net: add trace_vhost_user_event
From: |
marcandre . lureau |
Subject: |
[Qemu-devel] [PATCH v8 16/27] net: add trace_vhost_user_event |
Date: |
Fri, 9 Oct 2015 17:17:30 +0200 |
From: Marc-André Lureau <address@hidden>
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 <address@hidden>
---
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 b813ae4..3f677d5 100644
--- a/trace-events
+++ b/trace-events
@@ -1696,3 +1696,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"
--
2.4.3
- [Qemu-devel] [PATCH v8 00/27] vhost-user: add migration support, marcandre . lureau, 2015/10/10
- [Qemu-devel] [PATCH v8 02/27] configure: probe for memfd, marcandre . lureau, 2015/10/09
- [Qemu-devel] [PATCH v8 06/27] util: add memfd helpers, marcandre . lureau, 2015/10/09
- [Qemu-devel] [PATCH v8 05/27] util: add linux-only memfd fallback, marcandre . lureau, 2015/10/09
- [Qemu-devel] [PATCH v8 14/27] vhost: use a function for each call, marcandre . lureau, 2015/10/09
- [Qemu-devel] [PATCH v8 07/27] util: add fallback for qemu_memfd_alloc(), marcandre . lureau, 2015/10/09
- [Qemu-devel] [PATCH v8 12/27] vhost-user: send log shm fd along with log_base, marcandre . lureau, 2015/10/09
- [Qemu-devel] [PATCH v8 16/27] net: add trace_vhost_user_event,
marcandre . lureau <=
- [Qemu-devel] [PATCH v8 18/27] vhost user: add rarp sending after live migration for legacy guest, marcandre . lureau, 2015/10/09
- [Qemu-devel] [PATCH v8 17/27] vhost user: add support of live migration, marcandre . lureau, 2015/10/09
- [Qemu-devel] [PATCH v8 26/27] vhost-user-test: check ownership during migration, marcandre . lureau, 2015/10/09
- [Qemu-devel] [PATCH v8 21/27] vhost-user-test: move wait_for_fds() out, marcandre . lureau, 2015/10/09
- [Qemu-devel] [PATCH v8 22/27] vhost-user-test: remove useless static check, marcandre . lureau, 2015/10/09
- [Qemu-devel] [PATCH v8 08/27] vhost: document log resizing, marcandre . lureau, 2015/10/09
- [Qemu-devel] [PATCH v8 03/27] linux-headers: add unistd.h, marcandre . lureau, 2015/10/09
- [Qemu-devel] [PATCH v8 11/27] vhost: alloc shareable log, marcandre . lureau, 2015/10/09
- [Qemu-devel] [PATCH v8 15/27] vhost-user: document migration log, marcandre . lureau, 2015/10/09
- [Qemu-devel] [PATCH v8 25/27] vhost-user-test: add live-migration test, marcandre . lureau, 2015/10/09