aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/device/init.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2017-05-22 15:32:04 +0200
committerDave Barach <openvpp@barachs.net>2017-05-22 16:10:07 +0000
commit10980465ce97eceff05ac94a69a13d63d3cfa70a (patch)
tree0db3f8553c920e445c6283c2c78b3947f1632d1e /src/plugins/dpdk/device/init.c
parent0eb874e7fd34d74edd0619674561995ddf3b20ae (diff)
dpdk: make dpdk global debug level configurable
Adds startup.conf knob: dpdk { log-level debug } Change-Id: I80dfbc00559528d7b0970958fba9f08d97aa7118 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins/dpdk/device/init.c')
-rwxr-xr-xsrc/plugins/dpdk/device/init.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/plugins/dpdk/device/init.c b/src/plugins/dpdk/device/init.c
index 545a15e802c..a972394c374 100755
--- a/src/plugins/dpdk/device/init.c
+++ b/src/plugins/dpdk/device/init.c
@@ -810,6 +810,7 @@ dpdk_config (vlib_main_t * vm, unformat_input_t * input)
dpdk_device_config_t *devconf;
vlib_pci_addr_t pci_addr;
unformat_input_t sub_input;
+ uword x;
u8 *s, *tmp = 0;
u8 *rte_cmd = 0, *ethname = 0;
u32 log_level;
@@ -822,6 +823,7 @@ dpdk_config (vlib_main_t * vm, unformat_input_t * input)
u8 *socket_mem = 0;
conf->device_config_index_by_pci_addr = hash_create (0, sizeof (uword));
+ log_level = RTE_LOG_NOTICE;
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
{
@@ -838,6 +840,9 @@ dpdk_config (vlib_main_t * vm, unformat_input_t * input)
else if (unformat (input, "decimal-interface-names"))
conf->interface_name_format_decimal = 1;
+ else if (unformat (input, "log-level %U", unformat_dpdk_log_level, &x))
+ log_level = x;
+
else if (unformat (input, "no-multi-seg"))
conf->no_multi_seg = 1;
@@ -1175,8 +1180,6 @@ dpdk_config (vlib_main_t * vm, unformat_input_t * input)
/* Set up DPDK eal and packet mbuf pool early. */
- log_level = (CLIB_DEBUG > 0) ? RTE_LOG_DEBUG : RTE_LOG_NOTICE;
-
#if RTE_VERSION >= RTE_VERSION_NUM(17, 5, 0, 0)
rte_log_set_global_level (log_level);
#else