@@ -23,8 +23,11 @@
#include "fpga_5gnr_fec.h"
#include "rte_pmd_fpga_5gnr_fec.h"
-/* 5GNR SW PMD logging ID */
-static int fpga_5gnr_fec_logtype;
+#ifdef RTE_LIBRTE_BBDEV_DEBUG
+RTE_LOG_REGISTER(fpga_5gnr_fec_logtype, pmd.bb.fpga_5gnr_fec, DEBUG);
+#else
+RTE_LOG_REGISTER(fpga_5gnr_fec_logtype, pmd.bb.fpga_5gnr_fec, NOTICE);
+#endif
#ifdef RTE_LIBRTE_BBDEV_DEBUG
@@ -2175,13 +2178,3 @@ RTE_PMD_REGISTER_PCI(FPGA_5GNR_FEC_VF_DRIVER_NAME, fpga_5gnr_fec_pci_vf_driver);
RTE_PMD_REGISTER_PCI_TABLE(FPGA_5GNR_FEC_VF_DRIVER_NAME,
pci_id_fpga_5gnr_fec_vf_map);
-RTE_INIT(fpga_5gnr_fec_init_log)
-{
- fpga_5gnr_fec_logtype = rte_log_register("pmd.bb.fpga_5gnr_fec");
- if (fpga_5gnr_fec_logtype >= 0)
-#ifdef RTE_LIBRTE_BBDEV_DEBUG
- rte_log_set_level(fpga_5gnr_fec_logtype, RTE_LOG_DEBUG);
-#else
- rte_log_set_level(fpga_5gnr_fec_logtype, RTE_LOG_NOTICE);
-#endif
-}
@@ -22,8 +22,11 @@
#include "fpga_lte_fec.h"
-/* Turbo SW PMD logging ID */
-static int fpga_lte_fec_logtype;
+#ifdef RTE_LIBRTE_BBDEV_DEBUG
+RTE_LOG_REGISTER(fpga_lte_fec_logtype, pmd.bb.fpga_lte_fec, DEBUG);
+#else
+RTE_LOG_REGISTER(fpga_lte_fec_logtype, pmd.bb.fpga_lte_fec, NOTICE);
+#endif
/* Helper macro for logging */
#define rte_bbdev_log(level, fmt, ...) \
@@ -2662,14 +2665,3 @@ RTE_PMD_REGISTER_PCI_TABLE(FPGA_LTE_FEC_PF_DRIVER_NAME,
RTE_PMD_REGISTER_PCI(FPGA_LTE_FEC_VF_DRIVER_NAME, fpga_lte_fec_pci_vf_driver);
RTE_PMD_REGISTER_PCI_TABLE(FPGA_LTE_FEC_VF_DRIVER_NAME,
pci_id_fpga_lte_fec_vf_map);
-
-RTE_INIT(fpga_lte_fec_init_log)
-{
- fpga_lte_fec_logtype = rte_log_register("pmd.bb.fpga_lte_fec");
- if (fpga_lte_fec_logtype >= 0)
-#ifdef RTE_LIBRTE_BBDEV_DEBUG
- rte_log_set_level(fpga_lte_fec_logtype, RTE_LOG_DEBUG);
-#else
- rte_log_set_level(fpga_lte_fec_logtype, RTE_LOG_NOTICE);
-#endif
-}
@@ -15,8 +15,7 @@
#define DRIVER_NAME baseband_null
-/* NULL BBDev logging ID */
-static int bbdev_null_logtype;
+RTE_LOG_REGISTER(bbdev_null_logtype, pmd.bb.null, NOTICE);
/* Helper macro for logging */
#define rte_bbdev_log(level, fmt, ...) \
@@ -348,9 +347,3 @@ RTE_PMD_REGISTER_PARAM_STRING(DRIVER_NAME,
BBDEV_NULL_SOCKET_ID_ARG"=<int>");
RTE_PMD_REGISTER_ALIAS(DRIVER_NAME, bbdev_null);
-RTE_INIT(null_bbdev_init_log)
-{
- bbdev_null_logtype = rte_log_register("pmd.bb.null");
- if (bbdev_null_logtype >= 0)
- rte_log_set_level(bbdev_null_logtype, RTE_LOG_NOTICE);
-}
@@ -34,8 +34,7 @@
#define DRIVER_NAME baseband_turbo_sw
-/* Turbo SW PMD logging ID */
-static int bbdev_turbo_sw_logtype;
+RTE_LOG_REGISTER(bbdev_turbo_sw_logtype, pmd.bb.turbo_sw, NOTICE);
/* Helper macro for logging */
#define rte_bbdev_log(level, fmt, ...) \
@@ -1991,9 +1990,3 @@ RTE_PMD_REGISTER_PARAM_STRING(DRIVER_NAME,
TURBO_SW_SOCKET_ID_ARG"=<int>");
RTE_PMD_REGISTER_ALIAS(DRIVER_NAME, turbo_sw);
-RTE_INIT(turbo_sw_bbdev_init_log)
-{
- bbdev_turbo_sw_logtype = rte_log_register("pmd.bb.turbo_sw");
- if (bbdev_turbo_sw_logtype >= 0)
- rte_log_set_level(bbdev_turbo_sw_logtype, RTE_LOG_NOTICE);
-}