[dpdk-dev,v3,3/6] ixgbe: allow pruning log during build

Message ID 1436482868-7400-4-git-send-email-stephen@networkplumber.org (mailing list archive)
State Accepted, archived
Headers

Commit Message

Stephen Hemminger July 9, 2015, 11:01 p.m. UTC
  From: Stephen Hemminger <shemming@brocade.com>

The ixgbe driver was not following DPDK convention and
was leaving loggin always in even if LOG_LEVEL was configured
to disable debug logs.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/ixgbe/ixgbe_logs.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
  

Comments

Thomas Monjalon July 9, 2015, 11:28 p.m. UTC | #1
2015-07-09 16:01, Stephen Hemminger:
> From: Stephen Hemminger <shemming@brocade.com>
> 
> The ixgbe driver was not following DPDK convention and
> was leaving loggin always in even if LOG_LEVEL was configured
> to disable debug logs.
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>

It was acked by Bruce:
http://dpdk.org/ml/archives/dev/2015-May/017786.html
  
Thomas Monjalon July 30, 2015, 5:31 p.m. UTC | #2
2015-07-09 16:01, Stephen Hemminger:
> From: Stephen Hemminger <shemming@brocade.com>
> 
> The ixgbe driver was not following DPDK convention and
> was leaving loggin always in even if LOG_LEVEL was configured
> to disable debug logs.
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>

This series is fixing e1000 and ixgbe.
There is the same issue with i40e, fm10k and bnx2x.
I will fix them in the same way.

For consistency, examples/l3fwd-power and eal_common_tailqs.c should
use RTE_LOG instead of rte_log.
  

Patch

diff --git a/drivers/net/ixgbe/ixgbe_logs.h b/drivers/net/ixgbe/ixgbe_logs.h
index 572e030..53ba42d 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, " >>")