From: Stephen Hemminger Date: Thu, 9 Jul 2015 23:01:05 +0000 (-0700) Subject: drivers: allow pruning log during build X-Git-Tag: spdx-start~8590 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=7cf90aeb8de4692d971764ab5a47b52f26026307;p=dpdk.git drivers: allow pruning log during build Some drivers was not following DPDK convention and was leaving logging always in even if LOG_LEVEL was configured to disable debug logs. Signed-off-by: Stephen Hemminger Acked-by: Bruce Richardson [Thomas: apply same fix to i40e, fm10k and bnx2x] Signed-off-by: Thomas Monjalon --- diff --git a/drivers/net/bnx2x/bnx2x_logs.h b/drivers/net/bnx2x/bnx2x_logs.h index aa37234ef2..05f754dc12 100644 --- a/drivers/net/bnx2x/bnx2x_logs.h +++ b/drivers/net/bnx2x/bnx2x_logs.h @@ -8,8 +8,7 @@ #define _PMD_LOGS_H_ #define PMD_INIT_LOG(level, fmt, args...) \ - rte_log(RTE_LOG_ ## level, RTE_LOGTYPE_PMD, \ - "PMD: %s(): " fmt "\n", __func__, ##args) + RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ##args) #ifdef RTE_LIBRTE_BNX2X_DEBUG_INIT #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>") diff --git a/drivers/net/e1000/e1000_logs.h b/drivers/net/e1000/e1000_logs.h index 4a92804fdf..81e7bf52ce 100644 --- a/drivers/net/e1000/e1000_logs.h +++ b/drivers/net/e1000/e1000_logs.h @@ -35,8 +35,7 @@ #define _E1000_LOGS_H_ #define PMD_INIT_LOG(level, fmt, args...) \ - rte_log(RTE_LOG_ ## level, RTE_LOGTYPE_PMD, \ - "PMD: %s(): " fmt "\n", __func__, ##args) + RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ##args) #ifdef RTE_LIBRTE_E1000_DEBUG_INIT #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>") diff --git a/drivers/net/fm10k/fm10k_logs.h b/drivers/net/fm10k/fm10k_logs.h index 41a45ce63f..31384c9e2b 100644 --- a/drivers/net/fm10k/fm10k_logs.h +++ b/drivers/net/fm10k/fm10k_logs.h @@ -37,8 +37,7 @@ #include #define PMD_INIT_LOG(level, fmt, args...) \ - rte_log(RTE_LOG_ ## level, RTE_LOGTYPE_PMD, \ - "PMD: %s(): " fmt "\n", __func__, ##args) + RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ##args) #ifdef RTE_LIBRTE_FM10K_DEBUG_INIT #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>") diff --git a/drivers/net/i40e/i40e_logs.h b/drivers/net/i40e/i40e_logs.h index de480e6442..e042e2429e 100644 --- a/drivers/net/i40e/i40e_logs.h +++ b/drivers/net/i40e/i40e_logs.h @@ -35,8 +35,7 @@ #define _I40E_LOGS_H_ #define PMD_INIT_LOG(level, fmt, args...) \ - rte_log(RTE_LOG_ ## level, RTE_LOGTYPE_PMD, \ - "PMD: %s(): " fmt "\n", __func__, ##args) + RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ##args) #ifdef RTE_LIBRTE_I40E_DEBUG_INIT #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>") diff --git a/drivers/net/ixgbe/ixgbe_logs.h b/drivers/net/ixgbe/ixgbe_logs.h index 572e03000a..53ba42d927 100644 --- a/drivers/net/ixgbe/ixgbe_logs.h +++ b/drivers/net/ixgbe/ixgbe_logs.h @@ -35,8 +35,7 @@ #define _IXGBE_LOGS_H_ #define PMD_INIT_LOG(level, fmt, args...) \ - rte_log(RTE_LOG_ ## level, RTE_LOGTYPE_PMD, \ - "PMD: %s(): " fmt "\n", __func__, ##args) + RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ##args) #ifdef RTE_LIBRTE_IXGBE_DEBUG_INIT #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")