diff options
Diffstat (limited to 'drivers/net/ena/ena_logs.h')
-rw-r--r-- | drivers/net/ena/ena_logs.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/net/ena/ena_logs.h b/drivers/net/ena/ena_logs.h index c6c8a41b..2c0e91b6 100644 --- a/drivers/net/ena/ena_logs.h +++ b/drivers/net/ena/ena_logs.h @@ -34,10 +34,10 @@ #ifndef _ENA_LOGS_H_ #define _ENA_LOGS_H_ -#define RTE_LOGTYPE_ENA RTE_LOGTYPE_USER1 - +extern int ena_logtype_init; #define PMD_INIT_LOG(level, fmt, args...) \ - RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args) + rte_log(RTE_LOG_ ## level, ena_logtype_init, \ + "%s(): " fmt "\n", __func__, ## args) #ifdef RTE_LIBRTE_ENA_DEBUG_RX #define PMD_RX_LOG(level, fmt, args...) \ @@ -60,11 +60,9 @@ #define PMD_TX_FREE_LOG(level, fmt, args...) do { } while (0) #endif -#ifdef RTE_LIBRTE_ENA_DEBUG_DRIVER +extern int ena_logtype_driver; #define PMD_DRV_LOG(level, fmt, args...) \ - RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args) -#else -#define PMD_DRV_LOG(level, fmt, args...) do { } while (0) -#endif + rte_log(RTE_LOG_ ## level, ena_logtype_driver, \ + "%s(): " fmt "\n", __func__, ## args) #endif /* _ENA_LOGS_H_ */ |