From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8171FA00C2; Wed, 17 Mar 2021 12:12:38 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 81DE1140EF8; Wed, 17 Mar 2021 12:12:31 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 21E61140EB2 for ; Wed, 17 Mar 2021 12:12:26 +0100 (CET) IronPort-SDR: 5S9Cwrmvr4U9/F3uvE0lotaGaHt1QcjQ6yqDvCHE1hRiK9H6sup3xCFrLPBXi+sb+rGSc0dAZO +tcr8LgzMpcg== X-IronPort-AV: E=McAfee;i="6000,8403,9925"; a="176570697" X-IronPort-AV: E=Sophos;i="5.81,256,1610438400"; d="scan'208";a="176570697" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Mar 2021 04:12:16 -0700 IronPort-SDR: 9qZy0C4ZDtLZXZa88b04nT8Dk7tFYas0hl0+NtXXrBpGmuQ3X0l/BbekkEJaW+/0ZRQe7uhhEA ms4DPKC1Sdww== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,256,1610438400"; d="scan'208";a="411428985" Received: from dpdk51.sh.intel.com ([10.67.111.142]) by orsmga007.jf.intel.com with ESMTP; 17 Mar 2021 04:12:13 -0700 From: Qi Zhang To: ferruh.yigit@intel.com Cc: dev@dpdk.org, thomas@monjalon.net, bruce.richardson@intel.com, xiao.w.wang@intel.com, jingjing.wu@intel.com, beilei.xing@intel.com, jia.guo@intel.com, qiming.yang@intel.com, haiyue.wang@intel.com, Qi Zhang Date: Wed, 17 Mar 2021 19:15:45 +0800 Message-Id: <20210317111551.2215332-4-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210317111551.2215332-1-qi.z.zhang@intel.com> References: <20210310121626.2019863-1-qi.z.zhang@intel.com> <20210317111551.2215332-1-qi.z.zhang@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3 3/9] net/fm10k: refine debug build option X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 1. replace RTE_LIBRTE_FM10K_DEBUG_RX with RTE_ETHDEV_DEBUG_RX. 2. replace RTE_LIBRTE_FM10K_DEBUG_TX whth RTE_ETHDEV_DEBUG_TX. 3. merge RTE_LIBRTE_FM10K_DEBUG_TX_FREE and RTE_ETHDEV_DEBUG into RTE_ETHDEV_DEBUG_TX Signed-off-by: Qi Zhang --- drivers/net/fm10k/fm10k_ethdev.c | 7 ++----- drivers/net/fm10k/fm10k_logs.h | 13 ++----------- drivers/net/fm10k/fm10k_rxtx.c | 8 ++++---- 3 files changed, 8 insertions(+), 20 deletions(-) diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c index fd471c415e..0a557acbef 100644 --- a/drivers/net/fm10k/fm10k_ethdev.c +++ b/drivers/net/fm10k/fm10k_ethdev.c @@ -3287,12 +3287,9 @@ RTE_PMD_REGISTER_PCI_TABLE(net_fm10k, pci_id_fm10k_map); RTE_PMD_REGISTER_KMOD_DEP(net_fm10k, "* igb_uio | uio_pci_generic | vfio-pci"); RTE_LOG_REGISTER(fm10k_logtype_init, pmd.net.fm10k.init, NOTICE); RTE_LOG_REGISTER(fm10k_logtype_driver, pmd.net.fm10k.driver, NOTICE); -#ifdef RTE_LIBRTE_FM10K_DEBUG_RX +#ifdef RTE_ETHDEV_DEBUG_RX RTE_LOG_REGISTER(fm10k_logtype_rx, pmd.net.fm10k.rx, DEBUG); #endif -#ifdef RTE_LIBRTE_FM10K_DEBUG_TX +#ifdef RTE_ETHDEV_DEBUG_TX RTE_LOG_REGISTER(fm10k_logtype_tx, pmd.net.fm10k.tx, DEBUG); #endif -#ifdef RTE_LIBRTE_FM10K_DEBUG_TX_FREE -RTE_LOG_REGISTER(fm10k_logtype_tx_free, pmd.net.fm10k.tx_free, DEBUG); -#endif diff --git a/drivers/net/fm10k/fm10k_logs.h b/drivers/net/fm10k/fm10k_logs.h index 9ae743d806..4f039f8beb 100644 --- a/drivers/net/fm10k/fm10k_logs.h +++ b/drivers/net/fm10k/fm10k_logs.h @@ -14,7 +14,7 @@ extern int fm10k_logtype_init; #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>") -#ifdef RTE_LIBRTE_FM10K_DEBUG_RX +#ifdef RTE_ETHDEV_DEBUG_RX extern int fm10k_logtype_rx; #define PMD_RX_LOG(level, fmt, args...) \ rte_log(RTE_LOG_ ## level, fm10k_logtype_rx, \ @@ -23,7 +23,7 @@ extern int fm10k_logtype_rx; #define PMD_RX_LOG(level, fmt, args...) do { } while (0) #endif -#ifdef RTE_LIBRTE_FM10K_DEBUG_TX +#ifdef RTE_ETHDEV_DEBUG_TX extern int fm10k_logtype_tx; #define PMD_TX_LOG(level, fmt, args...) \ rte_log(RTE_LOG_ ## level, fm10k_logtype_tx, \ @@ -32,15 +32,6 @@ extern int fm10k_logtype_tx; #define PMD_TX_LOG(level, fmt, args...) do { } while (0) #endif -#ifdef RTE_LIBRTE_FM10K_DEBUG_TX_FREE -extern int fm10k_logtype_tx_free; -#define PMD_TX_FREE_LOG(level, fmt, args...) \ - rte_log(RTE_LOG_ ## level, fm10k_logtype_tx_free, \ - "%s(): " fmt "\n", __func__, ## args) -#else -#define PMD_TX_FREE_LOG(level, fmt, args...) do { } while (0) -#endif - extern int fm10k_logtype_driver; #define PMD_DRV_LOG_RAW(level, fmt, args...) \ rte_log(RTE_LOG_ ## level, fm10k_logtype_driver, "%s(): " fmt, \ diff --git a/drivers/net/fm10k/fm10k_rxtx.c b/drivers/net/fm10k/fm10k_rxtx.c index fbf07bc225..0a9a27aa5a 100644 --- a/drivers/net/fm10k/fm10k_rxtx.c +++ b/drivers/net/fm10k/fm10k_rxtx.c @@ -16,7 +16,7 @@ #define rte_packet_prefetch(p) do {} while (0) #endif -#ifdef RTE_LIBRTE_FM10K_DEBUG_RX +#ifdef RTE_ETHDEV_DEBUG_RX static inline void dump_rxd(union fm10k_rx_desc *rxd) { PMD_RX_LOG(DEBUG, "+----------------|----------------+"); @@ -115,7 +115,7 @@ fm10k_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, break; mbuf = q->sw_ring[next_dd]; desc = q->hw_ring[next_dd]; -#ifdef RTE_LIBRTE_FM10K_DEBUG_RX +#ifdef RTE_ETHDEV_DEBUG_RX dump_rxd(&desc); #endif rte_pktmbuf_pkt_len(mbuf) = desc.w.length; @@ -229,7 +229,7 @@ fm10k_recv_scattered_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, break; mbuf = q->sw_ring[next_dd]; desc = q->hw_ring[next_dd]; -#ifdef RTE_LIBRTE_FM10K_DEBUG_RX +#ifdef RTE_ETHDEV_DEBUG_RX dump_rxd(&desc); #endif @@ -710,7 +710,7 @@ fm10k_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts, return i; } -#ifdef RTE_ETHDEV_DEBUG +#ifdef RTE_ETHDEV_DEBUG_TX ret = rte_validate_tx_offload(m); if (ret != 0) { rte_errno = -ret; -- 2.26.2