diff options
author | Luca Boccassi <luca.boccassi@gmail.com> | 2018-02-19 11:16:57 +0000 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@gmail.com> | 2018-02-19 11:17:28 +0000 |
commit | ca33590b6af032bff57d9cc70455660466a654b2 (patch) | |
tree | 0b68b090bd9b4a78a3614b62400b29279d76d553 /drivers/net/qede/qede_logs.h | |
parent | 169a9de21e263aa6599cdc2d87a45ae158d9f509 (diff) |
New upstream version 18.02upstream/18.02
Change-Id: I89ed24cb2a49b78fe5be6970b99dd46c1499fcc3
Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
Diffstat (limited to 'drivers/net/qede/qede_logs.h')
-rw-r--r-- | drivers/net/qede/qede_logs.h | 57 |
1 files changed, 24 insertions, 33 deletions
diff --git a/drivers/net/qede/qede_logs.h b/drivers/net/qede/qede_logs.h index 15821151..159315e7 100644 --- a/drivers/net/qede/qede_logs.h +++ b/drivers/net/qede/qede_logs.h @@ -9,64 +9,55 @@ #ifndef _QEDE_LOGS_H_ #define _QEDE_LOGS_H_ -#define DP_ERR(p_dev, fmt, ...) \ - rte_log(RTE_LOG_ERR, RTE_LOGTYPE_PMD, \ - "[%s:%d(%s)]" fmt, \ - __func__, __LINE__, \ - (p_dev)->name ? (p_dev)->name : "", \ +extern int qede_logtype_driver; + +#define DP_ERR(p_dev, fmt, ...) \ + rte_log(RTE_LOG_ERR, qede_logtype_driver, \ + "[%s:%d(%s)]" fmt, \ + __func__, __LINE__, \ + (p_dev)->name ? (p_dev)->name : "", \ ##__VA_ARGS__) #define DP_NOTICE(p_dev, is_assert, fmt, ...) \ do { \ if (is_assert) \ - rte_log(RTE_LOG_ERR, RTE_LOGTYPE_PMD,\ + rte_log(RTE_LOG_ERR, qede_logtype_driver,\ "[QEDE PMD: (%s)]%s:" fmt, \ (p_dev)->name ? (p_dev)->name : "", \ __func__, \ ##__VA_ARGS__); \ else \ - rte_log(RTE_LOG_NOTICE, RTE_LOGTYPE_PMD,\ + rte_log(RTE_LOG_NOTICE, qede_logtype_driver,\ "[QEDE PMD: (%s)]%s:" fmt, \ (p_dev)->name ? (p_dev)->name : "", \ __func__, \ ##__VA_ARGS__); \ } while (0) -#ifdef RTE_LIBRTE_QEDE_DEBUG_INFO #define DP_INFO(p_dev, fmt, ...) \ - rte_log(RTE_LOG_INFO, RTE_LOGTYPE_PMD, \ + rte_log(RTE_LOG_INFO, qede_logtype_driver, \ "[%s:%d(%s)]" fmt, \ __func__, __LINE__, \ (p_dev)->name ? (p_dev)->name : "", \ ##__VA_ARGS__) -#else -#define DP_INFO(p_dev, fmt, ...) do { } while (0) -#endif -#ifdef RTE_LIBRTE_QEDE_DEBUG_DRIVER -#define DP_VERBOSE(p_dev, module, fmt, ...) \ -do { \ - if ((p_dev)->dp_module & module) \ - rte_log(RTE_LOG_DEBUG, RTE_LOGTYPE_PMD, \ - "[%s:%d(%s)]" fmt, \ - __func__, __LINE__, \ - (p_dev)->name ? (p_dev)->name : "", \ - ##__VA_ARGS__); \ -} while (0) -#else -#define DP_VERBOSE(p_dev, fmt, ...) do { } while (0) -#endif +#define DP_VERBOSE(p_dev, module, fmt, ...) \ + do { \ + if ((p_dev)->dp_module & module) \ + rte_log(RTE_LOG_DEBUG, qede_logtype_driver, \ + "[%s:%d(%s)]" fmt, \ + __func__, __LINE__, \ + (p_dev)->name ? (p_dev)->name : "", \ + ##__VA_ARGS__); \ + } while (0) -#define PMD_INIT_LOG(level, edev, fmt, args...) \ - rte_log(RTE_LOG_ ## level, RTE_LOGTYPE_PMD, \ - "[qede_pmd: %s] %s() " fmt "\n", \ - (edev)->name, __func__, ##args) +extern int qede_logtype_init; +#define PMD_INIT_LOG(level, edev, fmt, args...) \ + rte_log(RTE_LOG_ ## level, qede_logtype_init, \ + "[qede_pmd: %s] %s() " fmt "\n", \ + (edev)->name, __func__, ##args) -#ifdef RTE_LIBRTE_QEDE_DEBUG_INIT #define PMD_INIT_FUNC_TRACE(edev) PMD_INIT_LOG(DEBUG, edev, " >>") -#else -#define PMD_INIT_FUNC_TRACE(edev) do { } while (0) -#endif #ifdef RTE_LIBRTE_QEDE_DEBUG_TX #define PMD_TX_LOG(level, q, fmt, args...) \ |