net: add trace_vhost_user_event
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 <marcandre.lureau@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Tested-by: Thibaut Collet <thibaut.collet@6wind.com>
This commit is contained in:
parent
c62b91e580
commit
69b32a6ce4
@ -15,6 +15,7 @@
|
|||||||
#include "qemu/config-file.h"
|
#include "qemu/config-file.h"
|
||||||
#include "qemu/error-report.h"
|
#include "qemu/error-report.h"
|
||||||
#include "qmp-commands.h"
|
#include "qmp-commands.h"
|
||||||
|
#include "trace.h"
|
||||||
|
|
||||||
typedef struct VhostUserState {
|
typedef struct VhostUserState {
|
||||||
NetClientState nc;
|
NetClientState nc;
|
||||||
@ -148,18 +149,17 @@ static void net_vhost_user_event(void *opaque, int event)
|
|||||||
NET_CLIENT_OPTIONS_KIND_NIC,
|
NET_CLIENT_OPTIONS_KIND_NIC,
|
||||||
MAX_QUEUE_NUM);
|
MAX_QUEUE_NUM);
|
||||||
s = DO_UPCAST(VhostUserState, nc, ncs[0]);
|
s = DO_UPCAST(VhostUserState, nc, ncs[0]);
|
||||||
|
trace_vhost_user_event(s->chr->label, event);
|
||||||
switch (event) {
|
switch (event) {
|
||||||
case CHR_EVENT_OPENED:
|
case CHR_EVENT_OPENED:
|
||||||
if (vhost_user_start(queues, ncs) < 0) {
|
if (vhost_user_start(queues, ncs) < 0) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
qmp_set_link(name, true, &err);
|
qmp_set_link(name, true, &err);
|
||||||
error_report("chardev \"%s\" went up", s->chr->label);
|
|
||||||
break;
|
break;
|
||||||
case CHR_EVENT_CLOSED:
|
case CHR_EVENT_CLOSED:
|
||||||
qmp_set_link(name, true, &err);
|
qmp_set_link(name, true, &err);
|
||||||
vhost_user_stop(queues, ncs);
|
vhost_user_stop(queues, ncs);
|
||||||
error_report("chardev \"%s\" went down", s->chr->label);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1705,3 +1705,6 @@ qcrypto_tls_creds_x509_load_cert_list(void *creds, const char *file) "TLS creds
|
|||||||
|
|
||||||
# crypto/tlssession.c
|
# 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"
|
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"
|
||||||
|
Loading…
Reference in New Issue
Block a user