summaryrefslogtreecommitdiffstats
path: root/src/plugins/memif/socket.c
diff options
context:
space:
mode:
authorJuraj Sloboda <jsloboda@cisco.com>2018-10-03 16:00:21 +0200
committerDamjan Marion <dmarion@me.com>2018-10-03 17:37:48 +0000
commit7a40133d3355463368085c14f9fc4b4fd22d549a (patch)
tree07e0c07cd41a09ddbecdf51323fc0acfedc02330 /src/plugins/memif/socket.c
parent7cd368f7be4ff0eb06e0b4975e7c2695ad788b44 (diff)
memif: include interface name in logs
Change-Id: I67f58aa93c721dbd518cc2ddcea330006693662f Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
Diffstat (limited to 'src/plugins/memif/socket.c')
-rw-r--r--src/plugins/memif/socket.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/plugins/memif/socket.c b/src/plugins/memif/socket.c
index 82e865d2a0b..ac48ba88da5 100644
--- a/src/plugins/memif/socket.c
+++ b/src/plugins/memif/socket.c
@@ -408,7 +408,6 @@ memif_msg_receive_disconnect (memif_if_t * mif, memif_msg_t * msg)
static clib_error_t *
memif_msg_receive (memif_if_t ** mifp, clib_socket_t * sock, clib_file_t * uf)
{
- memif_main_t *mm = &memif_main;
memif_msg_t msg = { 0 };
clib_error_t *err = 0;
int fd = -1;
@@ -426,7 +425,7 @@ memif_msg_receive (memif_if_t ** mifp, clib_socket_t * sock, clib_file_t * uf)
goto error;
}
- vlib_log_debug (mm->log_class, "Message type %u received", msg.type);
+ memif_log_debug (mif, "Message type %u received", msg.type);
/* process the message based on its type */
switch (msg.type)
{
@@ -499,7 +498,7 @@ memif_msg_receive (memif_if_t ** mifp, clib_socket_t * sock, clib_file_t * uf)
return 0;
error:
- vlib_log_err (mm->log_class, "%U", format_clib_error, err);
+ memif_log_err (mif, "%U", format_clib_error, err);
return err;
}
@@ -639,8 +638,8 @@ memif_master_conn_fd_error (clib_file_t * uf)
}
}
- vlib_log_warn (mm->log_class, "Error on unknown file descriptor %d",
- uf->file_descriptor);
+ memif_log_warn (0, "Error on unknown file descriptor %d",
+ uf->file_descriptor);
memif_file_del (uf);
return 0;
}
@@ -683,7 +682,7 @@ memif_conn_fd_accept_ready (clib_file_t * uf)
return 0;
error:
- vlib_log_err (mm->log_class, "%U", format_clib_error, err);
+ memif_log_err (0, "%U", format_clib_error, err);
clib_mem_free (client);
return err;
}