net/igc: refine debug build option
authorQi Zhang <qi.z.zhang@intel.com>
Wed, 31 Mar 2021 09:52:54 +0000 (17:52 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 1 Apr 2021 14:10:20 +0000 (16:10 +0200)
1. replace RTE_LIBRTE_IGC_DEBUG_RX with RTE_ETHDEV_DEBUG_RX.
2. replace RTE_LIBRTE_IGC_DEBUG_TX with RTE_ETHDEV_DEBUG_TX.
3. merge RTE_LIBRTE_ETHDEV_DEBUG into RTE_ETHDEV_DEBUG_TX

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
drivers/net/e1000/e1000_logs.c
drivers/net/igc/igc_logs.h
drivers/net/igc/igc_txrx.c

index 1718cd5..23b7c67 100644 (file)
@@ -2,6 +2,7 @@
  * Copyright(c) 2018 Intel Corporation
  */
 
+#include <rte_ethdev.h>
 #include "e1000_logs.h"
 
 RTE_LOG_REGISTER(e1000_logtype_init, pmd.net.e1000.init, NOTICE)
index 6457c4d..11071a3 100644 (file)
@@ -20,14 +20,14 @@ extern int igc_logtype_driver;
 
 #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
 
-#ifdef RTE_LIBRTE_IGC_DEBUG_RX
+#ifdef RTE_ETHDEV_DEBUG_RX
 #define PMD_RX_LOG(level, fmt, args...) \
        RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
 #else
 #define PMD_RX_LOG(level, fmt, args...) do { } while (0)
 #endif
 
-#ifdef RTE_LIBRTE_IGC_DEBUG_TX
+#ifdef RTE_ETHDEV_DEBUG_TX
 #define PMD_TX_LOG(level, fmt, args...) \
        RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
 #else
index c0a5d5e..f092709 100644 (file)
@@ -1434,7 +1434,7 @@ eth_igc_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
                        return i;
                }
 
-#ifdef RTE_LIBRTE_ETHDEV_DEBUG
+#ifdef RTE_ETHDEV_DEBUG_TX
                ret = rte_validate_tx_offload(m);
                if (ret != 0) {
                        rte_errno = -ret;