eal: register log type and pick level from args
authorIvan Malov <ivan.malov@oktetlabs.ru>
Wed, 21 Mar 2018 11:28:16 +0000 (11:28 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 30 Mar 2018 12:08:44 +0000 (14:08 +0200)
commitb22e77c026205ef087cda1448fa2214fb005b39c
tree3368b5e293041b4112908ebc5ef41e079cbffb4f
parent0b1edd21cd78c48e944489231707cbd9a59273ec
eal: register log type and pick level from args

Dynamic log types are registered on RTE_INIT() step.
This allows one to set log levels by EAL options on
application launch. However, this does not allow to
manage log types if they are created during runtime.

EAL does not store log levels and types passed from
the command line. Thus, they cannot be picked later.
This is an obvious flaw since it would be better to
be able to pick levels for dynamic types registered
for runtime-determined facilities such as NIC ports.

This patch provides a mechanism to store log levels
passed from EAL options and adds an API to register
log types and pick levels from the internal storage.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
lib/librte_eal/common/eal_common_log.c
lib/librte_eal/common/eal_common_options.c
lib/librte_eal/common/include/rte_log.h
lib/librte_eal/rte_eal_version.map