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 3DA18A034F; Wed, 31 Mar 2021 11:49:46 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DCBBA140E89; Wed, 31 Mar 2021 11:49:31 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 1CAAB140E8A for ; Wed, 31 Mar 2021 11:49:25 +0200 (CEST) IronPort-SDR: c69pioZm2t2IRejCOlNdzZ/0y5tY0P6IglT7O+vSLfcXYDNc/iY4IMU3CgamGX9T25rX1iuxaF 6Zpu5HQ2jdMw== X-IronPort-AV: E=McAfee;i="6000,8403,9939"; a="191448566" X-IronPort-AV: E=Sophos;i="5.81,293,1610438400"; d="scan'208";a="191448566" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Mar 2021 02:49:24 -0700 IronPort-SDR: tHGBNfohKGVCQ3WYFzx/34FqVwpi+sEOy1NBAqFeSdVX+v1ODngsQrMWMfEdP8+AUDt3gpK/6W N4mL24bXN7QA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,293,1610438400"; d="scan'208";a="445603467" Received: from dpdk51.sh.intel.com ([10.67.111.142]) by fmsmga002.fm.intel.com with ESMTP; 31 Mar 2021 02:49:22 -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, 31 Mar 2021 17:52:51 +0800 Message-Id: <20210331095254.2454439-6-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210331095254.2454439-1-qi.z.zhang@intel.com> References: <20210310121626.2019863-1-qi.z.zhang@intel.com> <20210331095254.2454439-1-qi.z.zhang@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v6 5/8] net/iavf: 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_IAVF_DEBUG_RX with RTE_ETHDEV_DEBUG_RX. 2. replace RTE_LIBRTE_IAVF_DEBUG_TX whth RTE_ETHDEV_DEBUG_TX. 3. merge RTE_LIBRTE_IAVF_DEBUG_TX_FREE and RTE_LIBRTE_ETHDEV_DEBUG into RTE_ETHDEV_DEBUG_TX Signed-off-by: Qi Zhang --- drivers/net/iavf/iavf_ethdev.c | 7 ++----- drivers/net/iavf/iavf_log.h | 13 ++----------- drivers/net/iavf/iavf_rxtx.c | 8 ++++---- 3 files changed, 8 insertions(+), 20 deletions(-) diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c index 869c4a1988..51cad48069 100644 --- a/drivers/net/iavf/iavf_ethdev.c +++ b/drivers/net/iavf/iavf_ethdev.c @@ -2352,12 +2352,9 @@ RTE_PMD_REGISTER_KMOD_DEP(net_iavf, "* igb_uio | vfio-pci"); RTE_PMD_REGISTER_PARAM_STRING(net_iavf, "cap=dcf"); RTE_LOG_REGISTER(iavf_logtype_init, pmd.net.iavf.init, NOTICE); RTE_LOG_REGISTER(iavf_logtype_driver, pmd.net.iavf.driver, NOTICE); -#ifdef RTE_LIBRTE_IAVF_DEBUG_RX +#ifdef RTE_ETHDEV_DEBUG_RX RTE_LOG_REGISTER(iavf_logtype_rx, pmd.net.iavf.rx, DEBUG); #endif -#ifdef RTE_LIBRTE_IAVF_DEBUG_TX +#ifdef RTE_ETHDEV_DEBUG_TX RTE_LOG_REGISTER(iavf_logtype_tx, pmd.net.iavf.tx, DEBUG); #endif -#ifdef RTE_LIBRTE_IAVF_DEBUG_TX_FREE -RTE_LOG_REGISTER(iavf_logtype_tx_free, pmd.net.iavf.tx_free, DEBUG); -#endif diff --git a/drivers/net/iavf/iavf_log.h b/drivers/net/iavf/iavf_log.h index 1088ec75f5..ff66ab0ccf 100644 --- a/drivers/net/iavf/iavf_log.h +++ b/drivers/net/iavf/iavf_log.h @@ -21,7 +21,7 @@ extern int iavf_logtype_driver; #define PMD_DRV_FUNC_TRACE() PMD_DRV_LOG(DEBUG, " >>") -#ifdef RTE_LIBRTE_IAVF_DEBUG_RX +#ifdef RTE_ETHDEV_DEBUG_RX extern int iavf_logtype_rx; #define PMD_RX_LOG(level, fmt, args...) \ rte_log(RTE_LOG_ ## level, iavf_logtype_rx, \ @@ -30,7 +30,7 @@ extern int iavf_logtype_rx; #define PMD_RX_LOG(level, fmt, args...) do { } while (0) #endif -#ifdef RTE_LIBRTE_IAVF_DEBUG_TX +#ifdef RTE_ETHDEV_DEBUG_TX extern int iavf_logtype_tx; #define PMD_TX_LOG(level, fmt, args...) \ rte_log(RTE_LOG_ ## level, iavf_logtype_tx, \ @@ -39,13 +39,4 @@ extern int iavf_logtype_tx; #define PMD_TX_LOG(level, fmt, args...) do { } while (0) #endif -#ifdef RTE_LIBRTE_IAVF_DEBUG_TX_FREE -extern int iavf_logtype_tx_free; -#define PMD_TX_FREE_LOG(level, fmt, args...) \ - rte_log(RTE_LOG_ ## level, iavf_logtype_tx_free, \ - "%s(): " fmt "\n", __func__, ## args) -#else -#define PMD_TX_FREE_LOG(level, fmt, args...) do { } while (0) -#endif - #endif /* _IAVF_LOG_H_ */ diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c index caf14a2323..541b4446e8 100644 --- a/drivers/net/iavf/iavf_rxtx.c +++ b/drivers/net/iavf/iavf_rxtx.c @@ -2004,9 +2004,9 @@ iavf_xmit_cleanup(struct iavf_tx_queue *txq) if ((txd[desc_to_clean_to].cmd_type_offset_bsz & rte_cpu_to_le_64(IAVF_TXD_QW1_DTYPE_MASK)) != rte_cpu_to_le_64(IAVF_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; } @@ -2360,7 +2360,7 @@ iavf_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