diff options
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/dhcp/client.c | 2 | ||||
-rw-r--r-- | src/plugins/dpdk/cryptodev/cryptodev.c | 5 | ||||
-rw-r--r-- | src/plugins/dpdk/cryptodev/cryptodev_dp_api.c | 5 | ||||
-rw-r--r-- | src/plugins/dpdk/device/dpdk.h | 2 | ||||
-rw-r--r-- | src/plugins/dpdk/device/init.c | 12 | ||||
-rw-r--r-- | src/plugins/dpdk/ipsec/ipsec.c | 4 |
6 files changed, 17 insertions, 13 deletions
diff --git a/src/plugins/dhcp/client.c b/src/plugins/dhcp/client.c index cd90df6a244..575f8b82625 100644 --- a/src/plugins/dhcp/client.c +++ b/src/plugins/dhcp/client.c @@ -1250,7 +1250,7 @@ dhcp_client_init (vlib_main_t * vm) dcm->seed = (u32) clib_cpu_time_now (); dhcp_logger = vlib_log_register_class ("dhcp", "client"); - DHCP_INFO ("plugin initialized"); + DHCP_DBG ("plugin initialized"); return 0; } diff --git a/src/plugins/dpdk/cryptodev/cryptodev.c b/src/plugins/dpdk/cryptodev/cryptodev.c index 68a9126c3ae..f58b54634a7 100644 --- a/src/plugins/dpdk/cryptodev/cryptodev.c +++ b/src/plugins/dpdk/cryptodev/cryptodev.c @@ -1201,10 +1201,7 @@ cryptodev_get_session_sz (vlib_main_t *vm, uint32_t n_workers) u32 sess_data_sz = 0, i; if (rte_cryptodev_count () == 0) - { - clib_warning ("No cryptodev device available"); - return -1; - } + return -1; for (i = 0; i < rte_cryptodev_count (); i++) { diff --git a/src/plugins/dpdk/cryptodev/cryptodev_dp_api.c b/src/plugins/dpdk/cryptodev/cryptodev_dp_api.c index 8fcfa2edf48..682295b703c 100644 --- a/src/plugins/dpdk/cryptodev/cryptodev_dp_api.c +++ b/src/plugins/dpdk/cryptodev/cryptodev_dp_api.c @@ -1348,10 +1348,7 @@ cryptodev_get_session_sz (vlib_main_t *vm, u32 n_workers) u32 sess_data_sz = 0, i; if (rte_cryptodev_count () == 0) - { - clib_warning ("Failed"); - return -1; - } + return -1; for (i = 0; i < rte_cryptodev_count (); i++) { diff --git a/src/plugins/dpdk/device/dpdk.h b/src/plugins/dpdk/device/dpdk.h index 94842a56397..b094a1931cf 100644 --- a/src/plugins/dpdk/device/dpdk.h +++ b/src/plugins/dpdk/device/dpdk.h @@ -346,6 +346,8 @@ typedef struct /* logging */ vlib_log_class_t log_default; + vlib_log_class_t log_cryptodev; + vlib_log_class_t log_ipsec; } dpdk_main_t; extern dpdk_main_t dpdk_main; diff --git a/src/plugins/dpdk/device/init.c b/src/plugins/dpdk/device/init.c index 2615f16364d..4b200cef8bb 100644 --- a/src/plugins/dpdk/device/init.c +++ b/src/plugins/dpdk/device/init.c @@ -862,7 +862,8 @@ dpdk_bind_devices_to_uio (dpdk_config_main_t * conf) d = vlib_pci_get_device_info (vm, addr, &error); if (error) { - clib_error_report (error); + vlib_log_warn (dpdk_main.log_default, "%U", format_clib_error, error); + clib_error_free (error); continue; } @@ -1507,7 +1508,7 @@ dpdk_config (vlib_main_t * vm, unformat_input_t * input) vec_terminate_c_string (conf->eal_init_args_str); - dpdk_log_warn ("EAL init args: %s", conf->eal_init_args_str); + dpdk_log_notice ("EAL init args: %s", conf->eal_init_args_str); ret = rte_eal_init (vec_len (conf->eal_init_args), (char **) conf->eal_init_args); @@ -1636,7 +1637,10 @@ dpdk_process (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f) error = dpdk_cryptodev_init (vm); if (error) - clib_error_report (error); + { + vlib_log_warn (dpdk_main.log_cryptodev, "%U", format_clib_error, error); + clib_error_free (error); + } tm->worker_thread_release = 1; @@ -1720,6 +1724,8 @@ dpdk_init (vlib_main_t * vm) dm->link_state_poll_interval = DPDK_LINK_POLL_INTERVAL; dm->log_default = vlib_log_register_class ("dpdk", 0); + dm->log_cryptodev = vlib_log_register_class ("dpdk", "cryptodev"); + dm->log_ipsec = vlib_log_register_class ("dpdk", "ipsec"); return error; } diff --git a/src/plugins/dpdk/ipsec/ipsec.c b/src/plugins/dpdk/ipsec/ipsec.c index db2b1d6c2e9..c7fd9222824 100644 --- a/src/plugins/dpdk/ipsec/ipsec.c +++ b/src/plugins/dpdk/ipsec/ipsec.c @@ -17,6 +17,7 @@ #include <vnet/api_errno.h> #include <vnet/ipsec/ipsec.h> #include <vlib/node_funcs.h> +#include <vlib/log.h> #include <dpdk/device/dpdk.h> #include <dpdk/buffer.h> @@ -1028,7 +1029,8 @@ dpdk_ipsec_main_init (vlib_main_t * vm) if (!(dcm->enabled)) { - clib_warning ("not enough DPDK crypto resources, default to OpenSSL"); + vlib_log_warn (dpdk_main.log_default, + "not enough DPDK crypto resources"); crypto_disable (); return 0; } |