Replace all uses of the global logtype with a dynamic log type. Signed-off-by: Stephen Hemminger <step...@networkplumber.org> --- lib/efd/rte_efd.c | 4 ++++ lib/log/log.c | 1 - lib/log/rte_log.h | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/lib/efd/rte_efd.c b/lib/efd/rte_efd.c index dad962ce29bf..78fb9250ef87 100644 --- a/lib/efd/rte_efd.c +++ b/lib/efd/rte_efd.c @@ -9,6 +9,7 @@ #include <errno.h> #include <sys/queue.h> +#include <rte_cpuflags.h> #include <rte_string_fns.h> #include <rte_log.h> #include <rte_eal_memconfig.h> @@ -28,6 +29,9 @@ #include "rte_efd_arm64.h" #endif +RTE_LOG_REGISTER_DEFAULT(efd_logtype, INFO); +#define RTE_LOGTYPE_EFD efd_logtype + #define EFD_KEY(key_idx, table) (table->keys + ((key_idx) * table->key_len)) /** Hash function used to determine chunk_id and bin_id for a group */ #define EFD_HASH(key, table) \ diff --git a/lib/log/log.c b/lib/log/log.c index 4a7ff738750b..7a6b5c335753 100644 --- a/lib/log/log.c +++ b/lib/log/log.c @@ -367,7 +367,6 @@ static const struct logtype logtype_strings[] = { {RTE_LOGTYPE_PIPELINE, "lib.pipeline"}, {RTE_LOGTYPE_MBUF, "lib.mbuf"}, {RTE_LOGTYPE_CRYPTODEV, "lib.cryptodev"}, - {RTE_LOGTYPE_EFD, "lib.efd"}, {RTE_LOGTYPE_EVENTDEV, "lib.eventdev"}, {RTE_LOGTYPE_USER1, "user1"}, {RTE_LOGTYPE_USER2, "user2"}, diff --git a/lib/log/rte_log.h b/lib/log/rte_log.h index bc9d1fc8f106..6df66366608b 100644 --- a/lib/log/rte_log.h +++ b/lib/log/rte_log.h @@ -44,7 +44,7 @@ extern "C" { #define RTE_LOGTYPE_PIPELINE 15 /**< Log related to pipeline. */ #define RTE_LOGTYPE_MBUF 16 /**< Log related to mbuf. */ #define RTE_LOGTYPE_CRYPTODEV 17 /**< Log related to cryptodev. */ -#define RTE_LOGTYPE_EFD 18 /**< Log related to EFD. */ + /* was RTE_LOGTYPE_EFD */ #define RTE_LOGTYPE_EVENTDEV 19 /**< Log related to eventdev. */ /* was RTE_LOGTYPE_GSO */ -- 2.39.2