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 9BDD1A0561; Thu, 18 Mar 2021 02:39:35 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 63808141003; Thu, 18 Mar 2021 02:39:18 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 7E643141003 for ; Thu, 18 Mar 2021 02:39:16 +0100 (CET) IronPort-SDR: INGLRWoC3YaMy7bdHRhvTcl/KcDueF2H6cGWPNN/1L5fl3W+Z7zGRnH3Jcxxtmnibif/OZ/FIZ SUB0CUwr6BEA== X-IronPort-AV: E=McAfee;i="6000,8403,9926"; a="253591055" X-IronPort-AV: E=Sophos;i="5.81,257,1610438400"; d="scan'208";a="253591055" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Mar 2021 18:39:16 -0700 IronPort-SDR: ljBeuaz2KFVPghljy9WRIhyWTVW3wKA9JejP+7Nhk2ybNLD0qB+1ffKz9vOVehucHfawMYTsqf pJvvyHAHkJkQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,257,1610438400"; d="scan'208";a="602471504" Received: from dpdk51.sh.intel.com ([10.67.111.142]) by fmsmga006.fm.intel.com with ESMTP; 17 Mar 2021 18:39: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: Thu, 18 Mar 2021 09:42:32 +0800 Message-Id: <20210318014234.2255366-7-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210318014234.2255366-1-qi.z.zhang@intel.com> References: <20210310121626.2019863-1-qi.z.zhang@intel.com> <20210318014234.2255366-1-qi.z.zhang@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v4 6/8] net/ice: 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_ICE_DEBUG_RX with RTE_ETHDEV_DEBUG_RX. 2. replace RTE_LIBRTE_ICE_DEBUG_TX whth RTE_ETHDEV_DEBUG_TX. 3. merge RTE_LIBRTE_ICE_DEBUG_TX_FREE and RTE_LIBRTE_ETHDEV_DEBUG into RTE_LIBRTE_DEBUG_TX Signed-off-by: Qi Zhang --- drivers/net/ice/ice_ethdev.c | 7 ++----- drivers/net/ice/ice_logs.h | 13 ++----------- drivers/net/ice/ice_rxtx.c | 20 ++++++++++---------- 3 files changed, 14 insertions(+), 26 deletions(-) diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index 8999d441ac..d370b72d80 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -5366,12 +5366,9 @@ RTE_PMD_REGISTER_PARAM_STRING(net_ice, RTE_LOG_REGISTER(ice_logtype_init, pmd.net.ice.init, NOTICE); RTE_LOG_REGISTER(ice_logtype_driver, pmd.net.ice.driver, NOTICE); -#ifdef RTE_LIBRTE_ICE_DEBUG_RX +#ifdef RTE_ETHDEV_DEBUG_RX RTE_LOG_REGISTER(ice_logtype_rx, pmd.net.ice.rx, DEBUG); #endif -#ifdef RTE_LIBRTE_ICE_DEBUG_TX +#ifdef RTE_ETHDEV_DEBUG_TX RTE_LOG_REGISTER(ice_logtype_tx, pmd.net.ice.tx, DEBUG); #endif -#ifdef RTE_LIBRTE_ICE_DEBUG_TX_FREE -RTE_LOG_REGISTER(ice_logtype_tx_free, pmd.net.ice.tx_free, DEBUG); -#endif diff --git a/drivers/net/ice/ice_logs.h b/drivers/net/ice/ice_logs.h index aab7da5f7b..e79980fb63 100644 --- a/drivers/net/ice/ice_logs.h +++ b/drivers/net/ice/ice_logs.h @@ -14,7 +14,7 @@ extern int ice_logtype_driver; #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>") -#ifdef RTE_LIBRTE_ICE_DEBUG_RX +#ifdef RTE_ETHDEV_DEBUG_RX extern int ice_logtype_rx; #define PMD_RX_LOG(level, fmt, args...) \ rte_log(RTE_LOG_ ## level, ice_logtype_rx, \ @@ -23,7 +23,7 @@ extern int ice_logtype_rx; #define PMD_RX_LOG(level, fmt, args...) do { } while (0) #endif -#ifdef RTE_LIBRTE_ICE_DEBUG_TX +#ifdef RTE_ETHDEV_DEBUG_TX extern int ice_logtype_tx; #define PMD_TX_LOG(level, fmt, args...) \ rte_log(RTE_LOG_ ## level, ice_logtype_tx, \ @@ -32,15 +32,6 @@ extern int ice_logtype_tx; #define PMD_TX_LOG(level, fmt, args...) do { } while (0) #endif -#ifdef RTE_LIBRTE_ICE_DEBUG_TX_FREE -extern int ice_logtype_tx_free; -#define PMD_TX_FREE_LOG(level, fmt, args...) \ - rte_log(RTE_LOG_ ## level, ice_logtype_tx_free, \ - "%s(): " fmt "\n", __func__, ## args) -#else -#define PMD_TX_FREE_LOG(level, fmt, args...) do { } while (0) -#endif - #define PMD_DRV_LOG_RAW(level, fmt, args...) \ rte_log(RTE_LOG_ ## level, ice_logtype_driver, "%s(): " fmt, \ __func__, ## args) diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c index 530c206f4f..0827db9c9e 100644 --- a/drivers/net/ice/ice_rxtx.c +++ b/drivers/net/ice/ice_rxtx.c @@ -2436,11 +2436,11 @@ ice_xmit_cleanup(struct ice_tx_queue *txq) desc_to_clean_to = sw_ring[desc_to_clean_to].last_id; if (!(txd[desc_to_clean_to].cmd_type_offset_bsz & rte_cpu_to_le_64(ICE_TX_DESC_DTYPE_DESC_DONE))) { - PMD_TX_FREE_LOG(DEBUG, "TX descriptor %4u is not done " - "(port=%d queue=%d) value=0x%"PRIx64"\n", - desc_to_clean_to, - txq->port_id, txq->queue_id, - txd[desc_to_clean_to].cmd_type_offset_bsz); + PMD_TX_LOG(DEBUG, "TX descriptor %4u is not done " + "(port=%d queue=%d) value=0x%"PRIx64"\n", + desc_to_clean_to, + txq->port_id, txq->queue_id, + txd[desc_to_clean_to].cmd_type_offset_bsz); /* Failed to clean any descriptors */ return -1; } @@ -2731,10 +2731,10 @@ ice_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) /* set RS bit on the last descriptor of one packet */ if (txq->nb_tx_used >= txq->tx_rs_thresh) { - PMD_TX_FREE_LOG(DEBUG, - "Setting RS bit on TXD id=" - "%4u (port=%d queue=%d)", - tx_last, txq->port_id, txq->queue_id); + PMD_TX_LOG(DEBUG, + "Setting RS bit on TXD id=" + "%4u (port=%d queue=%d)", + tx_last, txq->port_id, txq->queue_id); td_cmd |= ICE_TX_DESC_CMD_RS; @@ -3243,7 +3243,7 @@ ice_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; -- 2.26.2