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 74371A0562; Tue, 23 Mar 2021 12:05:03 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9EA66140D8C; Tue, 23 Mar 2021 12:04:36 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 04061140D48 for ; Tue, 23 Mar 2021 12:04:28 +0100 (CET) IronPort-SDR: PpklZ8w1n+VGlRsl7HpC1hlCiD0If626E5AeRkuCsgyMejPKi/usDenXro+PN36mRN8O4aXCar KLR7AVwDBhpQ== X-IronPort-AV: E=McAfee;i="6000,8403,9931"; a="170419133" X-IronPort-AV: E=Sophos;i="5.81,271,1610438400"; d="scan'208";a="170419133" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Mar 2021 04:04:19 -0700 IronPort-SDR: 2gzYsJKD+6TWVVjJIQvspNIVc6HPiFW+AJtD5GPhecPzKq2CDz9pdxXpfSsNbFzrZB6jrzLC2E hpGtVPZHS5rQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,271,1610438400"; d="scan'208";a="414938444" Received: from dpdk51.sh.intel.com ([10.67.111.142]) by orsmga008.jf.intel.com with ESMTP; 23 Mar 2021 04:04:16 -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: Tue, 23 Mar 2021 19:07:45 +0800 Message-Id: <20210323110749.2306452-5-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210323110749.2306452-1-qi.z.zhang@intel.com> References: <20210310121626.2019863-1-qi.z.zhang@intel.com> <20210323110749.2306452-1-qi.z.zhang@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v5 4/8] net/i40e: 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_I40E_DEBUG_RX with RTE_ETHDEV_DEBUG_RX. 2. replace RTE_LIBRTE_I40E_DEBUG_TX whth RTE_ETHDEV_DEBUG_TX. 3. merge RTE_LIBRTE_I40E_DEBUG_TX_FREE and RTE_LIBRTE_ETHDEV_DEBUG into RTE_ETHDEV_DEBUG_TX Signed-off-by: Qi Zhang --- drivers/net/i40e/i40e_ethdev.c | 7 ++----- drivers/net/i40e/i40e_logs.h | 13 ++----------- drivers/net/i40e/i40e_rxtx.c | 16 ++++++++-------- 3 files changed, 12 insertions(+), 24 deletions(-) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 9b86bcdc69..38d43c8dc6 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -12380,15 +12380,12 @@ i40e_cloud_filter_qinq_create(struct i40e_pf *pf) RTE_LOG_REGISTER(i40e_logtype_init, pmd.net.i40e.init, NOTICE); RTE_LOG_REGISTER(i40e_logtype_driver, pmd.net.i40e.driver, NOTICE); -#ifdef RTE_LIBRTE_I40E_DEBUG_RX +#ifdef RTE_ETHDEV_DEBUG_RX RTE_LOG_REGISTER(i40e_logtype_rx, pmd.net.i40e.rx, DEBUG); #endif -#ifdef RTE_LIBRTE_I40E_DEBUG_TX +#ifdef RTE_ETHDEV_DEBUG_TX RTE_LOG_REGISTER(i40e_logtype_tx, pmd.net.i40e.tx, DEBUG); #endif -#ifdef RTE_LIBRTE_I40E_DEBUG_TX_FREE -RTE_LOG_REGISTER(i40e_logtype_tx_free, pmd.net.i40e.tx_free, DEBUG); -#endif RTE_PMD_REGISTER_PARAM_STRING(net_i40e, ETH_I40E_FLOATING_VEB_ARG "=1" diff --git a/drivers/net/i40e/i40e_logs.h b/drivers/net/i40e/i40e_logs.h index dac3267eb4..eebe6c5559 100644 --- a/drivers/net/i40e/i40e_logs.h +++ b/drivers/net/i40e/i40e_logs.h @@ -11,7 +11,7 @@ extern int i40e_logtype_init; __func__, ##args) #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>") -#ifdef RTE_LIBRTE_I40E_DEBUG_RX +#ifdef RTE_ETHDEV_DEBUG_RX extern int i40e_logtype_rx; #define PMD_RX_LOG(level, fmt, args...) \ rte_log(RTE_LOG_ ## level, i40e_logtype_rx, \ @@ -20,7 +20,7 @@ extern int i40e_logtype_rx; #define PMD_RX_LOG(level, fmt, args...) do { } while (0) #endif -#ifdef RTE_LIBRTE_I40E_DEBUG_TX +#ifdef RTE_ETHDEV_DEBUG_TX extern int i40e_logtype_tx; #define PMD_TX_LOG(level, fmt, args...) \ rte_log(RTE_LOG_ ## level, i40e_logtype_tx, \ @@ -29,15 +29,6 @@ extern int i40e_logtype_tx; #define PMD_TX_LOG(level, fmt, args...) do { } while (0) #endif -#ifdef RTE_LIBRTE_I40E_DEBUG_TX_FREE -extern int i40e_logtype_tx_free; -#define PMD_TX_FREE_LOG(level, fmt, args...) \ - rte_log(RTE_LOG_ ## level, i40e_logtype_tx_free, \ - "%s(): " fmt "\n", __func__, ## args) -#else -#define PMD_TX_FREE_LOG(level, fmt, args...) do { } while (0) -#endif - extern int i40e_logtype_driver; #define PMD_DRV_LOG_RAW(level, fmt, args...) \ rte_log(RTE_LOG_ ## level, i40e_logtype_driver, "%s(): " fmt, \ diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c index 61cb204be2..3c7686c3f4 100644 --- a/drivers/net/i40e/i40e_rxtx.c +++ b/drivers/net/i40e/i40e_rxtx.c @@ -372,9 +372,9 @@ i40e_xmit_cleanup(struct i40e_tx_queue *txq) if ((txd[desc_to_clean_to].cmd_type_offset_bsz & rte_cpu_to_le_64(I40E_TXD_QW1_DTYPE_MASK)) != rte_cpu_to_le_64(I40E_TX_DESC_DTYPE_DESC_DONE)) { - PMD_TX_FREE_LOG(DEBUG, "TX descriptor %4u is not done " - "(port=%d queue=%d)", desc_to_clean_to, - txq->port_id, txq->queue_id); + PMD_TX_LOG(DEBUG, "TX descriptor %4u is not done " + "(port=%d queue=%d)", desc_to_clean_to, + txq->port_id, txq->queue_id); return -1; } @@ -1253,10 +1253,10 @@ i40e_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) txq->nb_tx_free = (uint16_t)(txq->nb_tx_free - nb_used); 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 |= I40E_TX_DESC_CMD_RS; @@ -1525,7 +1525,7 @@ i40e_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